Simulating BlueROV2 with Gazebo 11 in ubuntu 20.04 and ROS Noetic

Hello,

I’m trying to simulate bluerov2 with gazebo 11 in ubuntu 20.04 in ros noetic.

I tried Patrik’s guide from the bluerov_ros_playground repo but when I’m running the make command in ardupilot_gazebo with add_link branch I’m getting an enormous amount of errors.

If someone has solve this issue please let me know.

PS. I can’t change ros distribution due to deployment reasons but I can try to use different gazebo version through docker.

Hi @michalischatz,

The ardupilot plugin is not supported by Gazebo >= 9.x.
The plugin need be update to run in your desirable Gazebo version.

Thanks for your reply Patrick.

To clarify something, the package is responsible for the communication between ardupilot and gazebo meaning that they will be doing the same “moves”?

If that’s the case then is it possible for myself to write a script that will be doing the same process?

Hello again @patrickelectric ,

I explored a little bit the package and I found out that if I change the link to joint in the control of the sdf file, the package is able to make the link between sitl and gazebo.

However another problem emerged, I needed to change the type of joints from fixed to revolute.
This seemed to fix the problem but this made the robot unable to move due to the plugin being unable to choose in which motor to apply force (I’m not sure about this, it is a guess).
Do you have any suggestions on how to fix that.

Finally, for some reason the QGroundControl recognizes the bluerov on being upside down but I didn’t find any solution for that.

Hi @michalischatz,

However another problem emerged, I needed to change the type of joints from fixed to revolute.

The forces are applying in a fixed joint, moving to a revolute will probably have a variable torque or forces around the model.
For more information about joints you can check it here: urdf/XML/joint - ROS Wiki

Finally, for some reason the QGroundControl recognizes the bluerov on being upside down but I didn’t find any solution for that.

Are you running sim_vehicle with -f gazebo-bluerov2 ?
Also, are you using the model available in GitHub - patrickelectric/bluerov_ros_playground: Scripts to help BlueRov integration with ROS ?

The forces are applying in a fixed joint, moving to a revolute will probably have a variable torque or forces around the model.

Is there a way to change the way the forces are being applied in order to match the revolute joint otherwise the connection cannot be achieved due the error of missings joints.

Are you running sim_vehicle with -f gazebo-bluerov2 ?
Also, are you using the model available in GitHub - patrickelectric/bluerov_ros_playground: Scripts to help BlueRov integration with ROS ?

Yes, I’m running the sitl as you wrote and then the gazebo.

If you are loading the parameter and model as expected, QGC should show the correct attitude.
One thing of these things may be wrong, the XML model, the ardupilot parameter or maybe the buoyancy forces rotating the ROV body. Needs to debug and find out who to blame.

Is there a way to change the way the forces are being applied in order to match the revolute joint otherwise the connection cannot be achieved due the error of missings joints.

I’m not 100% sure if that is possible. May be… But I would recommend to use fixed joints and understand exactly what is going on with the errors and fix them.

That’s the error

When I changed the link tags to joint tags in every control the error was gone but the other problems emerged.
I think the problem here is that it’s not able to find a joint to control the robot thus the errors. If you have any suggestions let me know.
I would also check the files you suggested about the QGC.

It appears that you are running the wrong version of ardupilot_gazebo, you should be running the add_link branch. Here: GitHub - patrickelectric/ardupilot_gazebo at add_link

I tried using your branch but it was updated, the errors was too much to process. I would require 4-5 screenshots to present them all. Do you have any suspicions why the branch is not working anymore in order to check specific things.