RTABMAP_Ros: undefined reference to image_geometry

asked 2018-01-02 08:08:32 -0500

xenosgeck gravatar image

Hi,

I am trying to install rtabmap_ros on tegra TK1 by source. I got the following errors.

Linking CXX executable /home/ubuntu/catkin_ws/devel/lib/rtabmap_ros/map_assembler
/home/ubuntu/catkin_ws/devel/lib/librtabmap_ros.so: undefined reference to `image_geometry::PinholeCameraModel::fromCameraInfo(sensor_msgs::CameraInfo_<std::allocator<void> > const&)'
/home/ubuntu/catkin_ws/devel/lib/librtabmap_ros.so: undefined reference to `image_geometry::PinholeCameraModel::PinholeCameraModel()'

I tried to run

rospack find image_geometry

and it returns

/opt/ros/indigo/share/image_geometry

But when I tried to get the information of CATKIN_LIBRARIES, I cannot find /opt/ros/indigo/lib/libimage_geometry.so.

The CMakelists.txt contains

find_package(catkin REQUIRED COMPONENTS 
             cv_bridge roscpp rospy sensor_msgs std_msgs std_srvs nav_msgs geometry_msgs visualization_msgs
             image_transport tf tf_conversions tf2_ros eigen_conversions laser_geometry pcl_conversions 
             pcl_ros nodelet dynamic_reconfigure message_filters class_loader
             genmsg stereo_msgs move_base_msgs image_geometry
)

# Optional components
find_package(costmap_2d)
find_package(octomap_ros)
find_package(rviz)
...
catkin_package(
  INCLUDE_DIRS include
  LIBRARIES rtabmap_ros
  CATKIN_DEPENDS cv_bridge roscpp rospy sensor_msgs std_msgs std_srvs nav_msgs geometry_msgs visualization_msgs
                 image_transport tf tf_conversions tf2_ros eigen_conversions laser_geometry pcl_conversions 
                 pcl_ros nodelet dynamic_reconfigure message_filters class_loader
                 stereo_msgs move_base_msgs image_geometry ${optional_dependencies}
  DEPENDS RTABMap OpenCV
)

Any idea why? Thanks!

edit retag flag offensive close merge delete

Comments

If you uninstall ros-indigo-image-geometry and build image_geometry from source, does it work?

matlabbe gravatar image matlabbe  ( 2018-01-03 18:19:39 -0500 )edit