- This file contains a summary of progress related to using Universal Robots' (UR) cobot model UR3e in conjunction with the Robot Operating System 2 (ROS2) framework.
- This file is a draft and will be updated throughout the day.
- ROS2 is a framework that provides a distributed architecture for robots.
- The primary purpose of the framework is to enable programmers to more conveniently interact with robots without needing intimate knowledge of their underlying architecture
- The intent behind ROS2 is that communities will develop libraries defining common functionality for interacting with the robot that can be easily reused.
- UR has two official ROS2 libraries; the UR driver and the UR client library.
- The UR driver is responsible for facilitating low-level communication. Essentially, it converts messages between formats from UR
$\rightarrow$ ROS2 and ROS2$\rightarrow$ UR. - The UR client library is responsible for defining high-level functionality such as moving the cobot or collecting data; it sends these actions using the UR Driver.
- This library is written in C++ which poses challenges for our project.
- A Python implementation can be written ourselves but would likely require significant effort.
- I was able to create a connection between the UR simulator and the UR Driver with certain caveats.
- The UR driver makes a connection with the UR simulator; I'm current testing it's ability to receive ROS2 commands.
- The UR driver fails to launch related modeling resources likely due to hardware resources. This may not be an issue as it does not appear to directly impact our ability to use the ROS2 client library.
- Docker
- The UR driver does not support Windows; therefore, I decided to use two containers and a container network managed by Docker.
- The Docker network was setup with the following command:
docker network prune
docker network create --subnet=192.168.56.0/24 ursim_net
-
Container1 uses the official UR simulator image and is launched with the following settings:
docker run --rm -it -e ROBOT_MODEL=UR3e --net ursim_net --ip 192.168.56.101 -p 30002:30002 -p 30004:30004 -p 6080:6080 universalrobots/ursim_e-series
-
Container2 uses the community contributed ROS2 Humble image and is launched with the following command:
docker run -it --net ursim_net osrf/ros:humble-desktop
-
Communication between the two containers can be verfied and observed with the following actions performed within container2:
sudo apt-get update sudo apt-get install iputils-ping ping 192.168.56.101
PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data. 64 bytes from 192.168.56.101: icmp_seq=1 ttl=64 time=0.758 ms 64 bytes from 192.168.56.101: icmp_seq=2 ttl=64 time=0.451 ms 64 bytes from 192.168.56.101: icmp_seq=3 ttl=64 time=0.043 ms
-
The ROS2 driver can then be instantiated with the following actions in container2:
sudo apt-get install ros-humble-ur-robot-driver ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur3e robot_ip:=192.168.56.101 launch_rviz:=false
- I believe this is an indication that the driver successfully connected with the cobot.
-
I plan to test the connection and explore how to send ROS2 library commands using container2.
-
I plan to configure the Windows X Server to render Rviz1 running in container2.
Footnotes
-
Rviz is a third party modeling software that comes prepackaged with ROS2. ↩