cra-ros-pkg / robot_localization

robot_localization is a package of nonlinear state estimation nodes. The package was developed by Charles River Analytics, Inc. Please ask questions on answers.ros.org.
http://www.cra.com
Other
1.41k stars 902 forks source link

plain cmake error #766

Closed YXGuan closed 2 years ago

YXGuan commented 2 years ago

Hi there,

I got a Cmake error when trying to build the robot_localization package on Noetic.

Your help would be much appreciated.

Below are the output in the terminal

yuxiang@yuxiang:~/catkin_ws$ catkin_make

Base path: /home/yuxiang/catkin_ws
Source space: /home/yuxiang/catkin_ws/src
Build space: /home/yuxiang/catkin_ws/build
Devel space: /home/yuxiang/catkin_ws/devel
Install space: /home/yuxiang/catkin_ws/install
####
#### Running command: "cmake /home/yuxiang/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/yuxiang/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/yuxiang/catkin_ws/install -G Unix Makefiles" in "/home/yuxiang/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/yuxiang/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/yuxiang/catkin_ws/devel;/home/yuxiang/ydlidar_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/yuxiang/catkin_ws/devel;/home/yuxiang/ydlidar_ws/devel;/opt/ros/noetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: False
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- Using CATKIN_WHITELIST_PACKAGES: gps_waypoint_nav;robot_localization;tf2;tf2_eigen;tf2_geometry_msgs;tf2_msgs;tf2_py;tf2_ros
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 7 packages in topological order:
-- ~~  - tf2_msgs
-- ~~  - tf2
-- ~~  - tf2_eigen
-- ~~  - tf2_py
-- ~~  - tf2_ros
-- ~~  - tf2_geometry_msgs
-- ~~  - robot_localization (plain cmake)
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/yuxiang/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/yuxiang/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

yuxiang@yuxiang:~/catkin_ws$ catkin_make_isolated

Base path: /home/yuxiang/catkin_ws
Source space: /home/yuxiang/catkin_ws/src
Build space: /home/yuxiang/catkin_ws/build_isolated
Devel space: /home/yuxiang/catkin_ws/devel_isolated
Install space: /home/yuxiang/catkin_ws/install_isolated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~  traversing 94 packages in topological order:
~~  - beginner_tutorials
~~  - costmap_cspace_msgs
~~  - ddynamic_reconfigure
~~  - delta_description
~~  - delta_viz_server
~~  - exploration
~~  - exploration_msgs
~~  - followbot
~~  - geometry2
~~  - learning_tf
~~  - map_organizer_msgs
~~  - my_camera
~~  - navigation
~~  - neonavigation
~~  - neonavigation_common
~~  - joystick_interrupt
~~  - neonavigation_launch
~~  - neonavigation_msgs
~~  - neonavigation_rviz_plugins
~~  - nmea_navsat_driver
~~  - obj_to_pointcloud
~~  - obstacle-avoidance-turtlebot
~~  - planner_cspace_msgs
~~  - realsense2_camera
~~  - realsense2_description
~~  - robot_gui_bridge
~~  - ros_autonomous_slam
~~  - rviz_camera_stream
~~  - safety_limiter_msgs
~~  - tf2_msgs
~~  - tf2
~~  - map_server
~~  - tf2_bullet
~~  - tf2_eigen
~~  - tf2_py
~~  - tf2_ros
~~  - tf2_geometry_msgs
~~  - amcl
~~  - fake_localization
~~  - interactive_markers
~~  - map_organizer
~~  - multirobot_map_merge
~~  - robot_localization (unknown)
~~  - tf2_kdl
~~  - test_tf2
~~  - tf2_sensor_msgs
~~  - costmap_cspace
~~  - safety_limiter
~~  - tf2_tools
~~  - tf2_web_republisher
~~  - track_odometry
~~  - trajectory_tracker_msgs
~~  - trajectory_tracker
~~  - planner_cspace
~~  - trajectory_tracker_rviz_plugins
~~  - turtlebot3
~~  - turtlebot3_autorace_2020
~~  - turtlebot3_autorace_camera
~~  - turtlebot3_autorace_core
~~  - turtlebot3_autorace_detect
~~  - turtlebot3_autorace_msgs
~~  - turtlebot3_autorace_driving
~~  - turtlebot3_description
~~  - turtlebot3_gazebo
~~  - turtlebot3_msgs
~~  - turtlebot3_bringup
~~  - turtlebot3_example
~~  - turtlebot3_fake
~~  - turtlebot3_navigation
~~  - turtlebot3_simulations
~~  - turtlebot3_slam
~~  - turtlebot3_teleop
~~  - tutorial_one
~~  - vision_msgs
~~  - depthai_ros_msgs
~~  - depthai_bridge
~~  - depthai_examples
~~  - voxel_grid
~~  - costmap_2d
~~  - explore_lite
~~  - nav_core
~~  - base_local_planner
~~  - carrot_planner
~~  - clear_costmap_recovery
~~  - dwa_local_planner
~~  - move_slow_and_clear
~~  - navfn
~~  - global_planner
~~  - polygon_layer
~~  - exploration_server
~~  - frontier_exploration
~~  - rotate_recovery
~~  - move_base
~~  - rtabmap_ros
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: Packages with unknown build types exist
Can not build workspace with packages of unknown build_type
yuxiang@yuxiang:~/catkin_ws$
ayrton04 commented 2 years ago

This is not an issue with robot_localization. Please ask your question on answers.ros.org.

gupta-divi commented 1 year ago

@YXGuan I am having same error, can you suggest how you resolved it, if you did?

larryferguson commented 1 year ago

I get the same error building the package after Ive just installed it from source. The error means there are non catkin files in your package. I'm still in the process of figuring out which files those are.

larryferguson commented 1 year ago

@larryferguson the package builds on the ROS build farm. I'd say if anyone is being unhelpful, it's people posting troll comments instead of attempting to contribute fixes.

I've given many hundreds of hours of my own time to the development, maintenance, and support of this package. If you're unhappy with the level of free support provided, I recommend you write your own.

Sorry for my rudeness. I took out frustration towards you instead of the actual issue. I still disagree, this is the correct place to ask a question since it is directly about this package and that even when installed from source it will not catkin_make. I find that issue important to fix for the noetic version of this package.

ayrton04 commented 1 year ago

The reason I direct people to answers.ros.org is that if others are having the same issue, the entire community benefits from the answer.

Can you cd to the robot_localization directory on your machine and run git branch? The default branch for rl is ros2, so if you don't explicity checkout noetic-devel, it will see it as an ament package, which catkin doesn't understand.

ayrton04 commented 1 year ago

@larryferguson @gupta-divi @YXGuan can you please confirm the branch of r_l that you were trying to build? cd to the r_l directory and run git branch.

cst0 commented 1 year ago

My apologies for commenting on a closed issue, but I found this when I encountered this issue myself so I'm following up with a fix for others:

This error comes up for ROS 1 users if they (like me) accidentally leave their branch set to a ROS 2 branch (like the default one). ROS 2 uses ament and so catkin is nowhere to be found, hence the confusion for catkin_make (or catkin build). This is what ayrton04 mentioned on April 24th, and it seems safe to assume that's what everyone else here is encountering.

The fix is to make sure you're on a ROS 1 based branch (I used noetic-devel) and then everything works fine.