Gazebo | Ignition | Community
Ask Your Question

How to make an actor do path planning

asked 2018-02-11 16:46:21 -0500

leept gravatar image

updated 2018-02-11 17:40:17 -0500


I am trying to build a gazebo environment, in which a walking person actor needs to do path planning in the given world, meaning generating random target and find a relatively smooth path towards it and avoid obstacles. I have two questions:

  1. I modified and use it as the basic world, with walls around. With the code example, I use the same obstacle handler function. But the actor just goes through the wall. I checked that each wall is a collision model, and the ignore_obstacles in the actor part doesn't include those wall models. I am very confused why the actor doesn't consider wall as an obstacle.

  2. What should I do if I want to make the actor do path planning in the given world? I didn't find the api that can get the occupancy map, and here is the world document. Is it possible to use move_base on actor? I can set a ros param which includes the map.yaml, thus get the cost map.

I am fairly new to gazebo and I will appreciate if you can shed some light on this or share some similar examples.

I am using Gazebo 8.

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-12 10:21:24 -0500

chapulina gravatar image

I use the same obstacle handler function. But the actor just goes through the wall.

If you take a look at the ActorPlugin::HandleObstacle function, all it checks is whether the actor is within 4 m of a model's origin. That's probably not very appropriate for walls, even if each wall is a separate model. Walls tend to be long and that function is more appropriate for point obstacles.

Here's a function which checks against the bounding box of an obstacle, but beware that in my experience, Gazebo may return bad bounding box for some meshes, but should work fine if each of your walls consists of a box.

edit flag offensive delete link more


Thank you!

leept gravatar imageleept ( 2018-02-13 00:58:07 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-02-11 16:46:21 -0500

Seen: 2,309 times

Last updated: Feb 12 '18