Gazebo | Ignition | Community
Ask Your Question
1

Having trouble with Gazebo9 actor: turtle won't move!

asked 2019-10-14 06:36:46 -0500

kestrel1311 gravatar image

Hello,

I asked here before to get help on using heightmap. Thanks to that, now I have a beach environment for turtle detection simulation. I am planning to spawn about 20 to 40 turtles on this beach, but it will be very painful to designate trajectory for each turtle nor it will be fun to simulate detecting turtles using Fixed-Wing UAV. I am trying to randomize turtle's behavior, so I was trying to use actor plugin in Gazebo Tutorial. When I spawn the turtle model just with pose, it works fine. However, whenever I try adding plugin to the model, it does this: image description

So now I am wondering why this turtle is just facing downwards when 1) I told it to take pose 0 0 3.14, and 2) it should have been spawned on the land not hovering over the water. I was following the tutorial, but I cannot figure out which part is exactly wrong. What am I missing here?

This is how I currently set up my code: image description

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-29 18:07:24 -0500

relffok gravatar image

updated 2020-04-29 18:09:07 -0500

This might be a little late, but if you look at the source code of the plugin (https://github.com/osrf/gazebo/blob/g...) you'll notice the animation and trajectory parts. It looks like this Plugin is specialized for the usage with the Walking Actor person (http://gazebosim.org/tutorials?tut=ac...).

You can use this source code and adapt it to your own plugin. Since you're using just a visual element without any animation, you can take those parts out and just set the pose of your actor with this->actor->SetWorldPose(pose) at the end.

This way you'll also be able to fix the issues with your rotation angles.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-10-14 06:36:46 -0500

Seen: 270 times

Last updated: Apr 29 '20