0
$\begingroup$

Rosanswers logo

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


Originally posted by davidem on ROS Answers with karma: 83 on 2019-11-18

Post score: 0


Original comments

Comment by gvdhoorn on 2019-11-18:
To check (from multirobot_map_merge):

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

Is this the case in your setup?

Comment by davidem on 2019-11-18:
Yes, they do by using each a gmapping node. These submaps are the ones that we see "flicker"

Comment by gvdhoorn on 2019-11-18:
Just to be extra clear: so namespaces are being used? It's not that each robot is publishing to/map directly? Can you verify?

Comment by davidem on 2019-11-18:
Yes, I have verified. /map topic is published only by robot1/map_merge and robot2/map_merge nodes, but this is the result.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by gvdhoorn with karma: 86574 on 2019-11-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by davidem on 2019-11-18:
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

Comment by gvdhoorn on 2019-11-18:
<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.

Comment by davidem on 2019-11-18:
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

Comment by gvdhoorn on 2019-11-18:
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.

Comment by davidem on 2019-11-19:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.