Robotics StackExchange | Archived questions

How to change frequency of amcl_pose?

I'd like to use the robot's initial pose and current pose in the decision making and path planning of the robot. However, I noticed that the amcl_pose is being updated at a very low frequency (just 0.03).

Is there a way this frequency can be changed? Or is there any better way to get the current pose of the robot?

Asked by parzival on 2019-11-07 04:58:46 UTC

Comments

Answers

You can not set rate/frequency of AMCL in Hz directly.

AMCL will update amcl_pose topic when position/orientation of robot changes for some value. So, if robot is not moving it will not publish any new messages to topic.

You can control how much the robot must move to publish new pose message with parameters update_min_d and update_min_a. You can read more about them on AMCL wiki page.

Asked by Thazz on 2019-11-13 05:29:50 UTC

Comments

Let me add that the "better way to get the current pose" is to use TF to transform the robot's frame into the frame you need, such as is done here in costmap https://github.com/ros-planning/navigation/blob/ded1abcb37815e8eb4ea2b733e1c3ec02b25e7ad/costmap_2d/src/costmap_2d_ros.cpp#L566

Asked by Carl D on 2019-11-13 13:46:12 UTC