loam_velodyne icon indicating copy to clipboard operation
loam_velodyne copied to clipboard

Public place to ask questions, post and discuss issues

Open laboshinl opened this issue 8 years ago • 177 comments

laboshinl avatar Apr 11 '16 14:04 laboshinl

The mapping is working, but in some point the pointcloud suddenly returns to the initial position and I get this error:

  laserOdometry: /build/buildd/pcl-1.7-1.7.1/kdtree/include/pcl/kdtree/impl/kdtree_flann.hpp:136: int pcl::KdTreeFLANN<PointT, Dist>::nearestKSearch(const PointT&, int, std::vector<int>&, std::vector<float>&) const [with PointT = pcl::PointXYZI; Dist = flann::L2_Simple<float>]: Assertion `point_representation_->isValid (point) && "Invalid (NaN, Inf) point coordinates given to nearestKSearch!"' failed.
    [laserOdometry-2] process has died [pid 10107, exit code -6, cmd /home/vicky/catkin_ws/devel/lib/loam_velodyne/laserOdometry __name:=laserOdometry __log:=/home/vicky/.ros/log/580f7db4-ffc0-11e5-aee2-74d4358625bb/laserOdometry-2.log].
    log file: /home/vicky/.ros/log/580f7db4-ffc0-11e5-aee2-74d4358625bb/laserOdometry-2*.log
    [laserOdometry-2] restarting process

I think when a keypoint from the registration process is not found, then the node laserOdometry node crashed and restart, then the mapping does not work because it does not continue in the same position as before, however it start again from the initial position.

When you run your example:

roslaunch ~/catkin_ws/src/loam_velodyne/launch/loam_velodyne.launch
rosbag play ~/Downloads/nsh_indoor_outdoor.bag 

do you obtain the same error?

How can I avoid this error? Many thanks in advance.

I have the same errors with the nsh bag. Works great with sample VLP16 data

laboshinl avatar Apr 11 '16 19:04 laboshinl

Is this a version you wrote or is it the original implementation or did you piece it back together from the help pages? Did you write the package and launch file?

I've created package and launch file. I've also modified scanRegistration.cpp to get it to work with my VLP16 (I think originally it was for HDL32 )

laboshinl avatar Apr 11 '16 19:04 laboshinl

@laboshinl Do you know if it saves the map generated anywhere? and if not, are you planning on modifying it so it does?

ZepherusFF avatar Apr 26 '16 17:04 ZepherusFF

When I build with catkin "source ~catkin_ws/devel/setup.bash", there is an error "bash: ~catkin_ws/devel/setup.bash: No such file or directory". Please help me to solve it. Thank you. @laboshinl

DamonMIN avatar Apr 27 '16 01:04 DamonMIN

Hi @DamonMIN did you setup your catkin workspace correctly based on the ROS documentation ? Do you have the file in that directory ?

ZepherusFF avatar Apr 27 '16 09:04 ZepherusFF

Hi@ZepherusFF I have the "setup.bash" file in the folder ~catkin_ws/devel. The following text is the content of this file.

////////////////////////////////////////////////////////////////////
#!/usr/bin/env bash
# generated from catkin/cmake/templates/setup.bash.in

CATKIN_SHELL=bash

# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"
//////////////////////////////////////////////////////////////////

DamonMIN avatar Apr 27 '16 09:04 DamonMIN

@DamonMIN You have missed "/"

laboshinl@rtc ~/catkin_ws $ source ~catkin_ws/devel/setup.bash 
bash: ~catkin_ws/devel/setup.bash: No such file or directory
laboshinl@rtc ~/catkin_ws $ source ~/catkin_ws/devel/setup.bash 

laboshinl avatar Apr 27 '16 12:04 laboshinl

@laboshinl

In second terminal play sample velodyne data from VLP16 rosbag:

rosbag play ~/Downloads/2014-11-10-10-48-31_Velodyne-VLP_20Hz_Hecker Pass.pcap
[ INFO] [1461760124.789037514]: Opening /home/aicrobo/Downloads/2014-11-10-10-48-31_Velodyne-VLP_20Hz_Hecker
[FATAL] [1461760124.789397586]: Error opening file: /home/aicrobo/Downloads/2014-11-10-10-48-31_Velodyne-VLP_20Hz_Hecker

read from velodyne VLP16 sample pcap:

roslaunch velodyne_pointcloud VLP16_points.launch pcap:="/home/aicrobo/Downloads/2014-11-10-10-48-31_Velodyne-VLP_20Hz_Hecker Pass.pcap"
[VLP16_points.launch] is neither a launch file in package [velodyne_pointcloud] nor is [velodyne_pointcloud] a launch file name
The traceback for the exception was written to the log file

It seems that the launch file can't find or recognize the velodyne data (The data was downloaded from VLP16 sample pcap).

DamonMIN avatar Apr 27 '16 12:04 DamonMIN

You should compile velodyne driver https://github.com/ros-drivers/velodyne/tree/master/velodyne_pointcloud

laboshinl avatar Apr 27 '16 12:04 laboshinl

@DamonMIN For the VLP16 you need to compile yourself the driver

ZepherusFF avatar Apr 27 '16 12:04 ZepherusFF

Is there any way to export the data or is just for visualization?. By the way, works great.

FernandoArrigorriaga avatar May 30 '16 20:05 FernandoArrigorriaga

@Fazt You can save registered clouds to pcd and open with ccViewer rosrun pcl_ros pointcloud_to_pcd input:=/velodyne_cloud_registered

laboshinl avatar Jun 02 '16 10:06 laboshinl

It seems that I can't run it successfully. I used the "VLP16 sample pcap" data sets. Should I calibrate the Velodyne sensor at first? At first, the 3D data points couldn't be displayed in rviz, only two odom topics /laser_odom_to_init and /integrated_to_init could be displayed. The locations of these odom topics are strange. Initially, they start at a same position. They are getting further in the distance. And the orientations of these two topics are also very strange. Then I found if the displayed style of pointcloud2 is adjusted from "points" to "squares", the 3D data points could be displayed. However, I couldn't see the constructed 3D map in rviz. Looking forwards to any great advices. Best!

drscopus avatar Jun 03 '16 03:06 drscopus

@drscopus

only two odom topics /laser_odom_to_init and /integrated_to_init could be displayed. The locations of these odom topics are strange. Initially, they start at a same position. They are getting further in the distance. And the orientations of these two topics are also very strange.

Did you clone latest version of repo? It has different rviz config. You should look only at RED odom lines. Just disable GREEN. Arrows are perpendicular to the the direction of movement for some reason.

laboshinl avatar Jun 03 '16 11:06 laboshinl

@drscopus

I couldn't see the constructed 3D map in rviz.

Try setting 'Decay Time' parameter to 1000 in topic 'velodyne_cloud_registered'

screenshot-10

laboshinl avatar Jun 03 '16 11:06 laboshinl

@laboshinl Thanks! It seems works fine now!

drscopus avatar Jun 04 '16 00:06 drscopus

Dear Leonid,

Hello, I'm a Phd student from Univ. de Bourgogne in France. And recently I found your awesome project on github using Zhang's method on SLAM. I tested your code and it was working very well. However, I have some questions on the performances of the registration results. I tested the dataset that you shared on Github (VLP16 rosbag). Here are the results that I obtain (Fig.1 is the top view, and Fig.2 is the side view) . As we know, the Zhang's method achieves the best performances among the KITTI dataset (the LOAM ranked second, while V-LOAM ranked first). But the registered clouds that I got from the dataset that you provided are bent (see Fig.2).

I would like to ask that if you are having the same problem on this testing data or not? Or do you know the reason why it happens?

Thank you very much and look forward to your reply! Cansen

image Inline image 1 image Inline image 2

CansenJIANG avatar Jun 15 '16 16:06 CansenJIANG

Hi,

The LOAM paper defines a formula for computing curvature that normalises by the distance of the point from the origin (equation (1) in the paper). However, it seems like the curvature computed in line 378 of scanRegistration.cpp is not normalised by the distance of the point from the origin. Any idea why this might be the case?

Thanks!

haoala avatar Jun 16 '16 01:06 haoala

@laboshinl When testing the loam_velodyne with real data, I noticed that the transform frames are in a non-standard coordinate system. Namely, sensor forward is mapped to +z, sensor up is mapped to +y, and sensor left is mapped to +x. Is there a reason for this, and where can I easily change it to standard cartesian?

TopGunSnake avatar Jun 17 '16 21:06 TopGunSnake

@TopGunSnake I believe it's because that's the convention the paper uses (page 2 at http://www.roboticsproceedings.org/rss10/p07.pdf).

haoala avatar Jun 18 '16 02:06 haoala

@laboshinl What units are distances in?

haoala avatar Jun 24 '16 08:06 haoala

@haoala meters I think

think@laboshinl What units are distances in?

@laboshinl For the error generated in nsh_indoor_outdoor.bag is it possible to make that when it losses odometry it keeps the last pose? And I have other question, is it possible to add the help of an IMU or wheel odometry?

Kailegh avatar Jun 30 '16 08:06 Kailegh

@Kailegh There is no error for me with current version https://github.com/laboshinl/loam_velodyne/commit/60db8c10f79bb4e2de77f6b8212b40430c2ae473

laboshinl avatar Jun 30 '16 08:06 laboshinl

@Kailegh There is no error for me with current version 60db8c1

Thanks a lot, works perfect now I had an old version sorry. Great work man! Although this version seems to have less points, do you use a voxel grid or something like that?

Regarding the IMU, do you think there is any advantage of including one?

An important question would be what is the maximun speed this can work?

Kailegh avatar Jun 30 '16 08:06 Kailegh

@Kailegh I have not tested it with IMU yet. https://github.com/laboshinl/loam_velodyne/issues/6

laboshinl avatar Jul 01 '16 09:07 laboshinl

I believe there's a bug with laserOdometry.cpp. Lines 458-459 should really go after line 470. You want to reset the points used to build the Jacobian at the start of each new iteration, and not keep points from previous iterations.

haoala avatar Jul 04 '16 10:07 haoala

@haoala Feel free to send pull requests with updates

laboshinl avatar Jul 12 '16 09:07 laboshinl

Can you share the original version of scanRegistration.cpp that works with HDL-32E? Thanks.

doublej317 avatar Jul 15 '16 07:07 doublej317

@doublej317 I was mistaken, it doesn't seem to be for HDL-32. Original sources can be found here: http://docs.ros.org/indigo/api/loam_velodyne/html/files.html

laboshinl avatar Jul 15 '16 08:07 laboshinl

@laboshinl Thank you :)

doublej317 avatar Jul 15 '16 09:07 doublej317