ROS使用笔记,错误解决记录——持续更新

 

书籍:ROS机器人编程:原理与应用;现代机器人学:机构、规划与控制

 

ROS网络架构

(二)ROS入门——2.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-你要找的进行安装即可。欢迎大家学习交流。

 

  • 3
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值