Ask Your Question
0

local_costmap "ghost objects"; Restarting move_base

asked 2017-07-26 19:01:35 -0600

xnick77x gravatar image

Hey all,

I am running the ROS naviagation stack with a 360 degree lidar. After running a couple paths. the local costmap from the lidar seems to fill up with "ghost objects" until the robot can no longer generate a path to the destination. I looked for methods to clear or reset to local costmap, but didn't find much on it, so my new approach is to restart the move_base node.

I want to restart the move_base node from where I send the action_lib goal, so that the local_costmap can restart. I found this; however I have not found out how to set parameters for the node. I also would prefer not to write the path to the .launch file (the second example) to avoid having to manually write the path on each new robot/system.

TLDR; Is there a method to clear the local costmap? Or is there a good way to restart the move_base node programmatically from where I send an actionlib goal?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2017-07-27 01:03:58 -0600

Procópio gravatar image

Yes, there are better ways to clear the costmaps. From the command line you can:

rosservice call /move_base/clear_costmaps

And you can also call servcies from your code, as explained here.

I also suggest you create another question with more details about the "ghost objects", with images and your costmap configurations, so maybe you can address the origin of your problem.

edit flag offensive delete link more
1

answered 2017-11-15 05:08:46 -0600

biglotusturtle gravatar image

updated 2017-11-15 16:29:06 -0600

jayess gravatar image

For anyone looking how to do this via c++, here you go:

std_srvs::Empty emptymsg;
ros::service::call("/move_base/clear_costmaps",emptymsg);
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-26 19:01:35 -0600

Seen: 659 times

Last updated: Nov 15 '17