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

rtabmap_ros, navigation simulation on prerecorded map, pathplanning

asked 2020-05-18 09:06:42 -0500

Uwe gravatar image

updated 2020-05-23 08:53:06 -0500

Hi,

Im fairly new to ros and after a forced break of 2+ months kinda out of the loop.

Is it possible to use a prerecorded map from rtab_map to test a trajectory planned by ros navigation? I already set up the navstack on the robot, have a gazeebo and rviz model and recorded a .db map which I had transfered from the origin PC to my home PC.

My goal is to see a planned trajetory from the http://wiki.ros.org/navigation on the map in rviz or gazeebo.

Am I right, that at first I have to convert the map like written here https://answers.ros.org/question/2170... Is this also possible with a .db file which was recorded on another PC?

Sincerly, Uwe

edit retag flag offensive close merge delete

Comments

Edit: Ich should have added, that the map was created using a ZEDm Camera and a stereo configuration.

Uwe gravatar image Uwe  ( 2020-06-07 14:51:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-05-21 08:54:03 -0500

matlabbe gravatar image

Try:

$ rosrun rtabmap_ros rtabmap --Mem/IncrementalMemory false _database_path:=map.db
$ rostopic echo /grid_map

The /grid_map topic will be the static occupancy grid that the navigation stack would subscribe on. The map can be recorded from a different PC but the db version should be older or same than the rtabmap version used on the target PC (an error will be shown if the rtabmap version is older than the db version, if so, just upgrade rtabmap to latest version).

edit flag offensive delete link more

Comments

Thank you for your fast reply! I get following error while trying this: error while loading shared libraries: librtabmap_core.so.0.19:cannot open shared object file: No such file or directory For testing I used the standart rtabmap database path ~/.ros and the rtabmap.db file.

Uwe gravatar image Uwe  ( 2020-05-21 12:48:30 -0500 )edit

It looks like the linker cannot find librtabmap_core.so.0.19. How rtabmap was installed? From binaries or by source? If from source, make sure to update both rtabmap and rtabmap_ros.

matlabbe gravatar image matlabbe  ( 2020-05-22 11:03:00 -0500 )edit

I reinstalled rtabmap and rtabmap_ros from source. After entering:

rosrun rtabmap_ros rtabmap --Mem/IncrementMemory false /home/kinetic/StereoSLAM:=map

I get :

[ WARN] [1590512365.529461942]: /rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/rtabmap subscribed to (approx sync):
   /odom,
   /rgb/image,
   /depth/image,
   /rgb/camera_info

I thougth this could be normal since I work with an prerecorded map, but

rostopic echo \grid_map

Returns nothing

Uwe gravatar image Uwe  ( 2020-05-26 12:05:58 -0500 )edit

/home/kinetic/StereoSLAM:=map seems wrong to me. In my example, it is _database_path:=map.db

matlabbe gravatar image matlabbe  ( 2020-05-26 12:56:10 -0500 )edit

Sry, I thougth _database_path should be my Path to the map I created and map.db the name of the map itself. It gave me errors about the . operator as I tried it with .db . I now tried with _database_path:=map.db and it gives me the same Warning and no \grid_map. I also tried _database_path:=name_of_my_map.db and I get:

[ERROR] (time&date) VWDictionary.cpp:675::addWordRef() Not found word (Incremantally incresing number) (dict size=0)

Kinda off-topic, but I really appreciate your enormous engagement in all rtabmap related question threads across multiple platforms. Thank you! It really helps alot.

Uwe gravatar image Uwe  ( 2020-05-27 05:58:43 -0500 )edit

map.db should be the absolute path of your database. By default, rtabmap saves the map in ~/.ros/rtabmap.db, so in that case _database_path:=~/.ros/rtabmap.db. Make sure the map file you are using exists and have a map inside. You can open the database with rtabmap-databaseViewer, open Window->Graph View and see if a grid map is shown under the blue trajectory.

... and you're welcome!

matlabbe gravatar image matlabbe  ( 2020-06-02 09:31:35 -0500 )edit

Thank you. I followed the appropriate syntax now, but still run into the same Error

[ERROR] (time&date) VWDictionary.cpp:675::addWordRef() Not found word (Incremantally incresing number) (dict size=0)

I checked the database with the database viewer and it looks ok as far as i can tell.

Uwe gravatar image Uwe  ( 2020-06-05 02:09:26 -0500 )edit

I changed to the PC where I originally captured the map and now get the same Errors regarding not published topics. I captured the map in a stereo configuration and with a zedm camera and I couldn't find any Method of how to change the subscribed topics from in case I call it like:

rosrun rtabmap_ros rtabmap
Uwe gravatar image Uwe  ( 2020-06-07 15:03:04 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-18 09:06:42 -0500

Seen: 281 times

Last updated: May 23 '20