wh200720041 / ssl_slam2

SSL_SLAM2: Lightweight 3-D Localization and Mapping for Solid-State LiDAR (mapping and localization separated) ICRA 2021
GNU General Public License v3.0
392 stars 71 forks source link

How to record dataset? #3

Closed e04su3184 closed 3 years ago

e04su3184 commented 3 years ago

I used realsensense viewer to record data, but it does not work. Could you share the record command? thanks a lot~

wh200720041 commented 3 years ago

Hi @e04su3184

use

rosbag record -a

more details can be found at http://wiki.ros.org/rosbag/Commandline

e04su3184 commented 3 years ago

Hi @wh200720041

Thanks for your kindly reply! But I got some problem with it ... I checked these three *Test.bag you provided which contains 5 topic /camera/color/image_raw /camera/depth/color/points /tf / tf_static /zalpha_odom .  

Here is my step :

  1. roslaunch realsense2_camera rs_camera.launch filter:=pointcloud
  2. rosbag record /camera/color/image /camera/depth/color/points /tf /tf_static But I got 3 topics only where are /camera/color/image /camera/depth/color/points /tf_static in my bag file ...and no map shown while feeding my bag file to launch ssl_slam2_mapping.launch.

    Is there something wrong with my steps? Looking forward to your reply ,thanks you

OS: Ubuntu 18.04 Device: L515

wh200720041 commented 3 years ago

can you send the node graph by

rosrun rqt_graph rqt_graph
e04su3184 commented 3 years ago

Hi @wh200720041

Thanks for your help!! I found how to run ...Here is my steps, it works for me
  1. remove bag path in ssl_slam2_mapping.launch file
  2. roslaunch realsense2_camera rs_camera.launch filters:=pointcloud
  3. roslaunch ssl_slam2 ssl_slam2_mapping.launch
  4. rosservice call /save_map

By these steps, I could get my edge_map.pcd & surf_map.pcd.

But I still don`t understand how to get my maps offline which means I record a bag at first then feeding into the program to generate a map. Is that possible?

wh200720041 commented 3 years ago

Hi @e04su3184

Similar to the demo provided (recorded rosbage), you can run

  1. roslaunch realsense2_camera rs_camera.launch filters:=pointcloud
  2. rosbag record -a

The you will have a rosbag file. Then change the bag file path in ssl_slam2_mapping.launch

  1. roslaunch ssl_slam2 ssl_slam2_mapping.launch
  2. rosservice call /save_map

Some computers may have limited computational power so I recommend to use offline rosbag. But it is fine to use online save map.

cdb0y511 commented 3 years ago

Thanks, I am also looking into your great work. A small tip for those who are troubled with rosbag record -a. https://github.com/IntelRealSense/realsense-ros/issues/1076#issuecomment-586702026