Home        Store        Docs        Blog

How to turn on the BlueROV2 lights with ROS?

(Sven) #1

Hi all,

in the last few days I made my first steps with the BlueROV2, ROS and the BlueROV-ros-pkg package.
Everything is running smooth and I can control all the thruster with the joystick in the right order. But I find no possibility to control the light signal on Channel 7 of the Pixhawk. I was looking in the code from the teleop_joy node and notice that this node interact with the Mavros/rc/override message. The problem is that there is no channel to control the lights of the BlueROV2, also there is no free channel to add this feature. How can I solve this problem? I think I am not the first one, how want to control all features of the BlueROV2 with ROS, so there must be a solution for it and I am only to stupid to find it.

Can somebody help me to fix this problem …


(Jacob) #2

This capability is not built into the bluerov ROS packages. The lights function of ArduSub has been added since the last update to the ROS packages.

The problem is that there is no channel to control the lights of the BlueROV2, also there is no free channel to add this feature.

This is correct. the RC_CHANNELS_OVERRIDE message only overrides input channels 1-8, and the input channel for the lights is generally channel 9. There are a lot of ways to reconfigure things internally to achieve what you want, but the easiest is to probably use the MANUAL_CONTROL message rather than the RC_CHANNELS_OVERRIDE message to send pilot inputs. You can see how the MANUAL_CONTROL message is handled by ArduSub here.


(Sven) #3

Hi Jacob,
thanks for your reply.
I have read the code you mention above but I have still some questions.
When I understood it right, then the message includes a 16 bit variable for transmitting the states of 16 single buttons, that is great.
In the default configuration the light control is on bit 13 - lights down and bit 14 - lights up (count from zero). So I think I only need to send a MANUAL_CONTROL Message with the corresponding bits set to control the lights. Ok, so far everything is good but when I look in the MavROS node I recognized that there isn’t a topic for MANUAL_CONTROL (or no topic where I can publish my messages). I found a topic called /mavros/manual_control/control but this is only a topic where MavROS is published to but not subscribing. How can I send the MANUAL_CONTROL Message? Do I have to address the MavLink node directly or how can I do it?
The seconded question I have is, if it is possible to use both the RC_CHANNELS_OVERRIDE and the MANUAL_CONTROL, because I still want to control all 5 degrees of freedom of the BlueROV2 and the MANUAL_CONTROL message only offer the possibility to control 4 axis.


(Jacob) #4

You could modify teleop_joy.cpp to publish MANUAL_CONTROL messages. As far as using RC_CHANNELS_OVERRIDE and MANUAL_CONTROL simultaneously, this will not work. MANUAL_CONTROL will overwrite whatever channels were sent by RC_CHANNELS_OVERRIDE.


(Sven) #5

OK but there isn’t a topic with the message type MANUAL_CONTROL. There are only the setpoint topics and the rc override topic. I think isn’t possible to publish messages with the wrong message type on a topic.

What can I do else, to get control over the lights and over all the axis of the BlueROV2 with ROS?


(Jacob) #6

You should be able to use the MAVLink library to pack and send MANUAL_CONTROL messages to the autopilot, you might have to write your own topic/publisher/subscriber. I would recommend reaching out to the mavros developers on gitter for more information on how to go about this.

(Sven) #7

Hi Jacob,
thanks for the advice but I think I solved the problem already. I am still using the RCOverride Message but I change the Ardusub software a little bit. Because I always want to use the manual control mode of the ROV and make the depth control and stabilization by my own code in MatLab, I don’t need the channel for mode change via RCOverride, so I now use this channel to control the lights of the BlueRov2.

But anyway thanks for your help!