Send velocity command through Mavros


We are working on a Rover with Pixhawk 1 and Odroid xu4 as companion board. Mavproxy and mavros are running fine with those commands:

sudo --master=/dev/ttyUSB0 --baudrate 921600 --out udp: --out udp: --console

roslaunch mavros apm.launch fcu_url:=udp://:14550@

After arming and setting GUIDED mode, rostopic echo /mavros/state returns:

         secs: 152xxxxxx
         nsecs: 332xxxxxx
     frame_id = ' '
connected: True
armed: True
guided: True
mode: "GUIDED"
system_status: 5

At this point, we are able to echo publishing topics such as /mavros/imu/data . But when we try to publish velocity commands on /mavros/setpoint_velocity/cmd_vel with:

rostopic pub -r 10 mavros/setpoint_velocity/cmd_vel geometry_msgs/TwistStamped "{header: auto, twist: {linear: {x: 1.0, y: 1.0, z: 1.0}, angular: {x: 0.0, y: 0.0, z: 1.0}}}"

Nothing happens: /mavros/rc/out does not vary at all. We have seen several posts on various forum, but no one can explain why it doesn’t work ?



As state on the wiki, does your rover work without ROS ? calibrate it and make learn how to use ArduRover first ! (with mission planner or another gcs you can control that GUIDED mode is working and the starting sequence).
Here you get system_status: 5 == MAV_STATE_CRITICAL so something is wrong .

Indeed, we didn’t realize that we had some RC binding and GPS issues. After fixing that, we are now able to send velocity command but only on channel 1. However, even in MANUAL mode we have troubles to have a proper output mix, I will post another topic to describe it.
Thank khancyr for your input