ROS-Melodic版本编译机器人源码报错问题及解决方法

1.Could not find the required component ‘uuid_msgs’.
sudo apt-get install ros-melodic-uuid-msgs

2.Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)
sudo apt-get install libsdl-dev

3.Could NOT find SDL_image (missing: SDL_IMAGE_LIBRARIES
SDL_IMAGE_INCLUDE_DIRS)
sudo apt-get install libsdl-image1.2-dev

4.Could not find a package configuration file provided by “libuvc” with any
of the following names:
git clone https://github.com/libuvc/libuvc
cd libuvc
mkdir build
cd build
cmake …
make && sudo make install

5.CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message):
Project ‘cv_bridge’ specifies ‘/usr/include/opencv’ as an include dir,
which is not found.

CMake Error at /opt/ros/melodic/share/image_geometry/cmake/image_geometryConfig.cmake:113 (message):
Project ‘image_geometry’ specifies ‘/usr/include/opencv’ as an include dir,
which is not found.

只需修改上述路径中的cv_bridgeconfig.cmke和image_geometryConfig.cmake文件,
将100行附近的两个opencv改成opencv4即可(注意,只需要改动单独一个的opencv,前面有连字符的opencv不需要改动)

6.CMake Error at realsense-ros-development/realsense2_camera/CMakeLists.txt:47 (message):
sudo apt-get install ros-melodic-realsense2-camera

7.Checking for module ‘orocos-bfl’
– No package ‘orocos-bfl’ found
sudo apt-get install ros-melodic-bfl

8.Could not find the required component ‘serial’.
sudo apt-get install ros-melodic-serial

9.Could NOT find tf2_sensor_msgs
sudo apt-get install ros-melodic-tf2-sensor-msgs

10.Could not find the required component ‘move_base_msgs’
sudo apt-get install ros-melodic-move-base-msgs

11.Could NOT find costmap_converter
sudo apt-get install ros-melodic-costmap-converter

12.Could not find a package configuration file provided by “mbf_costmap_core”
sudo apt-get install ros-melodic-mbf-costmap-core

13.Could not find a package configuration file provided by “mbf_msgs” with any
of the following names:
sudo apt-get install ros-melodic-mbf-msgs

14.Unable to find SuiteSparse
sudo apt-get install libsuitesparse-dev

15.Could not find libg2o!
sudo apt-get install ros-melodic-libg2o

16.Could NOT find async_web_server_cpp
sudo apt-get install ros-melodic-async-web-server-cpp

17.Could not find a package configuration file provided by “joy” with any of
the following names:
sudo apt-get install ros-melodic-joy

18.Could not find a package configuration file provided by “ZED” (requested
version 3) with any of the following names:
尚未解决,暂时删除zed-ros-wrapper-master文件夹

19./home/zsq/catkin_ws/src/ldlidar_14/src/cmd_interface_linux.cpp:11:10: fatal error: libudev.h: No such file or directory
sudo apt-get install libudev-dev

20./usr/bin/ld: cannot find -lmsc
sudo cp src/xf_mic_asr_offline/lib/arm64/libmsc.so /usr/lib/

21.error “OpenCV 4.x+ requires enabled C++11 support”
尚未解决,暂时删除darknet_ros文件夹

22.camera_driver.cpp:(.text+0xd00): undefined reference to `uvc_free_frame’
在ros_astra_camera的CmakeList.txt文件的find_package(libuvc REQUIRED)下方添加两条语句(根据你libuvc安装的地址修改)
set(libuvc_INCLUDE_DIRS “/home/zsq/catkin_ws/libuvc/build/include/libuvc”)
set(libuvc_LIBRARIES “/home/zsq/catkin_ws/libuvc/build/libuvc.so”)

23.c++: internal compiler error: 已杀死 (program cc1plus)
sudo d.d if=/dev/zero of=/swapfile bs=64M count=32
#count的大小就是增加的swap空间的大小,64M是块大小,所以空间大小是bs*count=2048MB
sudo mkswap /swapfile
#把刚才空间格式化成swap格式
chmod 0600 /swapfile
sudo swapon /swapfile
#使用刚才创建的swap空间

释放空间命令
swapoff -a
过程中可以使用free -m命令来查看交换空间使用情况。

24.执行rosrun turn_on_wheeltec_robot wheeltec_robot_node报
wheeltec_robot can not open serial port,Please check the serial port cable!

串口创建别名
https://blog.csdn.net/zong596568821xp/article/details/78579734
需要重新插拔USB
/dev/wheeltec_controller修改为/dev/ttyUSB0
chmod 777 /dev/ttyUSB0

你可能感兴趣的:(ROS机器人系统,机器人)