学习笔记:Ubuntu18.04+melodic+UR5e真实机械臂的驱动

        目前UR驱动真实机械臂的官网最新的驱动只适应ubuntu20.04,用ubuntu18.04编译会出现代码中一些函数报错的问题,报错结果如下图所示:

        想要在melodic上正常运行,得找到之前的版本,具体流程如下:

# source global ros
source /opt/ros/melodic/setup.bash

# create a catkin workspace
mkdir -p catkin_ws/src && cd catkin_ws

# clone the driver
git clone -b debugging_tool https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver

# clone fork of the description. This is currently necessary, until the changes are merged upstream.
git clone -b calibration_devel https://github.com/fmauch/universal_robot.git src/fmauch_universal_robot

# install dependencies
sudo apt update -qq
rosdep update
rosdep install --from-paths src --ignore-src -y

# build the workspace
catkin_make

# activate the workspace (ie: source it)
source devel/setup.bash

其中,这句话

git clone -b debugging_tool https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver

中的debugging_tool版本则是适用于melodic的。至此驱动包下载编译完成,此部分的参考文献:

UR机械臂学习(5-2):使用Universal_Robots_ROS_Driver驱动真实机械臂_waiting for scaled_pos_joint_traj_controller/follo-CSDN博客

如果在运行rosdep install --from-paths src --ignore-src -y时,遇到这样的问题:

        ur_robot_driver: Cannot locate rosdep definition for [cartesian_trajectory_controller]

那么可执行sudo apt-get install ros-melodic-cartesian-trajectory-controller,即以sudo apt-get install ros-melodic-xx-xx的命令解决。

之后还需要在示教器上进行操作。此部分参考文献:

UR机械臂学习(5-1):驱动真实机械臂准备工作——示教器配置_ur示教盒操作指南-CSDN博客

这两篇文章都讲的挺详细的,但我建议最好还是去看github上的官方说明,那个更为可靠。

上面两个操作完成后,便可以对机械臂进行矫正和运行:

roslaunch ur_calibration calibration_correction.launch   robot_ip:=192.168.x.x target_filename:="/home/xiongyi/Learning_Code/RobotGrasp/catkin_ws/my_robot_calibration.yaml"
roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=192.168.x.x  kinematics_config:=/home/xiongyi/Learning_Code/RobotGrasp/catkin_ws/my_robot_calibration.yaml
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值