ROS使用笔记,错误解决记录——持续更新
书籍:ROS机器人编程:原理与应用;现代机器人学:机构、规划与控制ROS网络架构卸载ROS安装的软件包和依赖包sudo apt-get purge ros-kinetic-包名sudo apt-get autoremove开发工具链:gazebo,webots, autolabor; roboware studio1. 查看节点实时数据情况:rostopic echo /joint_states2
书籍:ROS机器人编程:原理与应用;现代机器人学:机构、规划与控制
ROS网络架构
卸载ROS安装的软件包和依赖包
sudo apt-get purge ros-kinetic-包名
sudo apt-get autoremove
开发工具链:
gazebo,webots, autolabor; roboware studio
1. 查看节点实时数据情况:rostopic echo /joint_states
2. USB摄像头标定:
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/usb_cam/image_raw camera:=/usb_cam
采集样本
点击CALIBRATE按钮,稍等1-2分钟,可以在命令窗中看到标定参数,点击COMMIT将结果保存到电脑路径:/home/sun/.ros/camera_info/head_camera.yaml,再次启动相机时就不会有Camera Calibration文件找不到的警告了
3. 流程:相机内参标定,相机外参标定,物体检测/识别得到坐标,类别,姿态,路径规划和抓取姿态规划,
4. 错误:Could not find a package configuration file provided by "moveit_visual_tools" with any of the following names
解决:sudo apt-get install ros-kinetic-moveit-visual-tools
5.gazebo 升级
sudo apt-get remove ros-kinetic-gazebo*
sudo apt-get remove libgazebo*
sudo apt-get remove gazebo*
手动创建/etc/apt/sources.list.d/gazebo-stable.list,并写入
deb http://packages.osrfoundation.org/gazebo/ubuntu-stable xenial main
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-kinetic-gazebo9-*
# test
gazebo
6.手眼标定
sudo apt-get install ros-kinetic-industrial-core
sudo apt-get install ros-kinetic-visp
- aruco_ros
cd ~/catkin_ws/src git clone -b kinetic-devel https://github.com/pal-robotics/aruco_ros.git cd .. catkin_make
- vision_visp / visp_hand2eye_calibration
cd ~/catkin_ws/src git clone -b kinetic-devel https://github.com/lagadic/vision_visp.git cd .. catkin_make --pkg visp_hand2eye_calibration
- easy_handeye
cd ~/catkin_ws/src git clone https://github.com/IFL-CAMP/easy_handeye cd .. catkin_make
7. 安装ROS集成的opencv库
sudo apt-get install ros-kinetic-vision-opencv libopencv-dev python-opencv
问题点解决:
1. Could NOT find compressed_image_transport
sudo apt-get install ros-kinetic-compressed-image-transport
2. Could NOT find compressed_depth_image_transport
sudo apt-get install ros-kinetic-compressed-depth-image-transport
3. Could NOT find industrial_msgs
sudo apt-get install ros-kinetic-industrial-msgs
4. Could NOT find interactive_markers
sudo apt-get install ros-kinetic-interactive-markers
5. Could NOT find moveit_ros_perception
sudo apt-get install ros-kinetic-moveit-ros-perception
6. Could NOT find moveit_ros_planning_interface
sudo apt-get install ros-kinetic-moveit-ros-planning*
7. Could NOT find rviz
sudo apt-get install ros-kinetic-rviz
8. Could NOT find gazebo_plugins
sudo apt-get install ros-kinetic-gazebo-*
9. VISP找不到,安装VISP
sudo apt-get install ros-kinetic-vision-visp
10. fatal error: pcl_conversions/pcl_conversions.h: 没有那个文件或目录
解决方法
sudo apt-get install ros-kinetic-pcl-conversions
sudo apt-get install ros-kinetic-pcl-ros
sudo apt-get install ros-kinetic-pcl-msgs
11. Missing resource camera_calibration
sudo apt-get install ros-kinetic-image-pipeline
ROS 错误及解决方法:
问题1:书中所说的ROS2的问题
解决方案:
该问题属于ROS和ROS2的不兼容造成,直接把ROS2移除即可。
问题2:关于ECTO的报错报错信息如下
Could not find the required component ‘ecto’. 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 /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by “ecto” with any of the following names: ectoConfig.cmake ecto-config.cmake Add the installation prefix of “ecto” to CMAKE_PREFIX_PATH or set “ecto_DIR” to a directory containing one of the above files. If “ecto” provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): ros_exploring-master/robot_perception/ork_tutorials/CMakeLists.txt:4 (find_package)
解决方案:
1,若是Kinetic可直接使用如下命令安装
$ sudo apt-get install ros-kinetic-ecto
2,若是Melodic可以用下面这篇博客解决
https://blog.csdn.net/ckkboy/article/details/99584987
问题3:缺少 manipulation-msgs
1,若是Kinetic可直接使用如下命令安装
$ sudo apt install ros-kinetic-manipulation-msgs
2,若melodic版本如下解决,在src目录下git clone 仓库编译即可
$ cd your_path/src $ git clone https://github.com/ros-interactive-manipulation/manipulation_msgs.git
问题4:在编译讯飞语音库的时候报错,这个书籍给出解决方案
$ sudo cp ros_exploring/robot_perception/robot_voice/libs/x64/libmsc.so /usr/lib/libmsc.so
问题5:关于Tutorials.cfg的报错
/ros_exploring/ros_advanced/dynamic_tutorials/cfg/Tutorials.cfg: Permission denied
解决方法:
加上权限即可 sudo chmod +x Tutorials.cfg
问题5:缺少household msgs,该问题解决方案和问题3一样,下载链接如下
https://github.com/ros-interactive-manipulation/household_objects_database_msgs.git
总结:
编译过程中可能还会遇到诸如gazebo等等这些库缺失可以直接使用ros-melodic-你要找的进行安装即可。欢迎大家学习交流。
更多推荐
所有评论(0)