Slamtec / rplidar_ros

BSD 2-Clause "Simplified" License
488 stars 530 forks source link

Cannot compile on ROS melodic - RPI4 #26

Open phil123456 opened 4 years ago

phil123456 commented 4 years ago

Hi,

I cannot compile it under melodic (RPI4)

please help

-- +++ 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
phil123456 commented 4 years ago

after a lot of digging and help from "Ros Answers"...

phil123456 commented 4 years ago

https://github.com/Slamtec/rplidar_ros/pull/27