I am trying to use SITL with Mavros to send rc override commands, something really simple. But it is not working. The funny thing is that I am using a program that was working before (in December 2021), so I guess it is probably something related to software versions. Since then, I upgrade my OS packages (ubuntu 20.04) and the ardupilot repo to use the current master version (I also tried with arduSub-stable, and a version from commit 37a1b32).
Basically, I am doing the following things:
Set mode to ‘MANUAL’
Publish override msg into the /mavros/rc/override topic, like channels: [1500, 1500, 1500, 1500, 1700, 1500, 1500, 1500, 1500, 1100, 1500, 0, 0, 0, 0, 0, 0, 0]
The result is that the vehicle is in MANUAL mode, the motors get armed but it does not move.
Am I missing anything? Any specific versions I should use?
This gets printed in the console (not sure if it is relevant) Got MISSION_ACK: TYPE_RALLY: UNSUPPORTED
I’m not familiar with the workflow. Changing params is configuration, which I’d generally expect to happen before operation rather than during live control. Assuming you use a more standard GCS application for initialisation and then hand off control to mavros once the vehicle is configured and armed, couldn’t the application continue to receive and log MAVLink messages but allow mavros to take on the role of the GCS?
And how can I do that? Setting sytem_id to 255? Something like this?
ros2 param set mavros system_id 255
or for ros1 rosparam set /mavros/target_system_id 255
So, I figure out that I can set the fcu_url as udp://:14551@:14555/?ids=255,240 and then it works. I am not sure why the value 240, I understand that 255 is the GCS sys_id.
I found the answer here
At least it worked for ROS1, but it didn’t work for ROS2 using this command to run mavros: ros2 run mavros mavros_node --ros-args --param fcu_url:=udp://:14551@:14555/?ids=255,240