# About Bluerov2\_node

**URL:** <https://discuss.bluerobotics.com/t/about-bluerov2-node/2163>\
**Category:** BlueROV2\
**Tags:** sitl, simulate\
**Created:** [February 13, 2018, 11:07am UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163 "2018-02-13T11:07:03Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 13, 2018, 11:07am UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/1 "2018-02-13T11:07:03Z")

</div>

Hi,

I hope I’m not bothering you. I am doing my Master Thesis that is simulation and validation of an underwater system localization, probably a autonomous system in the end. So, i intend use the BlueRov2 and his ROS packages. But seems to me that some things are not implemented yet, like as lights brightness control, right? Depending on my time to do every thing of my thesis, i can contribute, so if you give me some feedback of what was not yet implemented on ROS, i will appreciate.

> [@ROS support for BlueROV2](http://discuss.bluerobotics.com/t/ros-support-for-bluerov2/1550/15):
>
> Yes, exactly, take a look in ArduSub documentation about [RC params list](https://www.ardusub.com/operators-manual/full-parameter-list.html). Like I said before: /BlueRov2/rc\_channel1: Will not work because the frame doesn’t have pitch control. Probably It’ll do something if you ARM the vehicle and use something like channels: [1500, 1600, 1500, 1500, 1500, 1500, 1500, 1500]

Best Regards,

Federico Vaz

---

<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:** [February 13, 2018, 11:59am UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/2 "2018-02-13T11:59:25Z")

</div>

> [@fredvaz](#):
>
> So, i intend use the BlueRov2 and his ROS packages. But seems to me that some things are not implemented yet, like as lights brightness control, right?

Yes, the package is in WIP, the idea is to provide a complete access of the system using ROS.

> [@fredvaz](#):
>
> Depending on my time to do every thing of my thesis, i can contribute, so if you give me some feedback of what was not yet implemented on ROS, i will appreciate.

Right now, the only thing that I can remember is:

- [Joystick Buttons](https://www.ardusub.com/operators-manual/button-functions.html)
- [[Channels \> 8]](https://www.ardusub.com/operators-manual/rc-input-and-output.html)

Let me know if you need any help with the project and contributions.

---

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 13, 2018, 12:14pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/3 "2018-02-13T12:14:35Z")

</div>

> [@patrickelectric](#):
>
> Yes, the package is in WIP, the idea is to provide a complete access of the system using ROS.

Ok, good! Why you create a new “package” and din’t “continued” with MAVROS? There are some disadvantages of MAVROS that i don’t know? 🤔

> [@patrickelectric](#):
>
> Right now, the only thing that I can remember is:
> 
> Joystick Buttons  
> [Channels \> 8]

Ok, but if i understand, [RC\_CHANNELS\_OVERRIDE](http://mavlink.org/messages/common#RC_CHANNELS_OVERRIDE) message only overrides input channels 1-8. So, to overrides above input channels 8 (9-11) it’s necessary change the MAVlink, right?

---

<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:** [February 13, 2018, 3:10pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/4 "2018-02-13T15:10:01Z")

</div>

> [@fredvaz](#):
>
> Ok, good! Why you create a new “package” and din’t “continued” with MAVROS? There are some disadvantages of MAVROS that i don’t know?

MAVROS is a generic tool to control any vehicle that uses mavlink. The disadvantages is the overhead of the package, we want to create a simple ROS application to control the ROV with the ROS abstraction layer.

> [@fredvaz](#):
>
> Ok, but if i understand, RC\_CHANNELS\_OVERRIDE message only overrides input channels 1-8. So, to overrides above input channels 8 (9-11) it’s necessary change the MAVlink, right?

No, they use mavlink messages to provide this others channels, if I’m not mistaken is with [manual\_control](http://mavlink.org/messages/common#MANUAL_CONTROL), and channels \> 9 is an abstraction with buttons. You can check the code [here](https://github.com/bluerobotics/ardusub/blob/master/ArduSub/joystick.cpp#L52).

---

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 13, 2018, 5:17pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/5 "2018-02-13T17:17:04Z")

</div>

> [@patrickelectric](#):
>
> MAVROS is a generic tool to control any vehicle that uses mavlink. The disadvantages is the overhead of the package, we want to create a simple ROS application to control the ROV with the ROS abstraction layer.

Ok, I understand. I will see better the two options.

> [@patrickelectric](#):
>
> No, they use mavlink messages to provide this others channels, if I’m not mistaken is with manual\_control, and channels \> 9 is an abstraction with buttons. You can check the code here.

It’s seems like as you said. I will organize my thoughts and decide what i will do in my project. I will keep in touch, thanks for your help! 😉

---

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 19, 2018, 12:48pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/6 "2018-02-19T12:48:29Z")

</div>

Hi @patrickelectric,

One quickly question: the topic setpoint\_velocity/cmd\_vel it’s working for you? There are some pre-requesites to send a cmd\_vel?

I did before:  
`rosrun mavros mavsys mode -c GUIDED`

But the result is a timeout. I tested with your BlueROV2 node mavros and not working with real robot.

EDIT: If i run with SITL mode works! But not with a real robot/pixhawk → mavproxy → ROS PC  
source: [Simulating Manual Control using Mavros - #2 by patrickelectric](http://discuss.bluerobotics.com/t/simulating-manual-control-using-mavros/1745/2)

Best Regards,

Federico Vaz

---

<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:** [February 19, 2018, 1:00pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/7 "2018-02-19T13:00:05Z")

</div>

Take a look in the mavlink messages, they need to have lat and lon values, check your gps connection and look for GPS\_FIX\_TYPE \> 1. If you solve this, probably you’ll be able to set the guided mode.

You are not able to set speed reference without a position system, the software derivate the position to use it as a velocity reference for the control loop.  
Take a look [here](http://ardupilot.org/copter/docs/flight-modes.html#gps-dependency) to check the modes that you can use. Besides that, you can send RC commands using the manual or stabilize mode, but if you want to have velocity or position control you’ll need to create a velocity/position control loop.

---

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 19, 2018, 4:46pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/8 "2018-02-19T16:46:46Z")

</div>

The problem is that i don’t have a GPS system, yet, on Robot. My idea is just for testing. It’s possible use the IMU like as the reference of a system position? How can i create the velocity/position control loop?

I tried `rosservice call /mavros/cmd/set_home` and set

```
"current_gps: false
latitude: 0.0
longitude: 0.0
altitude: 0.0"

```

but `success: False`

Btw, i saw [this](http://wiki.ros.org/mavros/CustomModes) and for Copter it’s possible use:

`rosrun mavros mavsys mode -c GUIDED_NOGPS`

In ArduSub didn’t work, so i think wasn’t implemented yet right?

---

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 19, 2018, 5:07pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/9 "2018-02-19T17:07:59Z")

</div>

I found the HIL Controls, so, I tried this:

```
rostopic pub /mavros/hil/gps mavros_msgs/HilGPS "header: auto
fix_type: 2
geo: {latitude: 0.0, longitude: 0.0, altitude: 0.0}
eph: 0                                             
epv: 0                                             
vel: 0                                             
vn: 0
ve: 0
vd: 0
cog: 0
satellites_visible: 0" -1

```

But without sucess 😂

---

<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:** [February 19, 2018, 7:15pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/10 "2018-02-19T19:15:46Z")

</div>

> [@fredvaz](#):
>
> It’s possible use the IMU like as the reference of a system position? How can i create the velocity/position control loop?

You’ll need to create something like NOGPS in ardusub or in ROS, and it’s very hard to accomplish it without errors. Take a look [here](https://stackoverflow.com/questions/26476467/calculating-displacement-using-accelerometer-and-gyroscope-mpu6050) about position information from inertial systems.

About HIL, I never did any test with it to send velocity commands, but probably will not work without a real position system, you can try to create your own and use HIL or pymavlink to set the GPS fix.

---

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 19, 2018, 7:29pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/11 "2018-02-19T19:29:30Z")

</div>

Ok, thanks a lot, i will do more research about that.

With your underwater GPS system works, right? But, if my memory don’t fail, you send the GPS information to ROV with other Tether cable to connect Pixhawk, yes?

---

<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:** [February 20, 2018, 12:09am UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/12 "2018-02-20T00:09:14Z")

</div>

> [@fredvaz](#):
>
> With your underwater GPS system works, right?

Yes, It’ll work with waterlinked system.

> [@fredvaz](#):
>
> if my memory don’t fail, you send the GPS information to ROV with other Tether cable to connect Pixhawk, yes ?

Correct, that’s how it works 🙂

---

<div class="post-metadata">

**Author:** ![fredvaz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/fredvaz/32/2206_2.png) [@fredvaz](https://discuss.bluerobotics.com/u/fredvaz)\
**Post date:** [February 20, 2018, 12:42am UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/13 "2018-02-20T00:42:19Z")

</div>

So, sending a GPS message (MAVLINK) to ROV by the Tether cable that we able communicate/sending controls allowing to have just one cable, i guess that is a good functionality for the future! 😛

---

<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:** [March 9, 2018, 12:30pm UTC](https://discuss.bluerobotics.com/t/about-bluerov2-node/2163/14 "2018-03-09T12:30:08Z")

</div>

Made this topic public on March 9, 2018, 12:30pm UTC


