BlueROV2: updated control (attitude and position), model
Solved Problem
Adds support for BlueROV2 Heavy and cleans the control stack for UUVs.
Solution
- Refactor UUV_ modules
- Refactor BlueROV2 model
Changelog Entry
For release notes:
Feature: bluerov2 support
Alternatives
None I can think of?
Test coverage
SITL testing. Will provide logs once I clean this.
https://github.com/user-attachments/assets/ded12d71-22e1-4af4-a4e1-a2f69aab93a7
@Pedro-Roque I'm not sure what users need to know about this, but if there is anything it would probably go here https://docs.px4.io/main/en/frames_sub/bluerov2.html
@Pedro-Roque I'm not sure what users need to know about this, but if there is anything it would probably go here https://docs.px4.io/main/en/frames_sub/bluerov2.html
I think it's mostly correct there,
Two Points:
-
The current implementation has no way of controlling roll/pitch in stabilization mode, with the controller. It is set to 0, when in stabilization mode. Which is, when using the BlueROV2, not always desired. Maybe we can add a system, so that xy and ab(on a classical Logitech controller) can control roll/pitch in some way, so that a constant Roll/pitch is set. Are there reasons not to do that?(can be added later)
-
The Buoyancy system currently counterweights each link. This behavior is very often not the case on an underwater vehicle. There is mostly some kind of payload on the robot. Therefore, when adding a small weight under the base_link to simulate that, the behavior of the BlueROV doesn't change. I coded a small change to the two files, which would apply the force only on the first link. Then everyone can use a weight link, to have the behavior the way they want. Additionally, I would disable the buoyancy force, when the main link is at z>0. This can be a parameter that is set. I can add that later.
But in my opinion, we could also just use the standard buoyancy plugin, and make a circular collision based on the weight of the BlueROV2, around the basic_link, and once compute the radius for that sphere. This would be the same behavior as using this plugin, except for the random factor. I don't fully see the benefit, and for me the gazebo plugin worked.
Two Points:
- The current implementation has no way of controlling roll/pitch in stabilization mode, with the controller. It is set to 0, when in stabilization mode. Which is, when using the BlueROV2, not always desired. Maybe we can add a system, so that xy and ab(on a classical Logitech controller) can control roll/pitch in some way, so that a constant Roll/pitch is set. Are there reasons not to do that?(can be added later)
- The Buoyancy system currently counterweights each link. This behavior is very often not the case on an underwater vehicle. There is mostly some kind of payload on the robot. Therefore, when adding a small weight under the base_link to simulate that, the behavior of the BlueROV doesn't change. I coded a small change to the two files, which would apply the force only on the first link. Then everyone can use a weight link, to have the behavior the way they want. Additionally, I would disable the buoyancy force, when the main link is at z>0. This can be a parameter that is set. I can add that later.
But in my opinion, we could also just use the standard buoyancy plugin, and make a circular collision based on the weight of the BlueROV2, around the basic_link, and once compute the radius for that sphere. This would be the same behavior as using this plugin, except for the random factor. I don't fully see the benefit, and for me the gazebo plugin worked.
Hi @timzarhansen ! Thanks for the inputs! Here go my comments:
- In stabilized mode, we can control the target roll and pitch with the right joystick, yaw and thrust in X direction with the left one. Did you mean in position mode? If yes, I think we could try to use the D-pad for that, what do you think?
- I agree. I think enutral buoyancy like this is difficult to completely achieve in underwater, but in the other hand, that is what the neutral-buoyancy state should be (after careful calibration). I'm happy to have it using the buoyancy system from gazebo once we have parameters that somewhat match the vehicle (and this should be a simple fix on the model.sdf in PX4-gazebo-models ).
Let me know what you think of option 1.
Two Points:
- The current implementation has no way of controlling roll/pitch in stabilization mode, with the controller. It is set to 0, when in stabilization mode. Which is, when using the BlueROV2, not always desired. Maybe we can add a system, so that xy and ab(on a classical Logitech controller) can control roll/pitch in some way, so that a constant Roll/pitch is set. Are there reasons not to do that?(can be added later)
- The Buoyancy system currently counterweights each link. This behavior is very often not the case on an underwater vehicle. There is mostly some kind of payload on the robot. Therefore, when adding a small weight under the base_link to simulate that, the behavior of the BlueROV doesn't change. I coded a small change to the two files, which would apply the force only on the first link. Then everyone can use a weight link, to have the behavior the way they want. Additionally, I would disable the buoyancy force, when the main link is at z>0. This can be a parameter that is set. I can add that later.
But in my opinion, we could also just use the standard buoyancy plugin, and make a circular collision based on the weight of the BlueROV2, around the basic_link, and once compute the radius for that sphere. This would be the same behavior as using this plugin, except for the random factor. I don't fully see the benefit, and for me the gazebo plugin worked.
Hi @timzarhansen ! Thanks for the inputs! Here go my comments:
- In stabilized mode, we can control the target roll and pitch with the right joystick, yaw and thrust in X direction with the left one. Did you mean in position mode? If yes, I think we could try to use the D-pad for that, what do you think?
- I agree. I think enutral buoyancy like this is difficult to completely achieve in underwater, but in the other hand, that is what the neutral-buoyancy state should be (after careful calibration). I'm happy to have it using the buoyancy system from gazebo once we have parameters that somewhat match the vehicle (and this should be a simple fix on the model.sdf in PX4-gazebo-models ).
Let me know what you think of option 1.
- Yea that's an option. Should be easy.
- lets keep it like that, if others agree. Can be changed later again, if it's not necessary anymore.
Some hardware testing:
https://github.com/user-attachments/assets/f5535c41-af73-4046-b419-02f3b5da21a9
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-june-25-2025-team-sync-and-community-q-a/46161/3
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-june-25-2025-team-sync-and-community-q-a/46161/1
https://github.com/user-attachments/assets/362423d9-d22e-41f2-8437-a61f8d977075
Some additional testing on BlueROV. We needed to change a few parameters gains in the controller to make it work smoothly, since our Robot is heavier and the center of mass is lower due to the extension on the bottom. Manual and stabilization are working properly, position I couldn't test yet. Will do that soon.
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-july-2-2025-team-sync-and-community-q-a/46266/3
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-july-16-2025-team-sync-and-community-q-a/46513/3