Dear all
I would like to use the ROS standard move_base ROS Node which is a major component of the ROS navigation stack. I am hoping to use it with the (soon to be available) PX4 Rover implementation and practice with some of the ROS SLAM tools in the process.
In the meantime I’m using SITL with multicopters and OFFBOARD control. I have installed the MAVROS package and successfully run the examples on MAVROS Offboard Example · PX4 Developer Guide and the example https://pixhawk.org/dev/ros/ground_rover (although this required some modifications to the file as some of the message names have changed)
move_base publishes cmd_vel topics, and MAVROS provides a couple of topics with cmd_vel such as:
$ rostopic info /mavros/setpoint_attitude/cmd_vel
Type: geometry_msgs/TwistStamped
$ rostopic info /mavros/setpoint_velocity/cmd_vel
Type: geometry_msgs/TwistStamped
However the message type is TwistStamped as opposed to simply Twist which is what move_base expects.
This mismatch makes me suspect that using move_base and hence cmd_vel topic might not be one of the implemented and tested ways of controlling PX4 from ROS?
As I test I did a takeoff, sent cmd_vel messages and then set OFFBOARD to see what happened, and it sort of worked, the drone increased it’s height but then becomes unstable and crashes… so obviously I’m missing something here…
rostopic pub -r 10 /mavros/setpoint_velocity/cmd_vel geometry_msgs/TwistStamped '{stamp: now, frame_id: fcu}' '[[0, 0, 2.0],[0.0, 0.0, 0]]'
Am I barking up the wrong tree trying to control PX4 with cmd_vel topics?
I see from other examples /mavros/setpoint_position/local is used, can this be used with ROS navigation tools? Can anyone share an example or pointers?
I’m climbing up the learning curve with ROS so any info helpful.
Thanks
Eduardo