ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Error installing robot_localization package: plain cmake error

asked 2022-12-10 14:01:11 -0600

divi@04 gravatar image

updated 2022-12-11 07:39:56 -0600

gvdhoorn gravatar image

ROS Noetic, Ubuntu 20.04

I want to use Robot_localization package with RTABMAP to get odometry data - Sensor fusion (Visual Odom + IMU odom). I am trying to install the robot_localization package by cloning git repo in src folder and doing catkin_make in the ros_workspace, but I am getting this error. I also tried running rosdep install robot_localization but this also raises an error: Error in rosdep

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
robot_localization: Cannot locate rosdep definition for [launch_testing_ament_cmake]

Error in catkin_make:

-- ~~  traversing 2 packages in topological order:
-- ~~  - robot_localization (plain cmake)
-- ~~  - rtabmap_ros
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkin_workspace.cmake:100 (message):
  This workspace contains non-catkin packages in it, and catkin cannot build
  a non-homogeneous workspace without isolation.  Try the
  'catkin_make_isolated' command instead.
Call Stack (most recent call first):
  CMakeLists.txt:69 (catkin_workspace)

-- Configuring incomplete, errors occurred!
See also "/home/divi/ros_workspace/eece5554/GROUP_PRJ/build/CMakeFiles/CMakeOutput.log".
See also "/home/divi/ros_workspace/eece5554/GROUP_PRJ/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:3260: cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
edit retag flag offensive close merge delete


I am trying to install the robot_localization package by cloning git repo in src folder [..]

could you clarify why? robot_localization has binary packages available (see here), so that should be the default way to install. Unless you really must build from source, I'd really suggest you avoid doing that.

gvdhoorn gravatar image gvdhoorn  ( 2022-12-11 07:41:40 -0600 )edit

Anyone with a fix?

Kapper gravatar image Kapper  ( 2023-04-20 13:44:54 -0600 )edit

@Kapper see answer.

Tom Moore gravatar image Tom Moore  ( 2023-04-27 03:50:39 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2023-04-27 03:50:18 -0600

Tom Moore gravatar image

updated 2023-04-27 03:51:02 -0600

Your answer lies in the question itself, I think.

The default branch for robot_localization is ros2 (which is what is used for ROS Rolling). If you just clone the repo into a ROS 1 workspace and try to build it, it's not going to build. You need to clone, then checkout the noetic-devel branch.

You can see a hint of this in the error you posted:

robot_localization: Cannot locate rosdep definition for [launch_testing_ament_cmake]

ament is a ROS 2 build tool.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2022-12-10 14:01:11 -0600

Seen: 234 times

Last updated: Apr 27 '23