UR5e | Robotiq 2f-85 gripper
- UR5e
- Ubuntu 20.04.6
- Noetic
- Python3.8
#
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
# (or maybe we need the following due to the firewall)
# sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
#
sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
#
sudo apt update
#
sudo apt install ros-noetic-desktop-full
#
sudo apt search ros-noetic
#
source /opt/ros/noetic/setup.bash
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
#
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo apt install python3-rosdep
sudo rosdep init
rosdep updatesudo apt install ros-noetic-moveituniversal_robots_ros_driver | dirver_intro| universal_robot | real-time / linux
Binary-Version
# we set ${ROS_DISTRO} as noetic
sudo apt install ros-noetic-ur-robot-driver
sudo apt install ros-noetic-ur-calibration
sudo apt-get install ros-noetic-universal-robots
# set the source
source /opt/ros/${ROS_DISTRO}/setup.bashπ₯Development-Versionπ₯
# source global ros
source /opt/ros/noetic/setup.bash
# create a catkin workspace
mkdir -p catkin_ws/src && cd catkin_ws
# clone the driver
git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver
# clone the description.
git clone -b noetic-devel https://github.com/ros-industrial/universal_robot.git src/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
#@NOTICE : we need use the python/boost/... from ubuntu20.04 rather than anaconda
$ sudo gedit ~/.bashrc
#@NOTICE : remove the initialization of anaconda or any other environments# simulate the robot and environment in Gazebo
roslaunch ur_gazebo ur5e_bringup.launch
# use MoveIt for motion planning and control
roslaunch ur5e_moveit_config moveit_planning_execution.launch sim:=true
# finally visualize the whole process through RViz
roslaunch ur5e_moveit_config moveit_rviz.launchExternal-Control | InstallGuide
#### CONNECT ROBOT and PC ####
# the PC IPv4
address : 192.168.1.10
netmask : 255.255.255.0
gateway : 192.168.1.1
# the robot IPv4
address : 192.168.1.60
netmask : 255.255.255.0
gateway : 192.168.1.1# launch the ros score
roslaunch ur_robot_driver ur5e_bringup.launch use_tool_communication:=true tool_voltage:=24 tool_parity:=0 tool_baud_rate:=115200 tool_stop_bits:=1 tool_rx_idle_chars:=1.5 tool_tx_idle_chars:=3.5 tool_device_name:=/tmp/ttyUR
# test the ttyUR connection
rosrun ur_robot_driver tool_communication
# utilize just like the true serial
rosrun imaginary_drivers rs485_node device:=/tmp/ttyURExtract calibration information
roslaunch ur_calibration calibration_correction.launch robot_ip:=192.168.1.60 target_filename:="home/robot/my_robot_calibration.yaml"Notice : the version of URSoftware for e-series robots should no less than 5.5.1, if not we can update the software version of the UR pad through updates
- Starting the driver and visualizing the robot in RViz
- Control the robot
- Control the robot using MoveIt
#### Visualizing ####
# launch the driver
roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=192.168.1.60 kinematics_config:=/home/robot/my_robot_calibration.yaml
# in another terminal run rviz for visualization
roslaunch ur_robot_driver example_rviz.launch
#### Controling ####
rosrun ur_robot_driver test_move
#### Control the robot using Moveit ####
roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=192.168.1.60 kinematics_config:=/home/robot/my_robot_calibration.yaml
roslaunch ur5e_moveit_config moveit_planning_execution.launch
roslaunch ur5e_moveit_config moveit_rviz.launch rviz_config:=/home/robot/ur5e_ws/src/universal_robot/ur5e_moveit_config/launch/moveit.rviz
manual | through
ur-ros
# # official - only support until Melodic
# git clone https://github.com/ros-industrial/robotiq.git src/robotiq
# support for Noetic
git clone https://github.com/jr-robotics/robotiq.git src/robotiq
# 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π₯Method-1π₯ : 2f-85
Method-2 : 2f-85
π₯Method-3π₯ : 2f-85
# test the conection by Method-1
sudo usermod -a -G dialout $USER
dmesg | grep tty
#
roscore
# run the node
rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /dev/ttyUSB0
# run the controller
rosrun robotiq_2f_gripper_control Robotiq2FGripperSimpleController.py
# run the listener
rosrun robotiq_2f_gripper_control Robotiq2FGripperStatusListener.pyrefer to UR-Teleop | DiffsuionPolicy | through
ur_rtde
ur_rtdespnavrobotiq gripper|3D Connexion spacemouse|ur5e
- download dependencies of spacemouse
sudo apt install libspnav-dev spacenavd; sudo systemctl start spacenavd
pip install spnav- check if spacemouse is connected to workstation
lsusb- download
RTDElibrary
pip install ur_rtdeIn the spnav library, PyCObject_AsVoidPtr is deprecated. find . -name spnav on terminal to find spnav folder. Replace all instances of PyCObject_AsVoidPtr with PyCapsule_GetPointer inΒ init.py
ROS | Robotics Operating System | tutorial
- Initialize a ros
Noderospy.init_node('node_name', anonymous=True) - Publish the
msgrospy.Publisher('chatter', String, queue_size=10) - Subscribe the
msgrospy.Subscriber('chatter', String, callback) - Utilize the
serviceServersiderospy.Service('add_two_ints', AddTwoInts, handle_add_two_ints)Clientsiderospy.wait_for_service('add_two_ints')rospy.ServiceProxy('add_two_ints', AddTwoInts)
# show all of the topic we can use
rostopic list
# show a specific topic
rostopic info /topic_name
rostopic echo /topic_name
rostopic type /topic_name
# show the communication graph
rqtgraph