参考资料
cd catkin_ws
cd src
rm -rf <package_name>
cd ..
catkin_make
ubuntu20.04安装ros-noetic,moveit,ur机器人驱动…指南!
UR机械臂学习(5-2):使用Universal_Robots_ROS_Driver驱动真实机械臂
其他参考资料
Ros驱动Ur5e过程 | 手把手教程 | Ros驱动真实机器人Ur5e | Ros与Ur5e建立通讯 | Ubuntu20.04驱动Ur5e机器人
UR5机械臂+ROS noetic+Ubuntu20.04+moveit实物和仿真驱动
配置工作空间,move it
1
安装 catkin ,即 ROS 构建系统(ROS build system)
sudo apt install ros-noetic-catkin python3-catkin-tools
2
install wstool
sudo apt install python3-wstool
3
创建工作空间
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
第一次catkin_make遇到报错
解决方案:
ubuntu20.04出现Unable to find either executable ‘empy‘ or Python module ‘em‘… try
解决之后
要soure 一下,才能读取到工作空间里的文件,以后每次打开终端进入工作空间都要执行该命令。
source devel/setup.bash
不想每次都输入的话,那就输入下面命令,这样每次打开终端会自动source:
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
4 安装moveit
sudo apt install ros-noetic-moveit
安装UR机器人
安装UR机器人驱动
ubuntu20.04安装ros-noetic,moveit,ur机器人驱动…指南!
参考博客中【2021.6.7更新】部分,其中有rosdep的部分改成鱼香ros的rosdepc
关于为什么安装这些github包请看这篇博客UR机械臂学习(5-2):使用Universal_Robots_ROS_Driver驱动真实机械臂
—以下参考—
关于universal_robot 和 fmauch universal_robot
# universal_robot的下载地址 (不要用这个)
git clone -b melodic-devel https://github.com/ros-industrial/universal_robot.git
# fmauch_universal_robot的下载地址
git clone -b calibration_devel https://github.com/fmauch/universal_robot.git
—以上参考—
1 正式安装
—下面是正式安装过程
—
$ cd ~/catkin_ws/
#clone the driver
$ git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver
#clone fork of the description.
$ git clone -b calibration_devel https://github.com/fmauch/universal_robot.git src/fmauch_universal_robot
#clone ur_msgs
$ git clone https://github.com/ros-industrial/ur_msgs.git src/ur_msgs
rosdepc install --from-paths src --ignore-src -y
编译
catkin_make
source devel/setup.bash
测试1:
roslaunch ur3_moveit_config demo.launch
测试2:gazebo+move it +rviz
一定要参考这篇博客 UR机械臂学习(5-2):使用Universal_Robots_ROS_Driver驱动真实机械臂
# 启动gazebo
# 注意是ur3_bringup.launch,而不是ur3.launch
roslaunch ur_gazebo ur3_bringup.launch
# 启动move it规划
roslaunch ur3_moveit_config ur3_moveit_planning_execution.launch sim:=true
# 启动rviz
# 注意后面要给出rviz_config的地址
roslaunch ur3_moveit_config moveit_rviz.launch rviz_config:=$(rospack find ur3_moveit_config)/launch/moveit.rviz
这一部分另一个需要特别注意的是,执行最后一步,启rviz时,不能直接roslaunch ur3_moveit_config moveit_rviz.launch,而需要给出rviz的地址rviz_config:=$(rospack find ur3_moveit_config)/launch/moveit.rviz
不然rviz的界面显示不出ur机械臂的模型图
roslaunch ur_gazebo ur3_bringup.launch
roslaunch ur3_moveit_config ur3_moveit_planning_execution.launch sim:=true
roslaunch ur3_moveit_config moveit_rviz.launch rviz_config:=$(rospack find ur3_moveit_config)/launch/moveit.rviz