《ROS机器人开发实践》chapter 10 报错解决方案

环境:

Ubuntu 20.04
ROS-Noetic
所学教程:《ROS机器人开发实践》chapter 10


# 问题描述及解决方法:
  1. 工作空间编译报错,缺少相关功能包manipulation_msgshousehold_objects_database_msgs

Could not find a package configuration file provided by
“manipulation_msgs” with any of the following names:

官方已经不再维护,所以新的ROS版本无法通过apt install的方法安装了,需要通过源码编译。
源码仓库地址:https://github.com/ros-interactive-manipulation/manipulation_msgs 放到自己工作空间下面的src里面就好了, 然后回到根目录再编译一下.

在解决了manipulation/manipulation_msgs的问题以后, 会报错提示还有一个包household_objects_database_msgs也没装, 方法同上,地址为是: https://github.com/ros-interactive-manipulation/household_objects_database_msgs 。两个包都装好之后这个问题就解决了
【参考】:https://blog.csdn.net/qq_42145185/article/details/80975975?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link

  1. 报错:ModuleNotFoundError: No module named ‘thread’

启动机器人模型、ArbotiX控制器及rviz时报错,修改为

import _thread

原因:python3中threadthreading代替,thread被改名为_thread

  1. 无法执行python脚本trajectory_demo.py

报错如下

[rosrun] Couldn't find executable named trajectory_demo.py below /home/frankchen/code/ROS/catkin_ws/src/robot_marm/marm_planning
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun]   /home/frankchen/code/ROS/catkin_ws/src/robot_marm/marm_planning/scripts/trajectory_demo.py

原因是文件权限不足,终端切换进入到python脚本文件夹内,修改权限

$ sudo chmod +x trajectory_demo.py
  1. 报错RLException: unused args [execution_type] for include of [***/robot_marm/marm_moveit_config/launch/arm_moveit_controller_manager.launch.xml]

chapter10_9 中启动launch文件报错

xacro: in-order processing became default in ROS Melodic. You can drop the option.
RLException: unused args [execution_type] for include of [/home/frankchen/code/ROS/catkin_ws/src/robot_marm/marm_moveit_config/launch/arm_moveit_controller_manager.launch.xml]
The traceback for the exception was written to the log file

这是因为启动文件过程中,某个传递参数发生错误,这里是由于文件marm_moveit_config/launch/trajectory_execution.launch.xml中line 21,ROS自动生成的一行参数,

<arg name="execution_type" value="$(arg execution_type)" />

但实际上并不需要,注释掉就可以了。
【参考】https://answers.ros.org/question/378891/cannot-connect-moveit-with-gazebo/

你可能感兴趣的:(解决方案,ROS,机器人)