wrong map produced during multi-robot map merging
I am trying to map a Gazebo
world (see image below) using two husky
bots using the multirobotmappackage.
I have spawned two husky
bots (namespaced husky_1
and husky_2
) in the Gazebo
world.
I using two ekf_localization
nodes (husky_1/ekf_localization
and husky_2/ekf_localization
) to publish the husky_1/odom -> husky_1/base_link
and husky_2/odom -> husky_2/base_link
transforms.
I am using two move_base
nodes (/husky_1/move_base
and /husky_2/move_base
). I have set static_map
to false
.
I am also using two slam_gmapping
nodes (husky_1/slam_gmapping
and husky_2/slam_gmapping
) to achieve two things -
- publish
/map -> /husky_1/odom
and/map -> /husky_2/odom
transforms - publish
/husky_1/map
and/husky_2/map
(which is needed by themultirobot_map_package
)
Here's the thing though -
- I have spawned
husky_1
andhusky_2
at(0,0,0)
and(7,0,0)
respectively. I assume these refer to the co- ordinates in theGazebo
world. We can see theirinitial poses
in theGazebo
world in the image below.
- I am running two
exploration nodes
(from the explore_lite package), namelyhusky_1/explore
andhusky_2/explore
. This node performsfrontier_based exploration
of the world. As the bots are exploring the world, I see a significant mismatch between their positions in theGazebo
world and that in/map
fixed frame inRviz
. (See image below)
multirobot_map_package
takes the map published in/husky_1/map
and/husky_2/map
and publishes themerged_map
at/merge_map/map
. I have also set theknown_init_poses
totrue
. For each of the two bots, I set the values ofmap_merge/init_pose_x
,pose_y
,pose_z
,pose_yaw
to the same values used while spawing the bots in theGazebo
world.
Even though the maps published at /husky_1/map
and /husky_2/map
(by husky_1/slam_gmapping
and husky_2/slam_gmapping
respectively) appear to be correct, the map
published at /map_merge/map
seems to be wrong. (See images for /husky_1/map
, /husky_2/map
and /map_merge/map
below).
Why is this happening?
EDIT ONE -
On setting the known_init_poses
paramtere to false for multirobot_map_package
, I am able to produce the correct mergedmap. However, the positions of the bots in the mergedmap seem to be wrong. I am attaching the images in the Fixed frame /map
of /husky_1/map
, /husky_2/map
and /map_merge/map
respectively.
Asked by skpro19 on 2021-02-16 13:50:23 UTC
Comments