# RC override not working with SITL ArduSub + Mavros

**URL:** <https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046>\
**Category:** ArduSub\
**Tags:** sitl\
**Created:** [April 29, 2022, 2:59pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046 "2022-04-29T14:59:02Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![rezenders](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@rezenders](https://discuss.bluerobotics.com/u/rezenders)\
**Post date:** [April 29, 2022, 2:59pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/1 "2022-04-29T14:59:02Z")

</div>

Hello.

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:

1. Set mode to ‘MANUAL’
2. Arm motors
3. 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`

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [May 2, 2022, 7:20am UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/2 "2022-05-02T07:20:42Z")

</div>

Hi @rezenders,

I haven’t used SITL much, and haven’t used mavros at all, so I’ve asked the software team to take a look at this in case they know what’s likely going on 🙂

> [@rezenders](#):
>
> This gets printed in the console (not sure if it is relevant)  
> `Got MISSION_ACK: TYPE_RALLY: UNSUPPORTED`

It would likely be useful if you can specify the ArduSub version you’re simulating, and how you’re running your code.

> [@Set waypoints via pymavlink](https://discuss.bluerobotics.com/t/set-waypoints-via-pymavlink/8716/2):
>
> missions are not officially supported in ArduSub

and rally points are part of missions, so it seems odd to me that they’re apparently being used, especially if you’re trying to manually control the simulated vehicle.

Separately, does it work if you wait for a while? If so you might be facing something similar to [this](https://discuss.bluerobotics.com/t/ardusub-sitl-sends-pwm-1000-for-500-frames/11768).

---

<div class="post-metadata">

**Author:** ![clyde](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/clyde/32/8563_2.png) [@clyde](https://discuss.bluerobotics.com/u/clyde)\
**Post date:** [May 2, 2022, 9:51pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/3 "2022-05-02T21:51:17Z")

</div>

ArduSub only accepts RC override messages from the GCS (e.g., mavros).

> <https://github.com/ArduPilot/ardupilot/blob/2c0f52a8b7e4fff3b1c182d0df5b9de2cd45d459/libraries/GCS_MAVLink/GCS_Common.cpp#L3345>

I have worked around this 2 ways:

1. comment out this check
2. run mavros as the GCS

Neither of these methods are ideal. Perhaps others have better solutions.

Thanks,  
/Clyde

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [May 2, 2022, 11:57pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/4 "2022-05-02T23:57:25Z")

</div>

> [@clyde](#):
>
> 1. run mavros as the GCS
> 
> Neither of these methods are ideal.

I’m a bit confused as to the perceived issue here - if mavros is being used to control the vehicle, would it not effectively be the GCS?

---

<div class="post-metadata">

**Author:** ![clyde](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/clyde/32/8563_2.png) [@clyde](https://discuss.bluerobotics.com/u/clyde)\
**Post date:** [May 3, 2022, 12:35am UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/5 "2022-05-03T00:35:18Z")

</div>

True, it works, but it is a bit clunky to use mavros + ROS to do simple things like logging, arming, changing params, etc.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [May 3, 2022, 12:45am UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/6 "2022-05-03T00:45:43Z")

</div>

> [@clyde](#):
>
> it is a bit clunky to use mavros + ROS to do simple things like logging, arming, changing params, etc.

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?

---

<div class="post-metadata">

**Author:** ![rezenders](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@rezenders](https://discuss.bluerobotics.com/u/rezenders)\
**Post date:** [May 3, 2022, 9:29am UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/7 "2022-05-03T09:29:07Z")

</div>

Thanks for the replies.

> 1. run mavros as 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`

**EDIT** :  
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](https://discuss.ardupilot.org/t/sending-commands-via-mavros-setpoint-velocity-cmd-vel-in-guided-mode/51610/4)

**EDIT 2** :

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`

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [May 3, 2022, 12:15pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/8 "2022-05-03T12:15:47Z")

</div>

The vehicle will only accept RC messages from the GCS, you should be able to run both mavros and QGC with the same ID, at least that what I tested a couple of years ago working on the BlueROV2 playground for ROS.  
You can check it here: [GitHub - patrickelectric/bluerov\_ros\_playground: Scripts to help BlueRov integration with ROS](https://github.com/patrickelectric/bluerov_ros_playground)

I would also recommend to create a .lunch file to organize your startup setup.

---

<div class="post-metadata">

**Author:** ![clyde](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/clyde/32/8563_2.png) [@clyde](https://discuss.bluerobotics.com/u/clyde)\
**Post date:** [May 8, 2022, 2:12am UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/9 "2022-05-08T02:12:41Z")

</div>

I like the idea of quickly moving quickly between manual and [external] automated control. So it seems handy to have both mavros and QGC connected if possible.

I just learned that mavros will act as a proxy, with connections to both the FCU and GCS, e.g.:

```auto
mavros_node:
  ros__parameters:
    fcu_url: "tcp://localhost"
    gcs_url: "udp://@localhost:14550"

```

I will try to see if I can get this to work for my use case.

Thanks, @EliotBR

---

<div class="post-metadata">

**Author:** ![abeat](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@abeat](https://discuss.bluerobotics.com/u/abeat)\
**Post date:** [August 30, 2023, 10:15pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/10 "2023-08-30T22:15:22Z")

</div>

Hello Clyde,

which file in your workspace did you edit exactly? I commented out the lines you mentioned in the “GCS\_Common.cpp” file in my ros2 workspace, then I built again the workspace, however nothing seems to happen.

What am I missing?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![clyde](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/clyde/32/8563_2.png) [@clyde](https://discuss.bluerobotics.com/u/clyde)\
**Post date:** [August 31, 2023, 2:02pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/11 "2023-08-31T14:02:24Z")

</div>

This is how I typically build ArduSub:

```auto
cd ~/ardupilot
./waf configure --board sitl
./waf sub

```

And the typical ROS2 workspace build:

```auto
cd ~/colcon_ws/src
colcon build

```

I suppose it should be possible to embed the ardupilot directory in colcon\_ws/src, and then have colcon call waf via a CMake file, but I have not tried this.

---

<div class="post-metadata">

**Author:** ![ItsKalvik](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/itskalvik/32/14786_2.png) [@ItsKalvik](https://discuss.bluerobotics.com/u/ItsKalvik)\
**Post date:** [November 26, 2024, 11:05pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/12 "2024-11-26T23:05:49Z")

</div>

Hi Clyde!  
Did you figure out a way to use rc controls in ROS2? I am still stuck on it… I just need to control lights but looks like rc override is the only option

---

<div class="post-metadata">

**Author:** ![clyde](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/clyde/32/8563_2.png) [@clyde](https://discuss.bluerobotics.com/u/clyde)\
**Post date:** [November 26, 2024, 11:49pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/13 "2024-11-26T23:49:04Z")

</div>

Hi @ItsKalvik – do you mean using mavros to send a MANUAL\_CONTROL message to ArduSub that can control the lights (and tilt, etc.)?

I have not tried this recently, but I was curious, so I looked at the code again. Check out `Sub::transform_manual_control_to_rc_override(...)` in joystick.cpp – this will be called when a MANUAL\_CONTROL message is received. You would need to simulate a button press (brighter, dimmer, etc.) and make sure to set the appropriate BTN\_\* parameters, but I don’t see why it wouldn’t work.

---

<div class="post-metadata">

**Author:** ![ItsKalvik](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/itskalvik/32/14786_2.png) [@ItsKalvik](https://discuss.bluerobotics.com/u/ItsKalvik)\
**Post date:** [November 27, 2024, 6:02pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/14 "2024-11-27T18:02:42Z")

</div>

Yeah, you are right. I just had the wrong sys id. Setting it to 1 works with mavros, and 255 with QGC. Can’t seem to get both of them working at the same time. Probably better of removing that check. Thank you!

---

<div class="post-metadata">

**Author:** ![Luc001](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@Luc001](https://discuss.bluerobotics.com/u/Luc001)\
**Post date:** [August 22, 2025, 9:03pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/15 "2025-08-22T21:03:51Z")

</div>

Hi community, sorry for opening this conversion after a long time. I am still struggling to make it work with ros2.

My configuration is that I run sitl with “sim\_vehicle.py -v ArduSub --out udp:0.0.0.0:14551 -L RATBeach” and run mavros with fcu\_url=“udp://0.0.0.0:14551@14555/?ids=255,240” and gcs\_url=””. This is run in WSL2. I have confirmed that it works with setpoint\_velocity/cmd\_vel\_unstamped topic, but it still faces the same problem of cannot control with manual control.

Also checked that SYSID\_MYGCS = 255 and SYSID\_THISMAV = 1. Could you give me some assistance? Thank you so much!

---

<div class="post-metadata">

**Author:** ![ItsKalvik](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/itskalvik/32/14786_2.png) [@ItsKalvik](https://discuss.bluerobotics.com/u/ItsKalvik)\
**Post date:** [August 22, 2025, 9:26pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/16 "2025-08-22T21:26:14Z")

</div>

Change SYSID\_MYGCS to 1; mavros sends its commands with 1.  
Alternatively, use this pluginlists file with mavros, which tells mavros to send its commands with 255. [mavros\_control/launch/apm\_pluginlist.yaml at main · itskalvik/mavros\_control · GitHub](https://github.com/itskalvik/mavros_control/blob/main/launch/apm_pluginlist.yaml)

---

<div class="post-metadata">

**Author:** ![Luc001](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@Luc001](https://discuss.bluerobotics.com/u/Luc001)\
**Post date:** [August 22, 2025, 9:51pm UTC](https://discuss.bluerobotics.com/t/rc-override-not-working-with-sitl-ardusub-mavros/12046/17 "2025-08-22T21:51:04Z")

</div>

Finally the one solution that works! Thanks so much for the yaml file!
