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

cannot compile RPLIDAR package

asked 2020-03-05 14:58:14 -0600

phil123456 gravatar image

updated 2020-03-06 01:03:59 -0600

gvdhoorn gravatar image

Hello,

I try to compile RPLIDAR package on a RPI4 (melodic)

simple steps

cd ros_catkin_ws
git clone https://github.com/robopeak/rplidar_ros.git
catkin_make

here is the error (sorry I cant format this better) :

-- +++ processing catkin package: 'rplidar_ros'
-- ==> add_subdirectory(rplidar_ros)
-- Could NOT find sensor_msgs (missing: sensor_msgs_DIR)
-- Could not find the required component 'sensor_msgs'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /home/pi/ros_catkin_ws/devel/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "sensor_msgs" with
  any of the following names:

    sensor_msgsConfig.cmake
    sensor_msgs-config.cmake

  Add the installation prefix of "sensor_msgs" to CMAKE_PREFIX_PATH or set
  "sensor_msgs_DIR" to a directory containing one of the above files.  If
  "sensor_msgs" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  rplidar_ros/CMakeLists.txt:12 (find_package)


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

2 Answers

Sort by » oldest newest most voted
0

answered 2020-03-05 15:04:32 -0600

See my answer here.

You must have it installed. This is the generic CMake error of "this isn't installed, or you haven't given me a path to it".

edit flag offensive delete link more

Comments

sorry but it does not work

sudo apt-get install ros-melodic-sensor_msgs ---------> Unable to locate package ros-melodic-sensor_msgs

phil123456 gravatar image phil123456  ( 2020-03-05 15:23:32 -0600 )edit

ros-melodic-sensor-msgs. There are only dashes, no underscores. Please look at the rosdep documentation as I suggest in that other answer.

stevemacenski gravatar image stevemacenski  ( 2020-03-05 15:48:34 -0600 )edit

If the OP has built ROS from source (as in: all of ROS), then apt cannot be used to install additional packages.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-06 01:04:46 -0600 )edit

why are there no packages available ? anyone can build melodic on RPI4, it's quiet straightforward

phil123456 gravatar image phil123456  ( 2020-03-06 01:59:59 -0600 )edit
1

also what's the alternative ? how do I install/build sensor_msgs manualy ?

phil123456 gravatar image phil123456  ( 2020-03-06 02:00:40 -0600 )edit
0

answered 2020-03-06 11:19:59 -0600

phil123456 gravatar image

so far, I cloned https://github.com/ros/common_msgs/tr... outside of ros catkin workspace

copied the 2 missing packages to mays ros catkin src and ran the make again

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-03-05 14:58:14 -0600

Seen: 617 times

Last updated: Mar 06 '20