dji-sdk / Onboard-SDK-ROS

Official ROS packages for DJI onboard SDK.
445 stars 309 forks source link

How can i get camera data with m300 in ROS? #501

Open HYUiv-JinYoung opened 2 years ago

HYUiv-JinYoung commented 2 years ago

I'm using OSDK ROS 4.1.0 and trying to get camera image data with m300 in ROS

I executed launch file with ' roslaunch dji_osdk_ros dji_vehicle_node.launch ' then i can find topics like /dji_osdk_ros/stereo_240p_down_back_images but i couldn't find any signals about that topic

I saw that i have to call setup_camera_stream service but when i execute -> rosservice call setup_camera_stream "cameraType: 1 start: 1" and I get an error like -> ERROR: service [/setup_camera_stream] responded with an error:

please help me what i to do I am beginner about programming and m300 If you solve my problem, i will very grateful about you and pray everyday for you

ibnHatab commented 2 years ago

I second this request. It looks like stereo_240p_down_back_images implemented for m210 but not m300rtk. In the Onboard-SDK samples 240p image obtained using vehicle->advancedSensing->subscribePerceptionImage which select m300 call to perception->subscribePerceptionImage (see AdvancedSensing::subscribePerceptionImage). In ROS it uses vehicle->advancedSensing->subscribeStereoImages which doesn't switch from m210 and m300.

SDK ROS has to switch from subscribeStereoImages to subscribePerceptionImage then both platforms will work correctly.