Ask Your Question
0

Convert a 3d-point cloud exportable to cloudcompare or meshlab

asked 2021-06-29 06:33:17 -0600

Karishma Thumu gravatar image

updated 2021-06-30 10:11:57 -0600

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-30 12:46:48 -0600

LexGM gravatar image

updated 2021-06-30 13:51:21 -0600

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

edit flag offensive delete link more

Comments

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 ?

Karishma Thumu gravatar image Karishma Thumu  ( 2021-07-01 07:55:26 -0600 )edit

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

LexGM gravatar image LexGM  ( 2021-07-01 13:05:21 -0600 )edit

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?

Karishma Thumu gravatar image Karishma Thumu  ( 2021-07-02 13:59:43 -0600 )edit

Yea that is really strange... Can you do rosbag info of the bag and post it?

LexGM gravatar image LexGM  ( 2021-07-03 16:32:01 -0600 )edit

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?

Karishma Thumu gravatar image Karishma Thumu  ( 2021-07-05 04:27:10 -0600 )edit

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 ]

Karishma Thumu gravatar image Karishma Thumu  ( 2021-07-05 04:38:25 -0600 )edit

$ 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

Karishma Thumu gravatar image Karishma Thumu  ( 2021-07-06 05:40:11 -0600 )edit

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 : and so on, like nearly 210 clouds created are being seen on the terminal.

Karishma Thumu gravatar image Karishma Thumu  ( 2021-07-06 06:14:48 -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

3 followers

Stats

Asked: 2021-06-29 06:33:17 -0600

Seen: 122 times

Last updated: Jun 30 '21