fredvaz / bluerov2

Scripts to help BlueRov2 integration with ROS and UUV Simulator
Apache License 2.0
25 stars 17 forks source link

BlueROV2 Sinks to Bottom of World #5

Open JHoldenCode opened 3 years ago

JHoldenCode commented 3 years ago

When I first implemented these files, the ROV fell right through the bottom of the world. After adding some collision to it, it now just sinks to the bottom of the world. I saw the other issue posted about needing to calculate the actual hydrodynamic parameters of the ROV. I am wondering if that has been done and someone has successfully got the ROV working in Gazebo, or if my problem may be stemming from something else.

zerodamage commented 3 years ago

Hi, the issue is that the underwater object plugin is incorrectly named:

diff --git a/bluerov2_description/robots/bluerov2_default.xacro b/bluerov2_description/robots/bluerov2_default.xacro index e7e2c6c..8fd6a44 100644 --- a/bluerov2_description/robots/bluerov2_default.xacro +++ b/bluerov2_description/robots/bluerov2_default.xacro @@ -12,7 +12,7 @@

 <gazebo>
JHoldenCode commented 3 years ago

Thank you for this suggestion. I have made these changes to the bluerov2_default.xacro file, but the same behavior seems to be happening. I have tried typing random letters into the filename to make it invalid, but the simulation runs anyway and just makes the bluerov2 sink. This makes me unsure of if the files are importing this plugin at all. Any other help would be appreciated.

zerodamage commented 3 years ago

You can check which code is targeted using rospack / roscd to verify where the code is stored. The above fix should be enough to make it float usually.

Also worth checking one of the more current forks such as: https://github.com/FletcherFT/bluerov2

zerodamage commented 3 years ago

If the plugin doesn't load, the robot will sink since there will be zero buoyancy to hold it up. Check your gazebo terminal log whether it is loaded correctly.