How can I manually insert an obstacle into a map?

asked 2020-02-26 07:01:02 -0500

Monjola gravatar image

Im using two turtlebots operating from two different masters (yes). I go into an area with one robot and use SLAM to build the map, then I want to go to that robot with my other robot. I am sending the map and my position over the network outside of ROS, and then go to an offset position from the first robot with the second robot. However my problem is that when I run the navigation software, the first robot is not an obstacle in the map, and since im not running slam, just amcl navigation, the second robot doesnt plan a path around the first robot, they just collide. What I wanna do is somehow insert an obstacle to the static map that takes the first robots position and is radius and says thats occupied space in the map.

edit retag flag offensive close merge delete

Comments

is this all in a simulator or real world ?

Fetullah Atas gravatar image Fetullah Atas  ( 2020-02-26 18:52:23 -0500 )edit

Hi @Monjola,

Since you have the relative position in the map of the first robot given by the SLAM algorithm, you can process the occupancy grid published by the SLAM node and insert obstacles taking this relative pose of the first robot in the map.

Weasfas gravatar image Weasfas  ( 2020-02-27 07:23:57 -0500 )edit