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

merged map flickers on Rviz

asked 2019-11-18 11:51:34 -0500

davidem gravatar image

updated 2019-11-18 12:25:20 -0500

gvdhoorn gravatar image

I am running ROS Melodic, though I'm using the package multirobot_map_merge which was developed for Kinetic and Lunar. Works fine if configured, the issue is that on Rviz the resulting map is constantly flickering. You can see what I mean in this video:

flickering map

What I'm highlighting is the map that is merged in the global /map topic. I assume that the two maps robot1/map and robot2/map, coming from their respective gmapping nodes, are "updating" themselves on the /map topic rather than being correctely merged. This happens no matter how much I let the robots explore the map. In fact, the more the two maps grow, the more the flickering.

Running rosrun map_server map_saver does save the map, but just the portion that is being currently highlighted on Rviz.

I hope it's not a problem of versions: I have other packages that have been distributed for previous releases of ROS but work fine, I don't think that's the case

edit retag flag offensive close merge delete

Comments

To check (from multirobot_map_merge):

First all robots must publish map under <robot_namespace>/map, [..]

Is this the case in your setup?

gvdhoorn gravatar image gvdhoorn  ( 2019-11-18 12:26:30 -0500 )edit

Yes, they do by using each a gmapping node. These submaps are the ones that we see "flicker"

davidem gravatar image davidem  ( 2019-11-18 13:29:21 -0500 )edit

Just to be extra clear: so namespaces are being used? It's not that each robot is publishing to/map directly? Can you verify?

gvdhoorn gravatar image gvdhoorn  ( 2019-11-18 13:40:40 -0500 )edit

Yes, I have verified. /map topic is published only by robot1/map_merge and robot2/map_merge nodes, but this is the result.

davidem gravatar image davidem  ( 2019-11-18 14:08:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-18 14:16:01 -0500

gvdhoorn gravatar image

If I understand the wiki page correctly, there should only be a single instance of map_merge.

edit flag offensive delete link more

Comments

That's what I think aswell, but the init_pos-es of the robots are required, I can't pass them all at once. That made me think that multiple instances were required

davidem gravatar image davidem  ( 2019-11-18 14:42:00 -0500 )edit

<robot_namespace>/map_merge is a namespace. The map_merge there is not a node. It's just the namespace the map_merge node reads the parameters related to <robot_namespace> from.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-18 14:43:33 -0500 )edit

I am sorry, but I didn't understand what you mean. If there are multiple different namespaces (robot1, robot2, robotN) how can map_merge get all the parameters it needs from all of them? Eg the init_poses, the current namespace and so on

davidem gravatar image davidem  ( 2019-11-18 14:56:03 -0500 )edit
1

From the wiki page:

multirobot_map_merge finds robot maps dynamically and new robots can be added to system at any time. To make this dynamic behaviour possible there are some constrains placed on robots. First all robots must publish map under <robot_namespace>/map, where topic name (map) is configurable, but must be same for all robots. For each robot <robot_namespace> will be of cause different.

The node knows how to "scan" for new robots, provided they've properly namespaced their topics and parameters.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-18 15:16:38 -0500 )edit

At first, it didn't work, so I thought it was because multiple instances were necessary. But turns out that I needed an extra "world" frame that I didn't have, adding it without transforms was sufficient.

davidem gravatar image davidem  ( 2019-11-19 03:53:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-11-18 11:51:34 -0500

Seen: 303 times

Last updated: Nov 18 '19