blam icon indicating copy to clipboard operation
blam copied to clipboard

Installation

Open Kailegh opened this issue 7 years ago • 20 comments

Hi I am trying to install the package and it says in its instructions:

This repository contains two ROS workspaces (one internal, one external). The build process is proctored by the update script. To build, first make sure that you do not have any other ROS workspaces in your ROS_PACKAGE_PATH, then clone the repository and from the top directory execute

./update

My question is, to do that I should delete from my .bashrc the following lines?

source /opt/ros/indigo/setup.bash
source ~/catkin_ws/devel/setup.bash

However when I do echo $ROS_PACKAGE_PATH I obtain

/home/dan/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

should I also remove the /stacks to install de package?

and Another question, when I install that, to use my normal workspaces, should I source from the terminal? I mean, how can I use my normal workspaces: /home/lsi2/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks when I install this

Thanks a lot!!!!

Kailegh avatar Sep 07 '16 11:09 Kailegh

well i tried removing those 2 lines from my .bashrc and following your instructions, however it gives me an error ./update: line 13: catkin_make_isolated: order not found May it be because there is not setup.bash sourced?

Thanks a lot!

Kailegh avatar Sep 07 '16 13:09 Kailegh

Hi Kailegh.

You have two lines in your .bashrc. The first one:

source /opt/ros/indigo/setup.bash

tells your system where to find system-wide ROS dependencies, for example, where to find the command catkin_make_isolated.

The second one:

source ~/catkin_ws/devel/setup.bash

tells your system how to find ROS packages that you personally created and put under the catkin_ws directory.

To install BLAM, you should keep the first one (hence letting your system know where to find catkin_make_isolated), but comment the second one, since your personal packages may conflict with packages within BLAM. The update command that I provide will set up two ROS workspaces (similar to your catkin_ws) that do not conflict with one another, and will compile them.

In all honesty, it is unlikely that your catkin_ws would conflict with any of my packages, but you should comment that line as a precaution.

erik-nelson avatar Sep 07 '16 14:09 erik-nelson

Thanks a lot, now I have been able to make it work. I have tried it with different records I have and I have to say that in a moving car(50km/h) it does not work pretty well, in a straight flat road it thinks that u go upwards and makes turns that the car does not do, it also mix the surrounding buildings. I think it does not work very well at high speeds. However in the tests I have made at lower speeds it works pretty well, even in enviroments where other SLAM software I have used get lost, although it has sometimes some issues (going on a flat trajectory it thinks you change the height). Congratulations for your work, I am looking forward to new updates. I will keep testing and giving feedback, and if I can contribute with something useful I will. Thanks a lot again!!

Edit: One more question, the information about intensity and the ring of the velodyne, do you use it? or just remove it to speed up the process?

Kailegh avatar Sep 08 '16 12:09 Kailegh

Hey Erik,Kailegh, Did you make a separate workspace to install BLAM? I keeping getting this error:

/home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘bool LaserLoopClosure::LoadParameters(const ros::NodeHandle&)’: /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:146:35: error: no matching function for call to ‘gtsam::Pose3::Pose3(gtsam::Rot3&, gtsam::Vector3&)’ Pose3 pose(rotation, translation); ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:146:35: note: candidates are: In file included from /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:46:0, from /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:78:3: note: gtsam::Pose3::Pose3(const Matrix&) Pose3(const Matrix &T) : ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:78:3: note: candidate expects 1 argument, 2 provided /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:75:12: note: gtsam::Pose3::Pose3(const gtsam::Pose2&) explicit Pose3(const Pose2& pose2); ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:75:12: note: candidate expects 1 argument, 2 provided /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:70:3: note: gtsam::Pose3::Pose3(const gtsam::Rot3&, const gtsam::Point3&) Pose3(const Rot3& R, const Point3& t) : ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:70:3: note: no known conversion for argument 2 from ‘gtsam::Vector3 {aka Eigen::Matrix<double, 3, 1>}’ to ‘const gtsam::Point3&’ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:65:3: note: gtsam::Pose3::Pose3(const gtsam::Pose3&) Pose3(const Pose3& pose) : ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:65:3: note: candidate expects 1 argument, 2 provided /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:61:3: note: gtsam::Pose3::Pose3() Pose3() { ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:61:3: note: candidate expects 0 arguments, 2 provided /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘gtsam::Pose3 LaserLoopClosure::ToGtsam(const Transform3&) const’: /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:407:20: error: no matching function for call to ‘gtsam::Pose3::Pose3(gtsam::Rot3&, gtsam::Vector3&)’ return Pose3(r, t); ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:407:20: note: candidates are: In file included from /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:46:0, from /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:78:3: note: gtsam::Pose3::Pose3(const Matrix&) Pose3(const Matrix &T) : ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:78:3: note: candidate expects 1 argument, 2 provided /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:75:12: note: gtsam::Pose3::Pose3(const gtsam::Pose2&) explicit Pose3(const Pose2& pose2); ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:75:12: note: candidate expects 1 argument, 2 provided /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:70:3: note: gtsam::Pose3::Pose3(const gtsam::Rot3&, const gtsam::Point3&) Pose3(const Rot3& R, const Point3& t) : ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:70:3: note: no known conversion for argument 2 from ‘gtsam::Vector3 {aka Eigen::Matrix<double, 3, 1>}’ to ‘const gtsam::Point3&’ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:65:3: note: gtsam::Pose3::Pose3(const gtsam::Pose3&) Pose3(const Pose3& pose) : ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:65:3: note: candidate expects 1 argument, 2 provided /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:61:3: note: gtsam::Pose3::Pose3() Pose3() { ^ /home/hcrobotics/catkin_ws/install_isolated/lib/cmake/GTSAM/../../../include/gtsam/geometry/Pose3.h:61:3: note: candidate expects 0 arguments, 2 provided /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘LaserLoopClosure::Mat66 LaserLoopClosure::ToGu(const shared_ptr&) const’: /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:412:3: error: ‘Matrix66’ is not a member of ‘gtsam’ gtsam::Matrix66 gtsam_covariance = covariance->covariance(); ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:412:19: error: expected ‘;’ before ‘gtsam_covariance’ gtsam::Matrix66 gtsam_covariance = covariance->covariance(); ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:417:40: error: ‘gtsam_covariance’ was not declared in this scope out(i, j) = gtsam_covariance(i, j); ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘gtsam::noiseModel::Gaussian::shared_ptr LaserLoopClosure::ToGtsam(const Mat66&) const’: /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:424:3: error: ‘Matrix66’ is not a member of ‘gtsam’ gtsam::Matrix66 gtsam_covariance; ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:424:19: error: expected ‘;’ before ‘gtsam_covariance’ gtsam::Matrix66 gtsam_covariance; ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:428:28: error: ‘gtsam_covariance’ was not declared in this scope gtsam_covariance(i, j) = covariance(i, j); ^ /home/hcrobotics/ros_ws/src/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:430:31: error: ‘gtsam_covariance’ was not declared in this scope return Gaussian::Covariance(gtsam_covariance);

Will appreciate any help!

Thanks!

Ashwin

mathurash avatar Oct 11 '16 01:10 mathurash

Hey Ashwin, Kailegh, Erik

Ashwin, i had the same issue that you're having right now, i think the problem its that you downloaded the gtsam 3.xx.xx, you have to download the 4.00, i solved that problem just doing that, i also made a different workspace to BLAM i called it "/blam_ws" but now i have other issue.... i'll try to solve that by myself but i'm gonna let you know....

Thank you.

alvarezmdavid avatar Oct 25 '16 13:10 alvarezmdavid

Hey Alvarez, I was able to get it working! Thanks for the help. Hope you got your other issue sorted out. If not let me know, maybe I could help?

mathurash avatar Nov 12 '16 08:11 mathurash

Hey,

I'm struggling to install the package. I keep getting

CMake Error: The current CMakeCache.txt directory /home/user/blam-master/internal/build/CMakeCache.txt is different than the directory /home/user/catkin_ws/src/blam-master/internal/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt

Configuring incomplete, errors occurred!
See also "/home/user/blam-master/internal/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/blam-master/internal/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

ghost avatar Nov 13 '16 18:11 ghost

Hey Ashwin, cool, i had an issue about the speed, i'm working with a laptop with a i7 processor, i dont know why but when i play the online test goes in "slow motion", lagging and i really cant map an enviroment, im working in my tesis and i'm kind of stuck right now in matter of SLAM scripts.... this one looks awesome, it works, but not at the speed i need (like in the video that Erik uploaded to youtube).... i don't know if i am doing something wrong or it works the way it should work (slowly)

Thanks for the answer.

alvarezmdavid avatar Nov 14 '16 10:11 alvarezmdavid

Hi I am a complete freshman on ROS and wont to process velodyne data to create point cloud. This is very grate have such project available directly. thanks a lot for this: I was trying to install the package and create new workspace for that: after build with ./update its giving me error:

nikita@nikita-Vostro-3800:~/blam_ws/src/blam$ ./update Creating a ROS workspace for third party packages. Merge caused no change, no new elements found Base path: /home/nikita/blam_ws/src/blam/external Source space: /home/nikita/blam_ws/src/blam/external/src Build space: /home/nikita/blam_ws/src/blam/external/build_isolated Devel space: /home/nikita/blam_ws/src/blam/external/devel_isolated Install space: /home/nikita/blam_ws/src/blam/external/install_isolated Additional CMake Arguments: -DCMAKE_BUILD_TYPE=Release No packages found in source space: /home/nikita/blam_ws/src/blam/external/src

~~  traversing 0 packages in topological order:

Traceback (most recent call last): File "/opt/ros/kinetic/bin/catkin_make_isolated", line 160, in main() File "/opt/ros/kinetic/bin/catkin_make_isolated", line 156, in main override_build_tool_check=opts.override_build_tool_check, File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 1050, in build_workspace_isolated os.path.join(get_cmake_path(), 'templates', '_setup_util.py.in'), File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/cmake.py", line 47, in get_cmake_path raise RuntimeError('Could not determine catkin cmake path') RuntimeError: Could not determine catkin cmake path touch: cannot touch '/home/nikita/blam_ws/src/blam/external/install_isolated/.catkin': No such file or directory ./update: line 16: /home/nikita/blam_ws/src/blam/external/install_isolated/setup.bash: No such file or directory Creating a ROS workspace for BLAM packages. Merge caused no change, no new elements found [blam_example] Updating /home/nikita/blam_ws/src/blam/internal/src/blam_example [blam_example] Done. [blam_slam] Updating /home/nikita/blam_ws/src/blam/internal/src/blam_slam [blam_slam] Done. [geometry_utils] Updating /home/nikita/blam_ws/src/blam/internal/src/geometry_utils [geometry_utils] Done. [laser_loop_closure] Updating /home/nikita/blam_ws/src/blam/internal/src/laser_loop_closure [laser_loop_closure] Done. [measurement_synchronizer] Updating /home/nikita/blam_ws/src/blam/internal/src/measurement_synchronizer [measurement_synchronizer] Done. [parameter_utils] Updating /home/nikita/blam_ws/src/blam/internal/src/parameter_utils [parameter_utils] Done. [point_cloud_filter] Updating /home/nikita/blam_ws/src/blam/internal/src/point_cloud_filter [point_cloud_filter] Done. [point_cloud_localization] Updating /home/nikita/blam_ws/src/blam/internal/src/point_cloud_localization [point_cloud_localization] Done. [point_cloud_mapper] Updating /home/nikita/blam_ws/src/blam/internal/src/point_cloud_mapper [point_cloud_mapper] Done. [point_cloud_odometry] Updating /home/nikita/blam_ws/src/blam/internal/src/point_cloud_odometry [point_cloud_odometry] Done. [point_cloud_visualizer] Updating /home/nikita/blam_ws/src/blam/internal/src/point_cloud_visualizer [point_cloud_visualizer] Done. [pose_graph_msgs] Updating /home/nikita/blam_ws/src/blam/internal/src/pose_graph_msgs [pose_graph_msgs] Done. Base path: /home/nikita/blam_ws/src/blam/internal Source space: /home/nikita/blam_ws/src/blam/internal/src Build space: /home/nikita/blam_ws/src/blam/internal/build Devel space: /home/nikita/blam_ws/src/blam/internal/devel Install space: /home/nikita/blam_ws/src/blam/internal/install

Running command: "make cmake_check_build_system" in "/home/nikita/blam_ws/src/blam/internal/build"

Running command: "make -j4 -l4" in "/home/nikita/blam_ws/src/blam/internal/build"

[ 0%] Built target sensor_msgs_generate_messages_cpp [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target geometry_msgs_generate_messages_cpp [ 0%] Built target _pose_graph_msgs_generate_messages_check_deps_KeyedScan [ 0%] Built target _pose_graph_msgs_generate_messages_check_deps_PoseGraphNode [ 0%] Built target _pose_graph_msgs_generate_messages_check_deps_PoseGraph [ 0%] Built target _pose_graph_msgs_generate_messages_check_deps_PoseGraphEdge [ 0%] Built target geometry_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target sensor_msgs_generate_messages_nodejs [ 0%] Built target sensor_msgs_generate_messages_py [ 0%] Built target geometry_msgs_generate_messages_nodejs [ 0%] Built target geometry_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target sensor_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target geometry_msgs_generate_messages_eus [ 0%] Built target sensor_msgs_generate_messages_eus [ 1%] Building CXX object geometry_utils/CMakeFiles/test_math.dir/tests/test_math.cc.o [ 6%] Built target test_equals [ 6%] Building CXX object geometry_utils/CMakeFiles/test_base.dir/tests/test_base.cc.o [ 8%] Building CXX object geometry_utils/CMakeFiles/test_so3error.dir/tests/test_so3error.cc.o [ 11%] Built target point_cloud_mapper Scanning dependencies of target measurement_synchronizer [ 13%] Building CXX object measurement_synchronizer/CMakeFiles/measurement_synchronizer.dir/src/MeasurementSynchronizer.cc.o /home/nikita/blam_ws/src/blam/internal/src/geometry_utils/tests/test_so3error.cc:5:21: fatal error: ros/ros.h: No such file or directory /home/nikita/blam_ws/src/blam/internal/src/geometry_utils/tests/test_math.cc:5:21: fatal error: ros/ros.h: No such file or directory /home/nikita/blam_ws/src/blam/internal/src/geometry_utils/tests/test_base.cc:5:21: fatal error: ros/ros.h: No such file or directory compilation terminated. compilation terminated. compilation terminated. geometry_utils/CMakeFiles/test_base.dir/build.make:62: recipe for target 'geometry_utils/CMakeFiles/test_base.dir/tests/test_base.cc.o' failed make[2]: *** [geometry_utils/CMakeFiles/test_base.dir/tests/test_base.cc.o] Error 1 CMakeFiles/Makefile2:1541: recipe for target 'geometry_utils/CMakeFiles/test_base.dir/all' failed make[1]: *** [geometry_utils/CMakeFiles/test_base.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... geometry_utils/CMakeFiles/test_math.dir/build.make:62: recipe for target 'geometry_utils/CMakeFiles/test_math.dir/tests/test_math.cc.o' failed make[2]: *** [geometry_utils/CMakeFiles/test_math.dir/tests/test_math.cc.o] Error 1 CMakeFiles/Makefile2:1504: recipe for target 'geometry_utils/CMakeFiles/test_math.dir/all' failed make[1]: *** [geometry_utils/CMakeFiles/test_math.dir/all] Error 2 geometry_utils/CMakeFiles/test_so3error.dir/build.make:62: recipe for target 'geometry_utils/CMakeFiles/test_so3error.dir/tests/test_so3error.cc.o' failed make[2]: *** [geometry_utils/CMakeFiles/test_so3error.dir/tests/test_so3error.cc.o] Error 1 CMakeFiles/Makefile2:1430: recipe for target 'geometry_utils/CMakeFiles/test_so3error.dir/all' failed make[1]: *** [geometry_utils/CMakeFiles/test_so3error.dir/all] Error 2 [ 15%] Linking CXX shared library /home/nikita/blam_ws/src/blam/internal/devel/lib/libmeasurement_synchronizer.so [ 15%] Built target measurement_synchronizer Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

I try to include dependency in CMakeLists.txt but it didn't work. is there any other dependency that i have to include. in my other workspace ros/ros.h is get easily included, I am not getting what the problem is ?

nikitaporje avatar Dec 15 '16 08:12 nikitaporje

I met the same problem as you. @nikitaporje Do you have any idea of it right now ?

I found the solution :)@nikitaporaje

  1. cd blam/internal/src/geometry_utils
  2. add two lines below to package.xml <build_depend>roscpp</build_depend> <run_depend>roscpp</run_depend>
  3. edit CMakeList.txt find_package(catkin REQUIRED COMPONENTS roscpp) include_directories(include ${catkin_INCLUDE_DIRS})

jsgaobiao avatar Dec 20 '16 12:12 jsgaobiao

thank you @jsgaobiao for reply. :)

nikitaporje avatar Dec 21 '16 10:12 nikitaporje

@alvarezmdavid, have you solved the "slow motion" problem? I am having it also.

TixiaoShan avatar Feb 22 '17 18:02 TixiaoShan

Hi, guys

I have already installed ROS and GTSAM, but when I try to run the ./update, I get this error. Does anyone know how to fix this?

[ 0%] [ 0%] Built target sensor_msgs_generate_messages_lisp Built target std_msgs_generate_messages_lisp [ 0%] Built target geometry_msgs_generate_messages_lisp [ 0%] Built target geometry_msgs_generate_messages_py [ 0%] Built target sensor_msgs_generate_messages_py [ 0%] [ 0%] Built target std_msgs_generate_messages_cpp Built target sensor_msgs_generate_messages_cpp [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target geometry_msgs_generate_messages_cpp [ 0%] [ 0%] [ 0%] Built target _pose_graph_msgs_generate_messages_check_deps_PoseGraph Built target _pose_graph_msgs_generate_messages_check_deps_PoseGraphNode Built target _pose_graph_msgs_generate_messages_check_deps_KeyedScan [ 3%] [ 6%] Built target test_base Built target test_equals [ 9%] [ 9%] Built target _pose_graph_msgs_generate_messages_check_deps_PoseGraphEdge Built target test_math [ 12%] Built target test_so3error [ 15%] [ 18%] Built target measurement_synchronizer Built target point_cloud_mapper [ 31%] Built target pose_graph_msgs_generate_messages_lisp [ 46%] Built target pose_graph_msgs_generate_messages_py [ 50%] Built target point_cloud_filter [ 53%] Built target point_cloud_localization [ 65%] Built target pose_graph_msgs_generate_messages_cpp [ 71%] [ 71%] Built target point_cloud_odometry Built target point_cloud_visualizer [ 71%] Built target pose_graph_msgs_generate_messages [ 75%] Built target point_cloud_filter_node [ 78%] Built target point_cloud_mapper_node [ 81%] [ 84%] Built target point_cloud_localization_node [ 87%] Built target point_cloud_odometry_node Building CXX object laser_loop_closure/CMakeFiles/laser_loop_closure.dir/src/LaserLoopClosure.cc.o [ 90%] Built target point_cloud_visualizer_node In file included from /usr/local/include/gtsam/geometry/Point3.h:24:0, from /usr/local/include/gtsam/geometry/Pose3.h:29, from /home/chang/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:46, from /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /usr/local/include/gtsam/base/Matrix.h: In function ‘void gtsam::inplace_QR(MATRIX&)’: /usr/local/include/gtsam/base/Matrix.h:316:71: error: expected ‘;’ before ‘::’ token Eigen::internal::householder_qr_inplace_blocked<MATRIX, HCoeffsType>::run(A, hCoeffs, 48, temp.data()); ^ In file included from /usr/local/include/gtsam/geometry/Pose3.h:30:0, from /home/chang/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:46, from /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /usr/local/include/gtsam/geometry/Rot3.h: In static member function ‘static gtsam::Rot3 gtsam::Rot3::rodriguez(double, double, double)’: /usr/local/include/gtsam/geometry/Rot3.h:197:51: error: no matching function for call to ‘gtsam::Rot3::rodriguez(Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >&)’ { return rodriguez((Vector(3) << wx, wy, wz));} ^ /usr/local/include/gtsam/geometry/Rot3.h:197:51: note: candidates are: /usr/local/include/gtsam/geometry/Rot3.h:164:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const Vector&, double) static Rot3 rodriguez(const Vector& w, double theta); ^ /usr/local/include/gtsam/geometry/Rot3.h:164:17: note: candidate expects 2 arguments, 1 provided /usr/local/include/gtsam/geometry/Rot3.h:172:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const gtsam::Point3&, double) static Rot3 rodriguez(const Point3& w, double theta); ^ /usr/local/include/gtsam/geometry/Rot3.h:172:17: note: candidate expects 2 arguments, 1 provided /usr/local/include/gtsam/geometry/Rot3.h:180:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const gtsam::Unit3&, double) static Rot3 rodriguez(const Unit3& w, double theta); ^ /usr/local/include/gtsam/geometry/Rot3.h:180:17: note: candidate expects 2 arguments, 1 provided /usr/local/include/gtsam/geometry/Rot3.h:187:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const Vector&) static Rot3 rodriguez(const Vector& v); ^ /usr/local/include/gtsam/geometry/Rot3.h:187:17: note: no known conversion for argument 1 from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘const Vector& {aka const Eigen::Matrix<double, -1, 1>&}’ /usr/local/include/gtsam/geometry/Rot3.h:196:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(double, double, double) static Rot3 rodriguez(double wx, double wy, double wz) ^ /usr/local/include/gtsam/geometry/Rot3.h:196:17: note: candidate expects 3 arguments, 1 provided In file included from /home/chang/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:46:0, from /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /usr/local/include/gtsam/geometry/Pose3.h: In static member function ‘static gtsam::Matrix gtsam::Pose3::wedge(double, double, double, double, double, double)’: /usr/local/include/gtsam/geometry/Pose3.h:226:28: error: could not convert ‘(&(&(&(&(&(&(&(&(&(&(&(&(&(& Eigen::DenseBase<Derived>::operator<<(const Scalar&) [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::DenseBase<Derived>::Scalar = double]((* &0.0)).Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &(- wz))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >(((const Scalar)(& wy))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >(((const Scalar)(& vx))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >(((const Scalar)(& wz))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &(- wx))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >(((const Scalar)(& vy))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &(- wy))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >(((const Scalar)(& wx))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >(((const Scalar)(& vz))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0))’ from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, -1> >’ to ‘gtsam::Matrix {aka Eigen::Matrix<double, -1, -1>}’ 0., 0., 0., 0.); ^ In file included from /usr/local/include/gtsam/nonlinear/NonlinearFactorGraph.h:24:0, from /usr/local/include/gtsam/nonlinear/ISAM2.h:22, from /home/chang/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:49, from /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /usr/local/include/gtsam/geometry/Point2.h: In static member function ‘static gtsam::Vector gtsam::Point2::Logmap(const gtsam::Point2&)’: /usr/local/include/gtsam/geometry/Point2.h:175:86: error: could not convert ‘Eigen::DenseBase<Derived>::operator<<(const Scalar&) [with Derived = Eigen::Matrix<double, -1, 1>; Eigen::DenseBase<Derived>::Scalar = double]((* &(& dp)->gtsam::Point2::x())).Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, 1> >((* &(& dp)->gtsam::Point2::y()))’ from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘gtsam::Vector {aka Eigen::Matrix<double, -1, 1>}’ static inline Vector Logmap(const Point2& dp) { return (Vector(2) << dp.x(), dp.y()); } ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘bool LaserLoopClosure::LoadParameters(const ros::NodeHandle&)’: /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:146:35: error: no matching function for call to ‘gtsam::Pose3::Pose3(gtsam::Rot3&, gtsam::Vector3&)’ Pose3 pose(rotation, translation); ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:146:35: note: candidates are: In file included from /home/chang/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:46:0, from /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /usr/local/include/gtsam/geometry/Pose3.h:78:3: note: gtsam::Pose3::Pose3(const Matrix&) Pose3(const Matrix &T) : ^ /usr/local/include/gtsam/geometry/Pose3.h:78:3: note: candidate expects 1 argument, 2 provided /usr/local/include/gtsam/geometry/Pose3.h:75:12: note: gtsam::Pose3::Pose3(const gtsam::Pose2&) explicit Pose3(const Pose2& pose2); ^ /usr/local/include/gtsam/geometry/Pose3.h:75:12: note: candidate expects 1 argument, 2 provided /usr/local/include/gtsam/geometry/Pose3.h:70:3: note: gtsam::Pose3::Pose3(const gtsam::Rot3&, const gtsam::Point3&) Pose3(const Rot3& R, const Point3& t) : ^ /usr/local/include/gtsam/geometry/Pose3.h:70:3: note: no known conversion for argument 2 from ‘gtsam::Vector3 {aka Eigen::Matrix<double, 3, 1>}’ to ‘const gtsam::Point3&’ /usr/local/include/gtsam/geometry/Pose3.h:65:3: note: gtsam::Pose3::Pose3(const gtsam::Pose3&) Pose3(const Pose3& pose) : ^ /usr/local/include/gtsam/geometry/Pose3.h:65:3: note: candidate expects 1 argument, 2 provided /usr/local/include/gtsam/geometry/Pose3.h:61:3: note: gtsam::Pose3::Pose3() Pose3() { ^ /usr/local/include/gtsam/geometry/Pose3.h:61:3: note: candidate expects 0 arguments, 2 provided /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘gtsam::Pose3 LaserLoopClosure::ToGtsam(const Transform3&) const’: /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:407:20: error: no matching function for call to ‘gtsam::Pose3::Pose3(gtsam::Rot3&, gtsam::Vector3&)’ return Pose3(r, t); ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:407:20: note: candidates are: In file included from /home/chang/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:46:0, from /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /usr/local/include/gtsam/geometry/Pose3.h:78:3: note: gtsam::Pose3::Pose3(const Matrix&) Pose3(const Matrix &T) : ^ /usr/local/include/gtsam/geometry/Pose3.h:78:3: note: candidate expects 1 argument, 2 provided /usr/local/include/gtsam/geometry/Pose3.h:75:12: note: gtsam::Pose3::Pose3(const gtsam::Pose2&) explicit Pose3(const Pose2& pose2); ^ /usr/local/include/gtsam/geometry/Pose3.h:75:12: note: candidate expects 1 argument, 2 provided /usr/local/include/gtsam/geometry/Pose3.h:70:3: note: gtsam::Pose3::Pose3(const gtsam::Rot3&, const gtsam::Point3&) Pose3(const Rot3& R, const Point3& t) : ^ /usr/local/include/gtsam/geometry/Pose3.h:70:3: note: no known conversion for argument 2 from ‘gtsam::Vector3 {aka Eigen::Matrix<double, 3, 1>}’ to ‘const gtsam::Point3&’ /usr/local/include/gtsam/geometry/Pose3.h:65:3: note: gtsam::Pose3::Pose3(const gtsam::Pose3&) Pose3(const Pose3& pose) : ^ /usr/local/include/gtsam/geometry/Pose3.h:65:3: note: candidate expects 1 argument, 2 provided /usr/local/include/gtsam/geometry/Pose3.h:61:3: note: gtsam::Pose3::Pose3() Pose3() { ^ /usr/local/include/gtsam/geometry/Pose3.h:61:3: note: candidate expects 0 arguments, 2 provided /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘LaserLoopClosure::Mat66 LaserLoopClosure::ToGu(const shared_ptr&) const’: /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:412:3: error: ‘Matrix66’ is not a member of ‘gtsam’ gtsam::Matrix66 gtsam_covariance = covariance->covariance(); ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:412:19: error: expected ‘;’ before ‘gtsam_covariance’ gtsam::Matrix66 gtsam_covariance = covariance->covariance(); ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:417:40: error: ‘gtsam_covariance’ was not declared in this scope out(i, j) = gtsam_covariance(i, j); ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘gtsam::noiseModel::Gaussian::shared_ptr LaserLoopClosure::ToGtsam(const Mat66&) const’: /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:424:3: error: ‘Matrix66’ is not a member of ‘gtsam’ gtsam::Matrix66 gtsam_covariance; ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:424:19: error: expected ‘;’ before ‘gtsam_covariance’ gtsam::Matrix66 gtsam_covariance; ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:428:28: error: ‘gtsam_covariance’ was not declared in this scope gtsam_covariance(i, j) = covariance(i, j); ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:430:31: error: ‘gtsam_covariance’ was not declared in this scope return Gaussian::Covariance(gtsam_covariance); ^ In file included from /opt/ros/indigo/include/ros/ros.h:40:0, from /home/chang/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:40, from /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37: /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc: In member function ‘void LaserLoopClosure::PublishPoseGraph()’: /opt/ros/indigo/include/ros/console.h:342:176: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘gtsam::Key {aka unsigned int}’ [-Wformat=] ::ros::console::print(filter, _rosconsole_define_location__loc.logger, rosconsole_define_location__loc.level, FILE, LINE, ROSCONSOLE_FUNCTION, VA_ARGS) ^ /opt/ros/indigo/include/ros/console.h:345:5: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER’ ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER(0, VA_ARGS) ^ /opt/ros/indigo/include/ros/console.h:375:7: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION’ ROSCONSOLE_PRINT_AT_LOCATION(VA_ARGS);
^ /opt/ros/indigo/include/ros/console.h:557:35: note: in expansion of macro ‘ROS_LOG_COND’ #define ROS_LOG(level, name, ...) ROS_LOG_COND(true, level, name, VA_ARGS) ^ /opt/ros/indigo/include/rosconsole/macros_generated.h:162:23: note: in expansion of macro ‘ROS_LOG’ #define ROS_WARN(...) ROS_LOG(::ros::console::levels::Warn, ROSCONSOLE_DEFAULT_NAME, VA_ARGS) ^ /home/chang/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:676:9: note: in expansion of macro ‘ROS_WARN’ ROS_WARN("%s: Couldn't find timestamp for key %lu", name
.c_str(), ^ make[2]: *** [laser_loop_closure/CMakeFiles/laser_loop_closure.dir/src/LaserLoopClosure.cc.o] Error 1 make[1]: *** [laser_loop_closure/CMakeFiles/laser_loop_closure.dir/all] Error 2 make: *** [all] Error 2 Invoking "make -j8 -l8" failed

There are also no nodes in my package when I run roscore. I think the system tries to find the blam_slam_node, but I don't have such file either.

ryokochang avatar Mar 18 '17 22:03 ryokochang

@nikitaporaje and jsgaobiao, I had a similar issue as you nikitaporaje and I had to use the solution given by jsgaobiao AND I had to add the following lines to the package.xml file within the package that was throwing the error. These were:

<build_depend>roscpp</build_depend> <run_depend>roscpp</run_depend>

JohnMMeyer avatar Mar 21 '17 22:03 JohnMMeyer

Sorry should have mentioned I am running kinetic on 16.04

JohnMMeyer avatar Mar 21 '17 22:03 JohnMMeyer

@JohnMMeyer Did you edit your CMake file???

nikitaporje avatar Mar 27 '17 07:03 nikitaporje

Hello @nikitaporje , Yes I did have to modify the CMake file in the package that was giving me trouble. I added the following:

find_package(catkin REQUIRED COMPONENTS roscpp) include_directories(include ${catkin_INCLUDE_DIRS})

Let me know if you need any more help, Take care

JohnMMeyer avatar Mar 27 '17 16:03 JohnMMeyer

I created a pull request out of your instructions, see: https://github.com/erik-nelson/geometry_utils/pull/1

volkandre avatar Sep 26 '17 18:09 volkandre

Anybody who solved the problem of @ryokochang ?

daleyadrichem avatar Jan 12 '18 17:01 daleyadrichem

Hi guys, I think I solved the problem of ryokochang. But it is a long story:

  1. I am using Ubuntu 16.04.03 and ROS kinetic.
  2. I am using Boost Library 1.58
  3. I am using a modified form of GTSAM 3.2.1 that is compatible with Boost 1.58 and Ubuntu 16.04.03 that can be found here https://github.com/indoor-reality/libgtsam I had a lot of trouble with libgtsam until I used this
  4. I had the same errors as you had. First I had to edit the geometry_utils files "CMakeLists.txt" and "package.xml" as you described in this thread before.
  5. Then I modified the Code of Blam. Just use this code in the "laser_loop_closure" package: LaserLoopClosure.cc LaserLoopClosure.cc.txt LaserLoopClosure.h LaserLoopClosure.h.txt

This should do the trick. Now it is compilable.

I hope I could help you guys. Sincerely yours, Kevin Riehl

KevinRiehl avatar Feb 06 '18 12:02 KevinRiehl