Unable to view camera stream - Jetson Nano, Matrice 350
已完成For my payload application, I need to retrieve/view the camera stream, but I am unable to.
Platform: Matrice 350 with NVIDIA Jetson Nano connecting with E-port development board.
I am proceeding by modifying the sample code at https://github.com/dji-sdk/Payload-SDK. If I configure the Nano to connect with DJI_USE_ONLY_UART then it can connect and run the gimbal control sample, but is unable to view the camera feed and suggests that I should use either a USB bulk device or network device. If I configure it with DJI_USE_UART_AND_USB_BULK_DEVICE then I can connect, successfully negotiate, and run the gimbal control sample, but when I run the camera stream view example, I get the following error:
[253.589][channel]-[Error]-[DjiStreamChannelUsbBulk_AddPort:473) Init usb bulk channel failed, ret:000000EC.
[253.589][channel]-[Error]-[DjiStreamChannelUsbBulk_Create:132) Add usb bulk port failed, ret:000000EC.
[253.589][liveview]-[Error]-[DjiLiveview_BulkRegisterCallback:956) Init usb bulk stream channel failed, ret:236.
[253.589][liveview]-[Error]-[DjiLiveview_Init:293) Init fpv usb bulk stream channel failed, ret:227.
The live feed never starts.
If I configure the system with DJI_USE_UART_AND_NETWORK_DEVICE, and change the network name to "usb1" which is the network that appears when I plug in the USB-C cable from the E-port dev board, then the system is unable to negotiate:
[0.009][core]-[Info]-[DjiCore_Init:101) Payload SDK Version : V3.5.0-beta.0-build.1765
[1.255][adapter]-[Info]-[DjiAccessAdapter_Init:186) Identify aircraft series is Matrice 350 Series
[1.255][adapter]-[Info]-[DjiAccessAdapter_Init:206) Identify mount position type is Extension Port Type
[1.276][adapter]-[Info]-[DjiAccessAdapter_Init:301) Identity uart0 baudrate is 921600 bps
[3.311][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
[4.311][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
[5.312][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
[6.313][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
[7.313][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
[8.314][adapter]-[Error]-[DjiAccessAdapter_Init:312) Payload negotiate error, returnCode = 225
[8.314][adapter]-[Error]-[DjiAccessAdapter_Init:318) Payload negotiate error, returnCode = 225
[8.314][core]-[Error]-[DjiCore_Init:121) Access adapter init error, stat:225
terminate called after throwing an instance of 'std::runtime_error'
what(): Core init error.
Aborted
Note that I have only an IPv6 address on this network, not IPv4. If I change the USB vendor/product IDs I get the same results, and also get the same results when using "usb0" which appears when I plug in the UART-to-USB adapter that I use to communicate with the dev board's UART port.
How do I set up either USB bulk device or network device on the Jetson Nano with the Matrice 350?
-
The E-PORT USB on the M350 aircraft is used as the host, so it needs to be connected to the USB device/USB OTG port of the onboard computer device. You can choose to use RNDIS or BULK mode through DJI_USE_UART_AND_USB_NETWORK_DEVICE or DJI_USE_UART_AND_USB_BULK_DEVICE. It will be easier to set the USB device as RNDIS. After enable RNDIS, the RNDIS network port will be displayed on the onboard computer, and filled in the PSDK code, for example: #define LINUX_NETWORK___DEV "l4tbr0" In addition, set the VID and PID of the USB device. For example, NVIDIA jeston is usually set as follows: #define USB_NET___ADAPTER_VID (0x0955) #define USB_NET_ADAPTER_PID (0x7020) -
I have gotten this working with the RNDIS/l4tbr0, so now I can view video on my Jetson Nano from the Matrice 350 and its payloads.
However, if I run
dji_sdk_demo_linux_cxx
and select
[e] Start camera all features sample - you can operate the camera on DJI Pilot
then I get the following error:
[156.466][cam]-[Error]-[DjiPayloadCamera_Init:257) Can't support this function
[156.466][user]-[Error]-[DjiTest_CameraEmuBaseStartService:1240) init payload camera error:0x000000E0
[156.466][user]-[Error]-[main:137) camera emu common init errorIs this example not able to run with the E-port development board and the Matrice 350?
My end goal is to transmit video to the controller and view it in DJI Pilot 2. Do you have a code sample for doing this?
-
The M350 E-PORT port does not yet support the basic camera function (camera_emu), and subsequent PSDK versions will improve related function support. For details, please pay attention to the update of PSDK functions. https://developer.dji.com/doc/payload-sdk-tutorial/en/model-instruction/choose-develop-platform.html -
Ah wow, that is unfortunate because it really handicaps the payload that I am working on. I figured that the supported “camera stream liveview” meant that it could do exactly this, because that is what it sounds like.
Will camera_emu be supported in the future? And if so, do you have some general timeline?
请先登录再写评论。
评论
5 条评论