# Camera and Light Control with Mavros

**URL:** https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676
**Category:** Blue Robotics Software
**Created:** [November 1, 2018, 5:45pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676 "2018-11-01T17:45:16Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![brandonk](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@brandonk](https://discuss.bluerobotics.com/u/brandonk)
#### Post date: [November 1, 2018, 5:45pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/1 "2018-11-01T17:45:16Z")

</div>

Hey Blue Robotics,

I am interested in controlling the lights and camera tilt of the BlueROV through mavros. I have the heavy addition of the BlueROV2 so my lights and camera servo are connected to the aux outputs of the BlueROV. I was thinking to use [mavros\_msgs/ActuatorControl Documentation](http://docs.ros.org/melodic/api/mavros_msgs/html/msg/ActuatorControl.html) but I was not sure if Ardusub supported this. Also, I was not sure what group mix value I would use in the message or the range is acceptable in the controls list of the message.  
I have been looking at this github link. [GitHub - patrickelectric/bluerov\_ros\_playground: Scripts to help BlueRov integration with ROS](https://github.com/patrickelectric/bluerov_ros_playground) but there does not seem to be any implementation of what I am talking about. I was wondering if you guys have any idea about this or if this is possible right now.

Thanks,  
Brandon

---

<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: [November 3, 2018, 1:48pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/2 "2018-11-03T13:48:06Z")

</div>

Hi Darrel,

The easier way to accomplish what are you looking for is to use the manual control topic to send camera tilt and light inputs.

---

<div class="post-metadata">

### Author: ![brandonk](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@brandonk](https://discuss.bluerobotics.com/u/brandonk)
#### Post date: [November 5, 2018, 3:47pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/3 "2018-11-05T15:47:59Z")

</div>

Okay, but how do you do that because the message structure of the ManualControl message does not make it clear.

mavros\_msgs/ManualControl

std\_msgs/Header header  
float32 x  
float32 y  
float32 z  
float32 r  
uint16 buttons

Or if you know where any documentation for this would be that would be helpful.

Thank you,  
Brandon

---

<div class="post-metadata">

### Author: ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)
#### Post date: [November 5, 2018, 4:22pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/4 "2018-11-05T16:22:48Z")

</div>

See here  
[https://mavlink.io/en/messages/common.html#MANUAL\_CONTROL](https://mavlink.io/en/messages/common.html#MANUAL_CONTROL)

---

<div class="post-metadata">

### Author: ![brandonk](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@brandonk](https://discuss.bluerobotics.com/u/brandonk)
#### Post date: [November 5, 2018, 9:15pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/5 "2018-11-05T21:15:17Z")

</div>

Okay, thanks. according to that documentation in looks looks like it is for vehicle control. Is there a way to use that specifies light and camera control. Thank you.

---

<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: [November 5, 2018, 9:36pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/6 "2018-11-05T21:36:34Z")

</div>

Hi Darrel,

Check your vehicle configuration and the joystick button that is used to control the light, you can use this same button in MANUAL\_CONTROL message. There is no message for light control.

---

<div class="post-metadata">

### Author: ![brandonk](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@brandonk](https://discuss.bluerobotics.com/u/brandonk)
#### Post date: [November 20, 2018, 10:14pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/7 "2018-11-20T22:14:38Z")

</div>

Cool, thank you. I think that this will work for me

---

<div class="post-metadata">

### Author: ![brandonk](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@brandonk](https://discuss.bluerobotics.com/u/brandonk)
#### Post date: [November 20, 2018, 11:32pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/8 "2018-11-20T23:32:49Z")

</div>

I have gotten this method to work. Do you know of a way to monitor the position (or pwm signal) of the camera while it is attached to the aux outputs?

---

<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: [November 21, 2018, 11:54am UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/9 "2018-11-21T11:54:48Z")

</div>

Hi Darrel,

~~Take a look in [SERVO\_OUTPUT\_RAW](https://mavlink.io/en/messages/common.html#SERVO_OUTPUT_RAW) message.~~

The aux channels (9+) are not available due to a bug:  
[https://github.com/ArduPilot/ardupilot/issues/9799](https://github.com/ArduPilot/ardupilot/issues/9799)

---

<div class="post-metadata">

### Author: ![brandonk](https://avatars.discourse-cdn.com/v4/letter/b/3ec8ea/32.png) [@brandonk](https://discuss.bluerobotics.com/u/brandonk)
#### Post date: [November 26, 2018, 4:10pm UTC](https://discuss.bluerobotics.com/t/camera-and-light-control-with-mavros/3676/10 "2018-11-26T16:10:08Z")

</div>

Hey Patrick,

Okay, thanks for letting me know.

Brandon
