ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Updating origin of local costmap when robot moves to a different floor

asked 2021-02-18 12:08:47 -0500

shlock gravatar image

updated 2021-02-18 12:11:55 -0500

Hello, I am trying to get a robot to move through different floors. Currently I can change maps (killing and relaunching map_server) but the problem is the local costmap doesn't update when the robot moves to a different floor. I think it might be because the 'z' of origin of the local costmap stays at 0 even when my robot's 'z' changes. This leads to the costmap being not cleared. I have attached an image of how it looks in rviz. How can I get the costmap to clear or to get the costmap to follow the robot? My global_frame for local_costmap_params is dbot/odom image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-02-19 04:49:53 -0500

shlock gravatar image

Okay so after looking for several ways to get the local costmap to stay on the same plane as the map, i tried changing the global_frame from odom to map aaand it was able to get the costmap on the same plane as the map and it updated. Can anyone tell me what the side effects of this will be?

edit flag offensive delete link more

Comments

1

there's a service to clear costmap, you might want to use it

drtritm gravatar image drtritm  ( 2021-02-19 09:29:53 -0500 )edit

Update: okay turns out my max. obstacle height was set too low so the robot wasn't marking new obstacles when at higher floors after clearing. Now I increased the max. obstacle height in the common params and it is clearing and updating correctly now.

I tried using that but it didn't actually clear it. The global_frame changing didn't work as well as the robot just wouldn't stop even after coming very close to the goal. I'm guessing it was because of the difference between the z of the local costmap and the map. I tried adding a transform between base link and odom with a fake_odom frame but didn't work. What i'm trying to do is get the local costmap to follow the robot and not go 8m downwards when the robot moves to a different floor.

shlock gravatar image shlock  ( 2021-02-19 10:35:48 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-02-18 12:08:47 -0500

Seen: 276 times

Last updated: Feb 19 '21