ros-controls / ros_controllers

Generic robotic controllers to accompany ros_control
http://wiki.ros.org/ros_control
BSD 3-Clause "New" or "Revised" License
560 stars 526 forks source link

Publish Wheel Velocity to Hardware in DiffDriveController [Question] #612

Open Doctor-N0 opened 1 year ago

Doctor-N0 commented 1 year ago

I would like to send the desired speeds of the left and right wheels calculated in the DiffDriveController to my PLC via the OPC-UA protocol. In the diff_drive_controller.cpp in line 802 this variable is assigned to controller_statepub.

controller_state_pub_->msg_.desired.velocities[i + wheel_joints_size_] = vel_right_desired;

Therefore, I would like to ask what is the recommended approach to send this variable to the OPC-UA node? According to the documentation only the Odometry is published, and not the wheels speed, or is it? Is there a way to publish this variable so that the OPC Node can access it? Or should I import the code of the OPC-UA node directly into the controller?

Thanks a lot for your answer!