-
-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add msposd ground station OSD support #1715
base: master
Are you sure you want to change the base?
Conversation
This assumes msposd data is send via a seperate wfb rx/tx pair. I think we should agree on a default. |
SBC GS Stock Edition use wfb tunnel and msposd listen on 5000 port by default. I have two main concerns:
And I also consider 4 types of routers:
|
Port 5000 was selected randomly. Please let me know which port we select going forward and I'll change it in the SBC-GS image. |
I support using 14551 by default, which is used in jetson-fpv now. |
Does Android GS support GS rendering ? |
only MavLink based OSD for now |
i like @zhouruixi idea of heaveing 4 options. |
It should work now. make sure the tunnel is true, and check(ps) msposd is in right mode
|
I think port 14551 should be used on both way, data based on wfb_tx should be sent to 127.0.0.1:14551, and data based on tunnel should be sent to 10.5.0.1:14551. In this way, no matter which method is used, msposd on the ground side only needs to listen to 0.0.0.0:14551, otherwise you have to change the port that msposd listens to when changing the method. |
Why is this flexibility needed?
|
首先明确一点,造成这个问题最主要的原因是:在地面端渲染的msposd推出后,openipc没有及时跟进对应的方案,导致出现了两种不同的实现方式投入到实际使用中。 1、基于隧道的实现,最大的优势在于简单明了。地面站的wfb-ng一直有隧道功能,openipc固件也开始支持并默认启用wfb tunnel,隧道越来越趋向于一种必不可少的基础功能。截至目前,官方固件仍然没地面端渲染有对应的实现(这次提交如果被合并将改变这一现状),这就导致用户要想使用地面端渲染的msposd,就必须修改openipc的代码。使用隧道,只需要将-osd删除,将目标ip从127.0.0.1改成10.5.0.1即可,用户方便操作。openipc官方SBC固件只支持隧道的方式,我维护的SBC地面站两种方式都支持,但默认也是使用隧道。假如用户不使用现成的地面站固件,使用Ubuntu或其他Linux发行版,手动安装wfb-ng后,不需要任何额外的设置(开启一个额外的wfb_rx),只需要运行msposd并监听10.5.0.10:14551即可使用。 2、额外开一对wfb_tx/rx不难,但想要优雅的使用额外的wfb_tx/rx对需要繁琐的配置,下面是henkwiedig分享地面站配置,很好,但是并不友好。 [gs]
streams = [{'name': 'video', 'stream_rx': 0x00, 'stream_tx': None, 'service_type': 'udp_direct_rx', 'profiles': ['base', 'gs_base', 'video', 'gs_video']},
{'name': 'mavlink', 'stream_rx': 0x10, 'stream_tx': 0x90, 'service_type': 'mavlink', 'profiles': ['base', 'gs_base', 'mavlink', 'gs_mavlink']},
{'name': 'tunnel', 'stream_rx': 0x20, 'stream_tx': 0xa0, 'service_type': 'tunnel', 'profiles': ['base', 'gs_base', 'tunnel', 'gs_tunnel']},
{'name': 'msp', 'stream_rx': 0x11, 'stream_tx': 0x91, 'service_type': 'udp_proxy', 'profiles': ['base', 'gs_base', 'gs_msp']}
]
[gs_msp]
peer = 'connect://127.0.0.1:14551' # outgoing connection
frame_type = 'data' # Use data or rts frames
fec_k = 1 # FEC K (For tx side. Rx will get FEC settings from session packet)
fec_n = 2 # FEC N (For tx side. Rx will get FEC settings from session packet)
fec_timeout = 0 # [ms], 0 to disable. If no new packets during timeout, emit one empty packet if FEC block is open
fec_delay = 0 # [us], 0 to disable. Issue FEC packets with delay between them. 3、使用额外的wfb_tx/rx对确实有一些好处,比如资源占用更少、速度更快。就这两者而言,没有人做过严谨的测试,究竟会多占用多少资源,增加多少延时,都是未知数,亦很难评判是否值得为了这些提升而仅支持额外wfb_tx/rx对的方式。 以上种种,使我做出了支持两种方式的决定。对于openipc,同时支持两种方式仅仅只需要增加一个elif,两行代码,为了多样性,为了用户便捷,不值得吗? First of all, let's make it clear that the main reason for this problem is that after the launch of msposd for ground-side rendering, openipc did not follow up with the corresponding solution in time, resulting in two different implementation methods being put into practical use.
[gs]
streams = [{'name': 'video', 'stream_rx': 0x00, 'stream_tx': None, 'service_type': 'udp_direct_rx', 'profiles': ['base', 'gs_base', 'video', 'gs_video']},
{'name': 'mavlink', 'stream_rx': 0x10, 'stream_tx': 0x90, 'service_type': 'mavlink', 'profiles': ['base', 'gs_base', 'mavlink', 'gs_mavlink']},
{'name': 'tunnel', 'stream_rx': 0x20, 'stream_tx': 0xa0, 'service_type': 'tunnel', 'profiles': ['base', 'gs_base', 'tunnel', 'gs_tunnel']},
{'name': 'msp', 'stream_rx': 0x11, 'stream_tx': 0x91, 'service_type': 'udp_proxy', 'profiles': ['base', 'gs_base', 'gs_msp']}
]
[gs_msp]
peer = 'connect://127.0.0.1:14551' # outgoing connection
frame_type = 'data' # Use data or rts frames
fec_k = 1 # FEC K (For tx side. Rx will get FEC settings from session packet)
fec_n = 2 # FEC N (For tx side. Rx will get FEC settings from session packet)
fec_timeout = 0 # [ms], 0 to disable. If no new packets during timeout, emit one empty packet if FEC block is open
fec_delay = 0 # [us], 0 to disable. Issue FEC packets with delay between them.
All of the above made me decide to support both methods. For openipc, supporting both methods at the same time only requires adding an elif, two lines of code, for diversity and user convenience, isn't it worth it? |
It's OK, currently oneway wfb-ng(wfb_tx) works for msposd.
Wfb-ng says tunnel uses more resources. And this patch gives choice for user to select 3(wfb_tx) or 4(tunnel) |
@lida2003 we are only think should use same port for both method. Your pr is use 5000 for now. That's all. |
@JohnDGodwin Please noted this port change on tunnel. As @zhouruixi requested, I think @henkwiedig agree on this 5000 to 14551 change, which might be default port for msposd ground station mode.
@zhouruixi BTW, as there might be some performance concerns: "IPv4 tunnel for generic usage. You can transmit ordinary ip packets over WFB link. Note, don't use ip tunnel for high-bandwidth transfers like video or mavlink because it has more overhead than raw udp streams." I have some figures for checking, and @henkwiedig might have much more insight details on this.
Then we have (9953+1837300)*8/(60+26)=171837.48 bps, compare to UART(MAVLink, general settings 115200bps). I think there is no performance issue reported, but it might be noted in advance. And lower osd fps/change tunnel to raw udp can improve and handle the issue. |
OK, will change to wfb_rx method as default once this pr is merged. |
support request of #1671