dual_arm2_ws(version1.0.0):本科毕设提交版本
一、依赖安装
cd dual_arm2_ws
catkin_make
若所需依赖包没安装,则会报错,提示找不到*****包
可以一个一个安装提示的包,也可以一次性全安装了:
rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
若安装时报错:
E: 存在未认证的软件包同时使用了 -y 选项,然而未搭配 --allow-unauthenticated
英文报错:
E:There were unauthenticated packages and -y was used without --allow-unauthenticated
解决方法:
sudo apt-get update
此时会报错:
正在读取软件包列表... 完成
W: GPG 错误:http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 8D5A09DC9B929006
W: 仓库 “http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease” 没有数字签名。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: 以下 ID 的密钥没有可用的公钥:********************
添加公钥:然后再sudo apt-get update
一次,就没问题了
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ********************(NO_PUBKEY后面的公钥)
此时就可以rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
安装依赖了
安装完就能catkin_make
编译了
这一步只是安装find_package中包括的依赖
二、其他所需依赖安装
安装完find_package中包括的依赖之后,只是可以编译通过,运行时会出问题
roslaunch dual_arm2_moveit moveit_planning_execution.launch#启动运行
会报错,原因是少了一堆控制器(controller),看报错装控制器就完事了
错误类似下面这样:
Could not load controller 'PositionJointInterface_right_trajectory_controller' because controller type 'position_controllers/JointTrajectoryController' does not exist.
Failed to load PositionJointInterface_right_trajectory_controller
针对这个报错;需要装JointTrajectoryController,故运行sudo apt-get install ros-kinetic-joint-trajectory-controller
但为了保险起见,joint相关的全装上:
sudo apt-get install ros-kinetic-joint-*
此外,还有ros-gazebo所需的一些控制器(position,velocity,force),否则机械臂在gazebo中软塌塌的
sudo apt-get install ros-kinetic-gazebo-*
sudo apt-get install ros-kinetic-force-torque-sensor*
sudo apt-get install ros-kinetic-velocity-controllers
sudo apt-get install ros-kinetic-control*
sudo apt-get install ros-kinetic-position-controllers