Adding additional ROS service from DJI into FlytOS


#1

Hi and good day,

I would like to check on the possibilities to add a new service into the current services list available (rostopic list) when starting flytos:

/flytos/dji_sdk/attitude_euler_ned
/flytos/dji_sdk/attitude_quat_ned
/flytos/dji_sdk/battery_state
/flytos/dji_sdk/flight_control_setpoint_ENUposition_yaw
/flytos/dji_sdk/flight_control_setpoint_ENUvelocity_yawrate
/flytos/dji_sdk/flight_status
/flytos/dji_sdk/gps_health
/flytos/dji_sdk/gps_position
/flytos/dji_sdk/local_position_ned
/flytos/dji_sdk/rc
/flytos/dji_sdk/sdk_info
/flytos/dji_sdk/waypoint_achieved

If we run roslaunch dji_sdk (without starting FlytOS), we will get other services e.g. setup_camera_stream. If not mistaken, we could add a new one by specifying in CMakeList file and run catkin_make.

How do we do that for FlytOS?

Thank you in advance.


#2

Actually what we are trying to do is to call the service to publish this topic “/dji_sdk/main_camera_images”, because we are not able to see from the list of streams.

Hence, we have this assumption that it needs to be published through this service : “/dji_sdk/setup_camera_stream”

Thanks!


#3

Are you using DJI M210?
The above DJI APIs are only available for M210 series. Moreover, the APIs are not exposed yet in FlytOS, and will be made available in the coming release.


#4

Yes, I’m using DJI M210. I see, do you mean that the API “/dji_sdk/main_camera_images” is not exposed in FlytOS yet?

Is there a way for us to add new service in FlytOS by using catkin_make or something, to expose it along with other existing FlytOS services?

Thank you in advance.


#5

On top of that, I actually noticed that the dji_sdk_node header file in FlytOS does include setup_camera_stream as well, but it’s in the if statement for ADVANCED_SENSING being turned on.

Not sure how do we build FlytOS again, as in the instructions it seems we can only start (launch_FlytOS) or stop it (stop_FlytOS).


#6

No. You cannot build FlytOS again.
But I can send over a custom build to you with the flag turned on.

On which device are you going to run FlytOS?
DJI only supports arm64 (example nvidia tx1/tx2) or intel 64 processors for the ADVANCED_SENSING module to work.


#7

I see. Noted on that. Using OnBoard SDK with ROS previously, we have enabled ADVANCED_SENSING and ran the samples corresponding to it, so I thought FlytOS build was linked to it somehow.

I am going to run FlytOS on Nvidia TX2.

Thank you in advance!


#8

Sorry, may I know how would you send over the custom build?

Thank you! :slight_smile:


#9

Hi guys,

sorry, may I know if there’s any update regarding the above matter?

Thank you in advance :slight_smile:


#10

Hi @khairulikhwan,

Sorry for the delay.

Can you please share any doc on this. It would help me fasten up the process on my end, or maybe I will be able to suggest some another way of getting this issue resolved.


#11

Hi,

no problem!

Sure, here is the doc I referred to previously when writing up the applications for DJI OnBoard SDK in ROS. There’s a flag to enable ADVANCED_SENSING when building the code.

cmake … -DADVANCED_SENSING=ON

https://developer.dji.com/onboard-sdk/documentation/sample-doc/sample-setup.html#ros-onboard-computer

Hope it helps.


#12

Hi @khairulikhwan,

Link to FlytOS custom build -> https://downloads.flytbase.com/flytos/upload/nvidiatx1-custom/flytosv1.5-8rc1dadv_sensing.deb

Please uninstall current FlytOS by running this command -

sudo dpkg --purge flytcore-pe

And then install the above package by running this command:

sudo dpkg -i ./flytosv1.5-8rc1dadv_sensing.deb

Caution: I did not have M210 with me right now, and hence I could not test it, though the build has been made with advanced sensing enabled.


#13

Hello,

awesome, thank you!

Noted on the steps, I will do as instructed. Same as our side, M210 is currently used for other field test. Once we have tested the new custom build, I will update here.

Thank you again and have a nice day.