Livox-SDK / horizon_highway_slam

Horizon_Highway_Slam Demo in Docker
BSD 3-Clause "New" or "Revised" License
145 stars 34 forks source link

Black screen #8

Open iSIlya opened 4 years ago

iSIlya commented 4 years ago

Hello. I used the compilation method. No errors occurred during assembly. When I execute this command roslaunch horizon_highway_slam horizon_highway_slam_host.launch then I have a black screen and nothing happens.

Console output

... logging to /home/ilya/.ros/log/2c3b620a-f720-11ea-88c9-9c5c8e7960d3/roslaunch-ilyaPC-4178.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ilyaPC:39781/

SUMMARY
========

PARAMETERS
 * /Camera_Tlb: [0.9999161, 0.002...
 * /LidarToMapping: 0
 * /ifIMU: 2
 * /rosdistro: kinetic
 * /rosversion: 1.12.16

NODES
  /
    horizon_highway_mapping (horizon_highway_slam/horizon_highway_mapping)
    horizon_highway_odometry (horizon_highway_slam/horizon_highway_odometry)
    rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [4188]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 2c3b620a-f720-11ea-88c9-9c5c8e7960d3
process[rosout-1]: started with pid [4201]
started core service [/rosout]
process[horizon_highway_odometry-2]: started with pid [4218]
process[horizon_highway_mapping-3]: started with pid [4219]
process[rviz-4]: started with pid [4220]
IMU MODE:2
Extrinsic Tlb:
   0.999916   0.0026676   0.0126707    -0.05512
 -0.0025826    0.999974 -0.00672009    -0.02226
 -0.0126883  0.00668681    0.999897      0.0297
          0           0           0           1
Lidar ID:0

The "Rviz" viewport is empty

Livox-SDK commented 4 years ago

hi @iSIlya , which rosbag did you play? You can use rqt_graph to check whether each rosnode is connected correctly.

iSIlya commented 4 years ago

hi @iSIlya , which rosbag did you play? You can use rqt_graph to check whether each rosnode is connected correctly.

Thanks for your answer, but I've already figured it out. Everything is working. The only question left is how to save the result of the slam? I mean how to save the resulting final cloud

Livox-SDK commented 4 years ago

hi @iSIlya , which rosbag did you play? You can use rqt_graph to check whether each rosnode is connected correctly.

Thanks for your answer, but I've already figured it out. Everything is working. The only question left is how to save the result of the slam? I mean how to save the resulting final cloud

There is no API for map saving yet, you can subscribe the topic /laser_cloud_surround and save it as PCD file.

BellosC commented 3 years ago

Hi @iSIlya could you please share with us how you figured it out? Perhaps a step-by-step guide? Thanks

iSIlya commented 3 years ago

Hi @iSIlya could you please share with us how you figured it out? Perhaps a step-by-step guide? Thanks

I am using steps like this:

Launch order for slam in real time:

  1. Open a terminal in the ~ / horizon_ws directory (Data processing service and building slam) cd ~ / horizon_ws / && source devel / setup.bash

  2. Open another terminal in the ~ / ws_livox directory (Connecting to the scanner and receiving data) and execute the command cd ~ / ws_livox / && source ./devel/setup.sh

  3. In the first terminal (~ / horizon_ws), execute the command roslaunch horizon_highway_slam horizon_highway_slam_host.launch IMU: = 0

  4. In the second terminal (~ / ws_livox) execute the command roslaunch livox_ros_driver livox_lidar_msg.launch bd_list: = "1HDDH1200100451" or roslaunch livox_ros_driver livox_lidar_msg.launch

Slam in real time has been launched! To stop, press ctrl + C first in the second and then in the first terminal.


Startup order for recording:

1.Open a terminal in the ~ / ws_livox directory (Connecting to a scanner and receiving data) and execute the command cd ~ / ws_livox / && source ./devel/setup.sh

  1. Open the terminal in the directory where we want to save the file, I saved it here cd ~ / Livox-SDK / build / sample / lidar_lvx_file

  2. In the first terminal (~ / ws_livox), execute the command roslaunch livox_ros_driver livox_lidar_msg.launch bd_list: = "1HDDH1200100451" or roslaunch livox_ros_driver livox_lidar_msg.launch

  3. In the second terminal, execute the command rosbag record -a horizon_ghway_mapping Recording has started, to stop press ctrl + C first in the second terminal, and then in the first We have a file of this type "2020-09-16-14-39-39.bag"

  4. In order to open the file, you need to open another terminal in the ~ / horizon_ws directory cd ~ / horizon_ws / && source devel / setup.bash and execute the command roslaunch horizon_highway_slam horizon_highway_slam_host.launch IMU: = 0

  5. In the second terminal (where the record command was executed), execute the play command specifying the file rosbag play 2020-09-16-14-39-39.bag

Done!

BellosC commented 3 years ago

Thank you @iSIlya , you are awesome. I will try it and i will send feedback :)

BellosC commented 3 years ago

I did it. Thanks again @iSIlya. For anyone in trouble, perhaps this will help: https://github.com/BellosC/lidar-slam-3d-docker

You can build the image from the repository or use the one uploaded in DockerHub. Careful: It doesn't work on ARM architecture (raspberry pi).