Ask Your Question

Set offset to local costmap and rotate with robot

asked 2016-07-15 01:49:18 -0500

schultza gravatar image

updated 2016-07-15 01:51:08 -0500

Hi together,

I would like to know if there is a possibility to set an offset to the local costmap in general. The problem I am facing is, my local costmap is centered at my robots footprint, however the footprint is not centered at the actual robot it is more in the of the robot. Assuming I have a costmap of width and height of 15.0 it and my footprint of the robot is 1.5 meters off the center of the robot it causes the costmap to look way more in the back than in the front of the robot. It would be better for me if the costmap is about 2meters in the back and 13 meters (overall 15) meters in the front.

I already tried to use these parameters in the local_costmap_params.yaml


But it didn't change anything.

Is it somehow possible anyways?

Another question I got, is it possible to yaw the costmap with the robot, so it doesnt need to be square? Because as said before I mainly need the lookahead in the front of the robot, not too much to the sides and too much to the back.

Thanks in advance

edit retag flag offensive close merge delete


costmap_2d has a parameter called robot_base_frame, I think there might be something wrong with this parameter. If the frame you set for this parameter is not the center of the footprint, well, the costmap won't be in the center of the footprint.

Arwen gravatar image Arwen  ( 2016-07-15 02:20:55 -0500 )edit

Yes, I saw this parameter. But my base frame is actually not in the center of the robot (ackermann kinematics) and also my local planer uses this parameter for controlling the platform, so I cant change this.

schultza gravatar image schultza  ( 2016-07-18 01:53:31 -0500 )edit

Sorry, I didn't understand what is the exact problem with setting the base frame in the center of the robot, especially the part that you said the ackermann kinematics. Can you please explain more?

Arwen gravatar image Arwen  ( 2016-07-18 06:09:32 -0500 )edit

Hi, by setting the parameter robot_base_frame in the center, also my local planner takes this point for planning with the vehicle, but with ackermann kinematics this in not correct, because the center of rotation is at the rear axle and not in the center of the robot.

schultza gravatar image schultza  ( 2016-07-25 03:16:55 -0500 )edit

Have you found any solution about the rotation of the costmap, so that it aligns with the robot orientation?

kosmastsk gravatar image kosmastsk  ( 2021-03-01 11:42:52 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2016-07-26 06:03:53 -0500

Procópio gravatar image

Regarding the center of your local costmap, a quick solution would be to move your /base_link frame, which I suppose is currently in the center of the robot, towards the rear axle.

Another solution would be to create a new frame located at the rear axle and use it instead of the /base_link for your local_costmap.

edit flag offensive delete link more

answered 2016-08-02 19:13:29 -0500

Mark Rose gravatar image

I understand that you want to calculate odometry for Ackermann steering based on a frame that is centered between the rear wheels. But for planning purposes, the base_link frame is more convenient if it is in the middle of the robot's footprint. (The local map works like you want, for example.) Best to define base_link in your URDF as the middle of the robot footprint (however you define that), as well as a frame for midway between the rear wheels at a fixed offset from base_link, perhaps rear_midpoint_link. Then you can publish odometry relative to rear_midpoint_link. (Or transform yourself prior to publishing.)

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



Asked: 2016-07-15 01:49:18 -0500

Seen: 857 times

Last updated: Aug 02 '16