ROS2 on blueOS software

I am working on an AUV project programmed with ROS2 and for the first tests we bought a BLUEROV2 v4.
On the PC I installed ROS2 (humble) and mavros (to convert mavlink messages to ROS2).
I receive all the data from the BlueRov but when I post on topics like “/mavros/rc/overideRCin” or “/mavros/setpoint_attitude/cmd_vel” to turn on the lights or thrusters nothing happens on the BlueROV.
On the other hand I managed to arm the vehicle with mavros with the “mavros/cmd/arming” service.
Can someone help me to control my BlueROV by posting on a mavros2 topic or by using a mavros2 service?
Thanks a lot.
Morgann Le Bot

Hi @MorgannLBT,

Apologies for the delay on getting to this.

I don’t have experience with ROS, but assuming mavros is just acting as a wrapper around MAVLink messages then I would expect RC overrides to work, assuming the relevant peripherals are configured correctly in the vehicle parameters.

Commanding a velocity could also work, but I suspect it requires some form of positioning or velocity sensor to be connected (like a USBL and/or DVL). Motion commands generally require that the vehicle is armed and receiving a regular (≳1Hz) heartbeat. If that’s not sufficient it may help to send the motion commands regularly as well, since that’s at least required for manual control.


Hi @MorgannLBT

For ArduSub to accept RC overrides you will need to make sure that mavros is the GCS. The typical way to do this is to set the system_id to 255.

Here’s a long-ish thread discussing this: RC override not working with SITL ArduSub + Mavros - #8 by patrickelectric


1 Like


Thanks to both of you for your answers!

@EliotBR: for the velocity command (cmd_vel) do you know if I can simulate a GPS input? What is the name of the GPS input used (setpostion.local or

In my ROS2 terminal I launch mavros like this:
“ros2 launch mavros apm.launch gcs_url:=udp://:14570@localhost:12000”
I created an Endpoint on the BlueROV at port 14560.
And since I’m using a linux VM, I created a redirect port from port 14560 on my PC to port 14570 on my VM. That’s why I use port 14570.

Does this seem correct?

In my terminal where i launch mavros I have this error :
“[ERROR] [1684139311.296292915] [mavros.mavros_router]: link[1000] reconnect failed: DeviceError:serial:open: No such file or directory”

And I get the same error when I run the command with fcu_url:=tcp://localhost as you said in the thread you mentioned in your post.

I receive the output data well and I can arm and change the mode of the vehicle with the “arming” and “SetMode” services but I cannot control the thrusters or the lights of the ROV.

How can I set the system_id to 255?

Thank’s a lot.

Good Bye

Morgann Le Bot

Apologies for the delay on responding to this

GPS input can be simulated by sending regular GPS_INPUT MAVLink messages to the autopilot.

It seems it can be added as a query string to the connection URL.

Hello !
I finally solved my problem.
It seems that the mavros rc_override topic is well subscribed as well as other topics but we can’t drive the BlueROV by publishing on the topic.
To solve my problem, I added a new Endpoint to the BlueOS site. Then I used the python library Pymavlink to send a mavlink message to control the rc_override.
So, I made a ROS2 subscriber node that reads the rc_override topic (where I can publish messages) and sends mavlink messages (with the data contained in the rc_override) using Pymavlink.
Thanks for your answers.
NB: I’m using a new Endpoint because we can’t use mavros and pymavlink on the same one.

1 Like