Onboard-SDK-ROS icon indicating copy to clipboard operation
Onboard-SDK-ROS copied to clipboard

New interface velocity control missing

Open lorenzave opened this issue 5 years ago • 7 comments

Hi Support, the main reason we are now blocked from developing using the "new interface" (vehicle_node) it that is missing the velocity setpoint topics, which are the following:

/dji_osdk_ros/flight_control_setpoint_ENUposition_yaw
/dji_osdk_ros/flight_control_setpoint_ENUvelocity_yawrate
/dji_osdk_ros/flight_control_setpoint_generic
/dji_osdk_ros/flight_control_setpoint_rollpitch_yawrate_zposition

Are you planning to include these in future releases? Or is the plan only to use Flight Tasks (local position control) and/or Waypoint missions?

This feature is very important for us as all our codebase depends that we can set a specific velocity for the platform.

If it's not gonna be included is it possible to use the old interface along with the new? We are interested in using/grabbing the H264 stream and controlling with velocity setpoints. What is your proposed solution for this?

Thanks.

lorenzave avatar Sep 07 '20 11:09 lorenzave

To utilize the the velocity setpoint topics we'll also need the topics from the vehicle node to publish information and not just being advertised. E.g. gps_position is only advertised but not publishing.

Could you also elaborate the plans for this?

ghost avatar Sep 07 '20 14:09 ghost

Agent comment from kyle.cai in Zendesk ticket #38904:

Dear developer ,

Thank you for contacting DJI.

Sorry, there is no relevant information available at this time. It is recommended that you continue to follow the ROS SDK updates. About **the velocity setpoint topics, ** maybe you can refer to the reply in issue #388.

Thank you for your understanding and support, hope you have a nice day.

Best Regards, DJI SDK Support Team

dji-dev avatar Sep 08 '20 06:09 dji-dev

Regarding missing velocity control you do not answer the question in #388. Please elaborate on your plan or the lack thereof for populating topics and exposing velocity control in ROS.

ghost avatar Sep 08 '20 06:09 ghost

Agent comment from kyle.cai in Zendesk ticket #38904:

Dear developer ,

Thank you for contacting DJI.

Sorry there is no more info about the plan about the topics . and as replied in #388 , suggest that you fill in the requirments of feedback, we will submit it to evalute.

Thank you for your understanding and support, hope you have a nice day.

Best Regards, DJI SDK Support Team
inline-2130644950.png

dji-dev avatar Sep 08 '20 06:09 dji-dev

Had the same issue. I guess the devs are trying to move away from subscribers to only services. There is a not very pretty but simple way you can "patch" it for now. Just add the desired subscriber to vehicle wrapper, copy the functions from file dji_sdk_node_control.cpp in obsoleted:

void DJISDKNode::flightControl(uint8_t flag, float xSP, float ySP, float zSP, float yawSP);
void DJISDKNode::flightControlVxVyVzYawrateCallback()
or
void DJISDKNode::flightControlRollPitchPzYawrateCallback()
depending on the frame 

and use

Vehicle* vehicle = ptr_wrapper_->getVehicle(); 

to get the vehicle and pass it in the function like in the old version. Hope this helps a bit!

wiktorpi avatar Sep 11 '20 07:09 wiktorpi

Will publishing to /dji_osdk_ros/flight_control_setpoint_ENUvelocity_yawrate work in 4.0 or not? @wiktorpi how do you instantiate ptr_wrapper_ in 4.0? I am running the vehicle node as a separate node

carriojazz avatar Sep 19 '20 23:09 carriojazz

@carriojazz Using the old interface works as it did before in every way we have tested. The new interface is not even closed to be finished. The publishers are just advertising the topic but the messages aren't being published, just IMU, the rest GPS/battery, and whatever is empty. Frames and h264 stream work. There are no setpoint topics to publish too. We haven't dug into it yet but we are planning to implement that as it is easily exposed on the OSDK and it seems DJI is moving away from that to their Waypoint Mission v2. Are you trying to run both wrappers at the same time?

@wiktorpi Also gimbal control now is a service in the new wrapper... I don't understand this move from DJI, may things make sense with services but many others just don't... Although the new interface seems to be unfinished work and they released it just to have something in time for the M300.

lorenzave avatar Sep 21 '20 06:09 lorenzave