Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

Change radius of collision (cylinder) C++

$
0
0
Hello Guys, how can I change the radius of a cylinder (only collision, not the visual part) in a C++ plugin. I load a simple model of a cylinder as a link in a world sdf file called cylinder.world. The cylinder and also my plugin are loaded properly (i check the plugin by printing a simple message on the terminal when it is started). I would like to change the size of the cylinder (more exactly the radius) now during runtime (for example after 100 Iterations of the Simulation) by accessing the radius (collision tag) in my plugin. As i first start with a cylinder that has the same dimensions in the visual as in the collision tag and i decrease the radius of the collision element in my plugin after some time, it should look like the cylinder is diving into the ground (although of course a closer look on the collision element shows that there is just a smaller cylinder due to the plugin). I have tried a lot to achieve this by using functions of gazebo API, but nothing really worked. (http://gazebosim.org/api/dev/classgazebo_1_1physics_1_1CylinderShape.html) I am using gazebo 7. I hope I can get some help from you. I would be really happy about a working example showing the functionality I would like to achieve! Thanks a lot for every kind of help!

Viewing all articles
Browse latest Browse all 7017

Trending Articles