Robotics StackExchange | Archived questions

Error installing robot_localization package: plain cmake error

ROS Noetic, Ubuntu 20.04

I want to use Robotlocalization package with RTABMAP to get odometry data - Sensor fusion (Visual Odom + IMU odom). I am trying to install the robotlocalization package by cloning git repo in src folder and doing catkinmake in the rosworkspace, 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

Asked by divi@04 on 2022-12-10 15:01:11 UTC

Comments

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.

Asked by gvdhoorn on 2022-12-11 08:41:40 UTC

Anyone with a fix?

Asked by Kapper on 2023-04-20 13:44:54 UTC

@kapper see answer.

Asked by Tom Moore on 2023-04-27 03:50:39 UTC

Answers

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.

Asked by Tom Moore on 2023-04-27 03:50:18 UTC

Comments