Ask Your Question
0

rtabmap_ros 3D map PointCloud2 transfer ROS Master_Slave

asked 2019-11-06 08:27:53 -0600

acp gravatar image

Dear people.

I do have the following devices:

- JetsonTX2
- Pixhawk 4 mini
- ZED stereo vision system
- A ThinkPad laptop

I do have setup a ROS master slave system. The Jetson is taken as a master and the laptop is taken as a slave. Both communicates over wireless. I am measuring the size of the transmited topic /zed/rtabmap/cloud_map . In the following picture shows how the size of the cloud is growing with the distance. It seems to be as if the whole cloud of the 3D map is transmitted as it grows. I am using rtabmap.launch

<group ns="/zed/">
      <include file="$(find rtabmap_ros)/launch/rtabmap.launch">

     </include>
   </group>

Just wondering if there is a parameter that allows to transmit the changes and not the whole cloud.

Any help I appreciate it.

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-07 14:15:36 -0600

matlabbe gravatar image

Try map_assembler node (source code) on remote computer to subscribe only to latest data added to map and re-assemble all rtabmap output maps remotely:

$ rosrun rtabmap_ros map_assembler _Grid/CellSize:=0.1 mapData:=/zed/rtabmap/mapData

I also added a very simple python script (less flexible than map_assembler) here to subscribe only to latest grid data and the graph, then assembling the map remotely: https://github.com/introlab/rtabmap_r...

$ python assemble_local_grids.py rtabmap/mapGraph:=/zed/rtabmap/mapGraph rtabmap/local_grid_obstacle:=/zed/rtabmap/local_grid_obstacle

cheers,
Mathieu

edit flag offensive delete link more

Comments

Hi Mathieu, Thank you for the answer.

I have run

$ python assemble_local_grids.py rtabmap/mapGraph:=/zed/rtabmap/mapGraph rtabmap/local_grid_obstacle:=/zed/rtabmap/local_grid_obstacle

The I can see on the screen:

Received node 1 (2378 pts) at xyz=-0.00 -0.00 0.03, q_xyzw=0.00 0.14 0.00 0.99 (Map: Nodes=1 Points=2378 Assembled=2378 Update=26ms)
Received node 1 (2378 pts) at xyz=-0.00 -0.00 0.03, q_xyzw=0.00 0.14 0.00 0.99 (Map: Nodes=1 Points=2378 Assembled=4756 Update=26ms)
Received node 1 (2378 pts) at xyz=-0.00 -0.00 0.03, q_xyzw=0.00 0.14 0.00 0.99 (Map: Nodes=1 Points=2378 Assembled=7134 Update=37ms)

I can see that the Points are constant but the Assembled are adding the previous Point to the new ones, so this Assembled points are growing quite ...(more)

acp gravatar imageacp ( 2019-11-08 02:07:55 -0600 )edit

In rtabmap, cloud_map is assembled in a similar way, but each time we add a new cloud, the assembled one is voxelized (if we don't move, the cloud wouldn't grow). If the example was in c++, I would say just use a pcl::VoxelGrid filter, not sure if this function is available in python-pcl. You can try the map_assembler approach then, for which the cloud is voxelized, exactly like cloud_map.

matlabbe gravatar imagematlabbe ( 2019-11-16 08:08:16 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-11-06 08:27:53 -0600

Seen: 19 times

Last updated: Nov 07