1. Robotic arm drive installation (used to drive a real robotic arm)
UR robotic arm version | drive selection |
---|---|
version≤3.9 | ur_modern_driver |
version≥3.9 | ur_robot_driver |
Here the robot boot teach pendant will display the version, my robot version number is 3.15.3
#创建工作空间
mkdir -p ~/ur5_ws/src && cd ur5_ws/src
# 下载机器人驱动包
git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver
git clone -b calibration_devel https://github.com/fmauch/universal_robot.git src/fmauch_universal_robot
# 安装依赖
cd ..
sudo apt update -qq
rosdep update
rosdep install --from-paths src --ignore-src -y
#编译工作空间
catkin_make
# 添加环境变量
echo "source ~/ur5_ws/devel/setup.bash" >> ~/.bashrc
source ~/ur5_ws/devel/setup.bash
2. Simulation command test
#打开终端,启动
soure ~/ur5_ws/devel/setup.bash
roslaunch ur_gazebo ur5e_bringup.launch
#打开新终端
soure ~/ur5_ws/devel/setup.bash
roslaunch ur5e_moveit_config ur5e_moveit_planning_execution.launch sim:=true
#再打开一个新终端
soure ~/ur5_ws/devel/setup.bash
roslaunch ur5e_moveit_config moveit_rviz.launch config:=true
1. Change the Fixed Frame coordinate system to base
2. You need to find the above two modules (motionPlanning and robotModel) in the Add option
3. Connect the ur5e physical robot
1. Physical robot configuration
1.1 Install externalcontrol-1.0.5.urcap on the entity UR robot side
(1) 首先,打开下载的文件路径Universal_Robots_ROS_Driver/ur_robot_driver/resources下载externalcontrol-1.0.4.urcap,然后用自己的U盘拷贝到UR机器人。
The operation is as shown in the figure:
after the addition is completed, restart the robotic arm and create a new program in the program, put the external control into the program tree, click save->save program as, and name it externalcontrol.urp
1.2 Set IP address
URL of external control:
here external control refers to the computer's ip needs to be set in the computer network
Set the robot IP address:
After the setting here is complete, use the computer to ping the IP address of the robot
ping 192.168.125.100
The following is a successful connection
PING 192.168.125.100 (192.168.125.100) 56(84) bytes of data.
64 bytes from 192.168.125.100: icmp_seq=1 ttl=64 time=0.343 ms
64 bytes from 192.168.125.100: icmp_seq=2 ttl=64 time=0.155 ms
64 bytes from 192.168.125.100: icmp_seq=3 ttl=64 time=0.172 ms
64 bytes from 192.168.125.100: icmp_seq=4 ttl=64 time=0.207 ms
64 bytes from 192.168.125.100: icmp_seq=5 ttl=64 time=0.233 ms
64 bytes from 192.168.125.100: icmp_seq=6 ttl=64 time=0.132 ms
64 bytes from 192.168.125.100: icmp_seq=7 ttl=64 time=0.129 ms
1.3 Setting up the robot
In the installation settings, write the computer IP and computer name, 50002 is the port number,
do not start the third step for the time being without modification, wait for the computer to start the ros command and then start, before starting, reduce the joint speed of the robot, the default 100%
Turn on the robot and power it on, open the computer terminal and input
roslaunch ur_robot_driver ur5_bringup.launch limited:=true robot_ip:=192.168.125.100
Start movite and rviz in order
# 新终端启动moveit
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true
# 新终端启动rviz
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
Then click start on the teach pendant, (perform the third step of the above steps) and turn down the robot speed! ! ! ! !
After startup, configure rviz as shown in the figure, click add to add robotmodel and motionPlanning modules
Configure here in the motionPlanning module, you can drag the rviz robot to move, plan is the simulation movement, execute is the real robot movement
So far the Ur5 robot has been installed.