基于ROS kinetic的Aubo机械臂环境搭建步骤

网上更多的是基于ROS indigo和ROS jade搭建Aubo机械臂开发环境的教程,由于本人机器安装的系统为ubuntu16.04,故记录一下基于ROS kinetic的Aubo机械臂环境搭建步骤。

一、安装依赖

部分依赖包安装如下:

sudo apt-get install ros-kinetic-moveit
sudo apt-get install ros-kinetic-industrial-core
sudo apt-get install ros-kinetic-moveit-visual-tools

二、下载源码

一开始,我参考教程https://blog.csdn.net/sinat_38284212/article/details/101626539,从https://github.com/lg609/aubo_robot.git下载源码后,在执行rosdep install --from-paths src --ignore-src -r -y时报以下错误:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
aubo_robot: Cannot locate rosdep definition for [aubo_trajectory_filters]
该错误的意思是rosdep找不到名为aubo_trajectory_filters的包;

经过一番搜索,发现另外一个源代码地址:https://github.com/liuxinwust/aubo_robot,执行以下代码下载:

cd ~/catkin_ws/src
git clone -b kinetic-devel https://github.com/liuxinwust/aubo_robot.git


2019.11.1日更新:
经后来开发实践,发现https://github.com/liuxinwust/aubo_robot这个项目是两年前的,已经不能驱动现在的真实机械臂了,故还是采用https://github.com/lg609/aubo_robot.git的源码,参考教程https://blog.csdn.net/sinat_38284212/article/details/101626539

git clone https://github.com/lg609/aubo_robot.git

三、编译

执行编译:

cd ~/catkin_ws
catkin_make

发现进行到86%时报错如下:

/home/sbt/ws_moveit/src/aubo_robot/aubo_trajectory/trajectory_gen/src/trajectory_gen.cpp: In function ‘int goal_trajectory(double*)’:
/home/sbt/ws_moveit/src/aubo_robot/aubo_trajectory/trajectory_gen/src/trajectory_gen.cpp:29:41: error: cannot convert ‘moveit::planning_interface::MoveItErrorCode’ to ‘bool’ in initialization
       bool success = ptr_group->plan(my_plan);

参考文章:https://blog.csdn.net/wxflamy/article/details/79149537中的第4点解决问题

四、Rviz运动规划仿真

根据github的教程:https://github.com/liuxinwust/aubo_robot/tree/kinetic-devel
第一步先:
#roslaunch aubo_gazebo aubo_i5.launch
第二步(注意参数不能少):
#roslaunch aubo_i5_moveit_config aubo_i5_moveit_planning_execution.launch sim:=true
第三步:
#roslaunch aubo_i5_moveit_config moveit_rviz.launch config:=true

我一开始在运行的时候总是提示move_group和trajectory有错误,后来实在没找到问题所在,重装ROS解决问题。


2019.11.1更新:
根据https://github.com/lg609/aubo_robot.git中的Readme,
运行以下命令:

roslaunch aubo_i5_moveit_config moveit_planning_execution.launch robot_ip:=127.0.0.1 

出现报错:

/opt/ros/kinetic/lib/moveit_ros_move_group/move_group: error while loading shared libraries: libmoveit_robot_trajectory.so.0.9.15: cannot open shared object file: No such file or directory [move_group-6] process has died [pid 3479, exit code 127, cmd /opt/ros/kinetic/lib/moveit_ros_move_group/move_group __name:=move_group __log:=/home/dubq/.ros/log/957a5678-e28f-11e9-99ee-f0def166d64b/move_group-6.log].

错误提示找不到libmoveit_robot_trajectory.so.0.9.15,但是在opt\ros\kinetic\lib目录下可以找到libmoveit_robot_trajectory.so.0.9.17,此问题可能是执行sudo apt upgrade导致的,故重装moveit,即执行:

sudo apt remove ros-kinetic-moveit*
sudo apt install ros-kinetic-moveit

最后按照moveit官网:http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/quickstart_in_rviz/quickstart_in_rviz_tutorial.html进行运动规划仿真显示设置,
想更改运动学插件为ikfast可参考我的另一篇文章:https://blog.csdn.net/fanky_chan/article/details/102547859

参考目录:
1、https://blog.csdn.net/sinat_38284212/article/details/101626539
2、https://blog.csdn.net/wxflamy/article/details/79149537
3、https://blog.csdn.net/cstone123/article/details/96139241
4、https://blog.csdn.net/lingchen2348/article/details/81709404
5、https://github.com/lg609/aubo_robot
6、https://github.com/liuxinwust/aubo_robot/tree/kinetic-devel

你可能感兴趣的:(aubo)