0
$\begingroup$

Rosanswers logo

I have a rosbag file which is saved version of the 3d mapping with the rtabmap_ros. I could visualise the pointcloud on RVIZ and RTABVIZ, but I am not sure how to save this pointcloud as a whole and be able to view and export it on to cloudcompare or meshlab applications.

A. On RTABMAPVIZ (does not work for me) " The option in RTABMAPVIZ with File->Export 3D Cloud" doesnot work for me, because all are options in file, edit are totally disabled.

And

B. On terminal (also does not work) rosrun pcl_ros pointcloud_to_pcd input:=/rtabmap/cloud_map and changing the boolean value to true

All i could get are a red dotted outline on the ground view.

Kindly please help me out. I am on the verge of completing my project. This is one last thing to be done.

Thank you very much,

Karishma.


Originally posted by Karishma Thumu on ROS Answers with karma: 1 on 2021-06-29

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You should be able to export the point cloud to pcd using this when rtabmap is running:

rosrun pcl_ros pointcloud_to_pcd input:=/rtabmap/cloud_map

But I don't know why the Export option is grayed out, do you open the database from a saved file or you just play the bag? I think that if you do that you can't export the cloud, you need to save the dabase and open it after that using RTABMAP


Originally posted by LexGM with karma: 26 on 2021-06-30

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Karishma Thumu on 2021-07-01:
I play a rosbag file. because I need to check and try saving the pointclouds into pcd.

Terminal 1 : $ rosbag play --clock rtabmap.bag Terminal 2 : $ roslaunch rtabmap_ros demo_turtlebot_mapping.launch rviz:=true rtabmapviz:=false or $ roslaunch rtabmap_ros demo_turtlebot_mapping.launch rviz:=true rtabmapviz:=false Terminal 3 : $ rosrun pcl_ros pointcloud_to_pcd input:=/rtabmap/cloud_map, when I run this command, set of pcd files keep saving , when I viewed with pcl_viewer, I can see only the red dotted outline.

Would you please tell me, how do I do as you said, saving the database and opening it after using RTABMAP please ?

Comment by LexGM on 2021-07-01:
After executing the bag while playing the bag you should be able to see how the map is being created in real time. When the bag if finished if you close the process of rtabmap with (Control+C) the map should be saved in /.ros/rtabmap.db and if you open that with rtabmap standalone I think you can export it

Comment by Karishma Thumu on 2021-07-02:
everything is going exactly as you saidm until saving /.ros/rtabmap.db. But when I open the stabdalone RTABMAPVIZ, and click on file --->open database, it shows an empty rtabmap folder. When i played the rosbag file, with rtabmap_ros node, I closed the process with Ctrl +C , then these statements are popping up on the terminal,

rtabmapviz: ctrl-c catched! Exiting Qt app... rtabmap: Saving database/long-term memory... (located at /home/tester/.ros/rtabmap.db) rtabmap: Saving database/long-term memory...done! (located at /home/tester/.ros/rtabmap.db, 0 MB) [rosout-1] killing on exit [master] killing on exit

That 0 MB, do you think could be a reason for database not saving. But I am not sure, why it is showing as 0MB also?

Comment by LexGM on 2021-07-03:
Yea that is really strange... Can you do rosbag info of the bag and post it?

Comment by Karishma Thumu on 2021-07-05:
would you please give me you email id, i'll share you the screenshots, and the list. The rosbag info list very huge. And this morning, when I redid the whole rtabmap mapping to get a new pointcloud, when I do Ctrl+C on the demo_turtlebot_mapping.launch terminal, it is reading as databade saved with 60 MB. But when I again check the rtabmapviz, no database can be seen?

Comment by Karishma Thumu on 2021-07-05:
One thing I observed if,

  1. when I run the robot and do Ctrl+C on demo_turtlebot_mapping.launch , it says, database saved, 60 MB.
  2. when I play rosbag and do Ctrl +C on the same(demo_robot_mapping), it says , database saved , 0 MB . [(though I can see the point cloud on RVIZ and RTABMAPVIZ (arguments given along with the roslaunch commands on terminal) , while the rosbag is playing ]

Comment by Karishma Thumu on 2021-07-06:
$ rosbag play rtabmap2.bag $ roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz=:true
$ rosbag info rtabmap2.bag these are three commands I ran. The rosbag info result is as follows, (not enough space here ) path: rtabmap2.bag version: 2.0 duration: 5:47s (347s) start: Jun 28 2021 12:52:37.24 (1624877557.24) end: Jun 28 2021 12:58:24.77 (1624877904.77) size: 21.6 GB messages: 414449 compression: none [19805/19805 chunks] types: actionlib_msgs/GoalStatusArray [8b2b82f13216d0a8ea88bd3af735e619] bond/Status [eacc84bf5d65b6777d4c50f463dfb9c8] diagnostic_msgs/DiagnosticArray [60810da900de1dd6ddd437c3503511da] diagnostic_msgs/DiagnosticStatus [d0ce08bc6e5ba34c7754f563a9cabaf1] dynamic_reconfigure/Config [958f16a05573709014982821e6822580] dynamic_reconfigure/ConfigDescription [757ce9d44ba8ddd801

Comment by Karishma Thumu on 2021-07-06:
rosbag play rtabmap2.bag $ roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz=:true Result: [ INFO] [1625568888.248753158]: rtabmapviz started.

When demo rosbag from ros wiki is played, $ rosbag play --clock demo_robot_mapping.bag $ roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz=:true Result : [ INFO] [1625568949.212601009, 1368730005.390988109]: rtabmapviz started. [ INFO] [1625568949.660545402, 1368730005.835298198]: rtabmap (2): Rate=1.00s, Limit=0.000s, Conversion=0.0009s, RTAB-Map=0.0629s, Maps update=0.0072s pub=0.0000s (local map=1, WM=1) [ INFO] [1625568950.694055294, 1368730006.873512354]: rtabmap (3): Rate=1.00s, Limit=0.000s, Conversion=0.0007s, RTAB-Map=0.0631s, Maps update=0.0066s pub=0.0002s (local map=2, WM=2) [ INFO] [1625568950.713452730, 1368730006.893627195]: Creating 1 swatches

and so on, like nearly 210 clouds created are being seen on the terminal.

Comment by matlabbe on 2021-07-20:
Are there warnings on terminal saying that input topics have not been synchronized? When you play a rosbag, make sure to set ros parameter use_time_time to true, and play the bag with --clock option.

$\endgroup$

Your Answer

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