环境配置:Ubuntu18.04(ROS-melodic)
1.首先安装ROS 和相应版本的MOVEIT
wget http://fishros.com/install -O fishros && . fishros
本人用的鱼香ROS的一键安装,十分的简便
sudo apt-get install ros-melodic-moveit
安装moveit
2.创建工作空间
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/lg609/aubo_robot.git
下载aubo源码这步,我是直接从github上下载的源码,记得选择对应版本的源码
cd ~/catkin_ws
catkin_make
对工作空间进行编译
3.下面是在编译过程中,终端报错的解决方案
(1)Could not find a package configuration file provided by
"moveit_visual_tools" with any of the following names:
moveit_visual_toolsConfig.cmake
moveit_visual_tools-config.cmake
sudo apt-get install ros-melodic-moveit-visual-tools
(2) Could not find a package configuration file provided by "industrial_msgs"
with any of the following names:
industrial_msgsConfig.cmake
industrial_msgs-config.cmake
sudo apt-get install ros-melodic-industrial-robot-client
(3)[ 18%] Built target MoveGroupInterface_To_Melodic
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
cd /usr/include
sudo ln -sf eigen3/Eigen Eigen
sudo ln -sf eigen3/unsupported unsupported
sudo ln -sf /usr/include eigen3/Eigen /usr/include/Eigen
sudo ln -sf /usr/include/eigen3/unsupported /usr/include/unsupported
sudo apt-get install ros-melodic-moveit-core
sudo apt-get install ros-melodic-industrial-core
(4)libprotobuf.so.9, needed by /home/user6/clx_ws/src/aubo_robot-melodic/aubo_driver/lib/lib64/aubocontroller/libauborobotcontroller.so, not found (try using -rpath or -rpath-link)
sudo apt-get update //更新资源列表
sudo apt-get install gdebi //安装gdebi
wget http://archive.ubuntu.com/ubuntu/pool/main/p/protobuf/libprotobuf9v5_2.6.1-1.3_amd64.deb //下载so.9
sudo gdebi ./libprotobuf9v5_2.6.1-1.3_amd64.deb //安装下载的so.9
https://blog.csdn.net/sinat_15213441/article/details/109837416?ops_request_misc=&request_id=&biz_id=102&utm_term=make%5B1%5D:%20***%20%5Baubo_robot-melod&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-2-109837416.nonecase&spm=1018.2226.3001.4187
//以上为解决libprotobuf.so.的链接
4.运行真实机械臂遇到的问题
首先一定要保证机械臂和上位机相互ping通后(在同一网段),在进行下一步。
下面是编译过程中终端报错 ,缺少aubo_driver这个包
[aubo_driver-4] process has died [pid 22465, exit code 127, cmd /home/lg/catkin_ws/devel/lib/aubo_driver/aubo_driver __name:=aubo_driver __log:=/home/lg/.ros/log/100b1666-b34d-11ed-bcd2-701a0469d499/aubo_driver-4.log].
log file: /home/lg/.ros/log/100b1666-b34d-11ed-bcd2-701a0469d499/aubo_driver-4*.log
rosrun aubo_driver aubo_driver
locate libconfig.so.11
sudo gedit /etc/ld.so.conf
进行路径编辑,添加以下路径
/home/lg/catkin_ws/src/aubo_robot-melodic/aubo_driver/lib/lib64/config/
/home/lg/catkin_ws/src/aubo_robot-melodic/aubo_driver/lib/lib64/log4cplus/
以上是我的路径,记得改成自己的路径
sudo ldconfig //保存
rosrun aubo_driver aubo_driver //再次运行
https://blog.csdn.net/weixin_61052385/article/details/124456808 //参考连接
在18.04我是改了两次,就可以rosluanch啦!!
roslaunch aubo_i5_moveit_config moveit_planning_execution.launch sim:=false robot_ip:=192.168.10.10
用网线把上位机与控制箱链接,运行以上代码,可以看到Rviz和真实机械臂姿态一样就代表成功啦