ethz-asl / lidar_align

A simple method for finding the extrinsic calibration between a 3D lidar and a 6-dof pose sensor
837 stars 265 forks source link

No Build Instructions #9

Closed Ly0n closed 5 years ago

Ly0n commented 5 years ago

Dear ethz-asl team, thanks for providing this package. I tried to build it but failed. Here what I did and maybe the beginning of a build instruction for Ubuntu 16.04

  1. Download the following packages into your workspace:
    cd ~/catkin_ws/src
    git clone https://github.com/ethz-asl/lidar_align                                                                                                                                                           
    git clone https://github.com/ethz-asl/minkindr.git                                                                                                                                                          
    git clone https://github.com/ANYbotics/kindr_ros                                                                                                                                                            
    git clone https://github.com/ANYbotics/kindr#building-with-catkin                                                                                                                                           
    git clone https://github.com/ANYbotics/kindr.git                                                                                                                                                            
    git clone https://github.com/catkin/catkin_simple.git                                                                                                                                                       
    git clone https://github.com/ethz-asl/minkindr_ros.git                                                                                                                                                      
    git clone https://github.com/ethz-asl/glog_catkin.git                                                                                                                                                       
    git clone https://github.com/ethz-asl/gflags_catkin.git                                                                                                                                                                                                                                                                                                                                                                                                     git clone https://github.com/ethz-asl/nlopt.git   
  2. Install missing packages
    sudo apt-get install libncurses5-dev       
    sudo pip3 install nlopt               
    sudo apt-get install libgflags-dev        
  3. Build
    cd ~/catkin_ws
    catkin build

    I still get the following error:

    
    Starting ==> catkin_simple                                                                                                                                                                                           
    Starting ==> kindr                                                                                                                                                                                                   
    Starting ==> kindr_msgs                                                                                                                                                                                              
    Starting ==> multi_dof_joint_trajectory_rviz_plugins                                                                                                                                                                 
    Finished <== catkin_simple                           [ 0.4 seconds ]                                                                                                                                                 
    Starting ==> nlopt                                                                                                                                                                                                   
    Finished <== kindr                                   [ 1.7 seconds ]                                                                                                                                                 
    Starting ==> gflags_catkin                                                                                                                                                                                           
    Finished <== nlopt                                   [ 1.6 seconds ]                                                                                                                                                 
    Finished <== kindr_msgs                              [ 2.3 seconds ]                                                                                                                                                 
    Starting ==> kindr_ros                                                                                                                                                                                               
    Starting ==> kindr_rviz_plugins                                                                                                                                                                                      
    Finished <== gflags_catkin                           [ 14.2 seconds ]                                                                                                                                                
    Starting ==> glog_catkin                                                                                                                                                                                             
    Finished <== kindr_ros                               [ 13.9 seconds ]                                                                                                                                                
    Finished <== glog_catkin                             [ 0.6 seconds ]                                                                                                                                                 
    Starting ==> minkindr_conversions                                                                                                                                                                                    
    Finished <== minkindr_conversions                    [ 0.4 seconds ]                                                                                                                                                 
    Starting ==> lidar_align                                                                                                                                                                                             

[lidar_align] ==> '/home/gsp/catkin_ws/build/lidar_align/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' in '/home/gsp/catkin_ws/build/lidar_align' [ 20%] Building CXX object CMakeFiles/lidar_align.dir/src/lidar_align_node.cpp.o [ 40%] Building CXX object CMakeFiles/lidar_align.dir/src/sensors.cpp.o In file included from /home/gsp/catkin_ws/src/lidar_align/include/lidar_align/aligner.h:10:0, from /home/gsp/catkin_ws/src/lidar_align/src/lidar_align_node.cpp:5: /home/gsp/catkin_ws/src/lidar_align/include/lidar_align/sensors.h:14:47: fatal error: kindr/minimal/quat-transformation.h: No such file or directory compilation terminated. CMakeFiles/lidar_align.dir/build.make:62: recipe for target 'CMakeFiles/lidar_align.dir/src/lidar_align_node.cpp.o' failed make[2]: [CMakeFiles/lidar_align.dir/src/lidar_align_node.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /home/gsp/catkin_ws/src/lidar_align/src/sensors.cpp:1:0: /home/gsp/catkin_ws/src/lidar_align/include/lidar_align/sensors.h:14:47: fatal error: kindr/minimal/quat-transformation.h: No such file or directory compilation terminated. CMakeFiles/lidar_align.dir/build.make:86: recipe for target 'CMakeFiles/lidar_align.dir/src/sensors.cpp.o' failed make[2]: [CMakeFiles/lidar_align.dir/src/sensors.cpp.o] Error 1 CMakeFiles/Makefile2:1251: recipe for target 'CMakeFiles/lidar_align.dir/all' failed make[1]: [CMakeFiles/lidar_align.dir/all] Error 2



Could you help me finishing my build instruction? 

Kind regards
Tobias                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
ZacharyTaylor commented 5 years ago

Thanks for the interest in the code. I have now added some install instructions to the readme see #10 . I had forgotten how many deps having minkindr in there added.

ZacharyTaylor commented 5 years ago

Actually I realized I was using a very minimal section of minkindr that was easy to redo with eigen so I went through and stripped out all the non-ros deps (with the exception of nl-opt). See the new install instructions or #11

Ly0n commented 5 years ago

So what worked for me:

  1. Add nlopt from you Rep into the workspace. Installing it by apt did not help. cmake still did not find the package. https://github.com/ethz-asl/nlopt.git Build it before you build the complete workspace:
    catkin build -w ~/catkin_ws nlopt
  2. Add catkin_package() before the add_executable(......). If I dont do that the following error will be shown: https://answers.ros.org/question/145801/cant-locate-node-in-package/
  3. So I got here:
    [ INFO] [1542301111.752742973]: Loading Pointcloud Data...
    [ INFO] [1542301122.053843129]: Loading Transformation Data...                                
    [ERROR] [1542301122.090921159]: No odom messages found!
    [FATAL] [1542301122.093657916]: Error loading transforms from ROS bag.

    So the node works now. I still have to set the correct odom topic :dancer: Thanks for all your support.

ZacharyTaylor commented 5 years ago

Thanks for the hints, turns out the ethz-asl wrapper for nlopt was the source of the nlopt-config.cmake I was using, which is why it wasn't working with the system version. I fixed the cmake file in #12 so hopefully it now builds out of the box.

The node will pull in all messages of type TransformStamped for use regardless of their topic name. What message type are you using for your pose measurements?

Ly0n commented 5 years ago

Dear ZacharyTaylor,

my bagfiles contain tf2 based information on the RTK pose, but the tree is quite big ^^. My proposal would be to point to a specific tf2 frame or use the output of RTK or IMU. I don't know your algo in detail but maybe is would be useful to use the covariance in a type like nav_msgs/Odometry that is created directly be the sensor itself.

LiShuaixin commented 5 years ago

@Ly0n thx for your build instruction! it works fine!

ZacharyTaylor commented 5 years ago

@LiShuaixin were you getting the same errors as @Ly0n, I had hoped that had been fixed

bryantaoli commented 4 years ago

Dear ethz-asl team, thanks for providing this package. I tried to build it but failed. Here what I did and maybe the beginning of a build instruction for Ubuntu 16.04

  1. Download the following packages into your workspace:
cd ~/catkin_ws/src
git clone https://github.com/ethz-asl/lidar_align                                                                                                                                                           
git clone https://github.com/ethz-asl/minkindr.git                                                                                                                                                          
git clone https://github.com/ANYbotics/kindr_ros                                                                                                                                                            
git clone https://github.com/ANYbotics/kindr#building-with-catkin                                                                                                                                           
git clone https://github.com/ANYbotics/kindr.git                                                                                                                                                            
git clone https://github.com/catkin/catkin_simple.git                                                                                                                                                       
git clone https://github.com/ethz-asl/minkindr_ros.git                                                                                                                                                      
git clone https://github.com/ethz-asl/glog_catkin.git                                                                                                                                                       
git clone https://github.com/ethz-asl/gflags_catkin.git                                                                                                                                                                                                                                                                                                                                                                                                     git clone https://github.com/ethz-asl/nlopt.git   
  1. Install missing packages
sudo apt-get install libncurses5-dev       
sudo pip3 install nlopt               
sudo apt-get install libgflags-dev        
  1. Build
cd ~/catkin_ws
catkin build

I still get the following error:

Starting ==> catkin_simple                                                                                                                                                                                           
Starting ==> kindr                                                                                                                                                                                                   
Starting ==> kindr_msgs                                                                                                                                                                                              
Starting ==> multi_dof_joint_trajectory_rviz_plugins                                                                                                                                                                 
Finished <== catkin_simple                           [ 0.4 seconds ]                                                                                                                                                 
Starting ==> nlopt                                                                                                                                                                                                   
Finished <== kindr                                   [ 1.7 seconds ]                                                                                                                                                 
Starting ==> gflags_catkin                                                                                                                                                                                           
Finished <== nlopt                                   [ 1.6 seconds ]                                                                                                                                                 
Finished <== kindr_msgs                              [ 2.3 seconds ]                                                                                                                                                 
Starting ==> kindr_ros                                                                                                                                                                                               
Starting ==> kindr_rviz_plugins                                                                                                                                                                                      
Finished <== gflags_catkin                           [ 14.2 seconds ]                                                                                                                                                
Starting ==> glog_catkin                                                                                                                                                                                             
Finished <== kindr_ros                               [ 13.9 seconds ]                                                                                                                                                
Finished <== glog_catkin                             [ 0.6 seconds ]                                                                                                                                                 
Starting ==> minkindr_conversions                                                                                                                                                                                    
Finished <== minkindr_conversions                    [ 0.4 seconds ]                                                                                                                                                 
Starting ==> lidar_align                                                                                                                                                                                             

[lidar_align] ==> '/home/gsp/catkin_ws/build/lidar_align/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' in '/home/gsp/catkin_ws/build/lidar_align'
[ 20%] Building CXX object CMakeFiles/lidar_align.dir/src/lidar_align_node.cpp.o
[ 40%] Building CXX object CMakeFiles/lidar_align.dir/src/sensors.cpp.o
In file included from /home/gsp/catkin_ws/src/lidar_align/include/lidar_align/aligner.h:10:0,
                 from /home/gsp/catkin_ws/src/lidar_align/src/lidar_align_node.cpp:5:
/home/gsp/catkin_ws/src/lidar_align/include/lidar_align/sensors.h:14:47: fatal error: kindr/minimal/quat-transformation.h: No such file or directory
compilation terminated.
CMakeFiles/lidar_align.dir/build.make:62: recipe for target 'CMakeFiles/lidar_align.dir/src/lidar_align_node.cpp.o' failed
make[2]: *** [CMakeFiles/lidar_align.dir/src/lidar_align_node.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/gsp/catkin_ws/src/lidar_align/src/sensors.cpp:1:0:
/home/gsp/catkin_ws/src/lidar_align/include/lidar_align/sensors.h:14:47: fatal error: kindr/minimal/quat-transformation.h: No such file or directory
compilation terminated.
CMakeFiles/lidar_align.dir/build.make:86: recipe for target 'CMakeFiles/lidar_align.dir/src/sensors.cpp.o' failed
make[2]: *** [CMakeFiles/lidar_align.dir/src/sensors.cpp.o] Error 1
CMakeFiles/Makefile2:1251: recipe for target 'CMakeFiles/lidar_align.dir/all' failed
make[1]: *** [CMakeFiles/lidar_align.dir/all] Error 2

Could you help me finishing my build instruction?

Kind regards Tobias

When I ran git clone https://github.com/ANYbotics/kindr#building-with-catkin, I get fatal: https://github.com/ANYbotics/kindr#building-with-catkin/info/refs not valid: is this a git repository? How Can I fix the problem? Thank you.

Ly0n commented 4 years ago
git clone https://github.com/ANYbotics/kindr 

It was a mistake in my instructions.

bryantaoli commented 4 years ago
git clone https://github.com/ANYbotics/kindr 

It was a mistake in my instructions.

ok,I then ran as you did, but found that “catkin build, no such command” image