Interface between Universal robots and mc_rtc. Provides connectivity with UR5e | UR7e and UR10 robots.
Please note that it has not been tested with the latest Polyscope version (5.24).
- mc_rtc
- ur10
- robot_module : https://github.com/isri-aist/mc_ur10
- description : https://github.com/isri-aist/mc_ur10_description
- ur5e | ur7e
- robot_module : https://github.com/isri-aist/mc_ur5e
- description : https://github.com/isri-aist/mc_ur5e_description
- ur_rtde library
- ur_modern_driver
- From PPA :
sudo add-apt-repository ppa:sdurobotics/ur-rtde
sudo apt-get update
sudo apt install librtde librtde-dev
- From Source :
$ git clone https://gitlab.com/sdurobotics/ur_rtde.git
$ cd ur_rtde
$ mkdir build
$ cd build
$ cmake -DPYTHON_BINDINGS:BOOL=OFF ..
$ make
$ sudo make install
$ git clone https://github.com/jrl-umi3218/ur_modern_driver
$ cd ur_modern_driver
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
$ git clone https://github.com/isri-aist/mc_rtde
$ cd mc_rtde
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
Make sure user account has sufficient memory limits.
Edit /etc/security/limits.conf by adding the following line :
USERNAME - memlock 1000000000
Then log-out and log-in or reboot, to confirm the new limit :
ulimit -lMCControlRtde will not pick up ROS libraries. If you're using mc_rtc's ROS plugin, create this file /etc/ld.so.conf.d/ros.conf with the following content:
/opt/ros/${ROS_DISTRO}/lib
Run the following command after this change:
$ sudo ldconfig
To use the interface and connect to a real robot run
$ MCControlRtde --help
MCControlRTDE options:
--help Display help message
-f [ --conf ] arg Configuration file
see etc/mc_rtc_ur.yaml for mc_rtde configuration example
$ MCControlRtde -f <mc_rtc_configuration_file.conf>
Where <mc_rtc_configuration_file.yaml> is based on (e.g).
<INSTALL_PREFIX>/etc/mc_rtde/<robot>.yaml --> /usr/local/etc/mc_rtde/mc_rtc_ur.yaml
Your mc_rtc configuration file (~/.config/mc_rtc/mc_rtc.yaml) should contain the following lines:
MainRobot: UR5e # or UR10 / UR7e
Enabled: YourController
Timestep: 0.001
# Set a LogPolicy suitable for real-time
LogPolicy : threaded
# Interface specific parameters (mc_rtde)
RTDE:
ControlMode: Position # Can be: Position/Velocity/Torque
ur5e: # Name of the robot in the controller
ip: "localhost"
driver: "ur_rtde" # Can be: "ur_rtde" (>=CB3) or "ur_modern_driver" (<=CB2). Default: ur_rtde
ur7e: # Name of the robot in the controller
ip: "localhost"
ur10: # Name of the robot in the controller
ip: "localhost"Run the program:
$ MCControlRtdeYou can also provide an additional configuration file (to swap between different network configurations easily for example):
$ MCControlRtde -f conf.yamlIt may happen that some libraries are not found due to the high priviligies given for real-time scheduling. To overcome it, please consider running the following commands :
echo "$HOME/workspace/src/catkin_data_ws/install/lib" | sudo tee -a /etc/ld.so.conf.d/mc_rtc_ros.conf
echo "$HOME/workspace/install/lib" | sudo tee -a /etc/ld.so.conf.d/mc_rtc.conf
echo "/opt/ros/humble/lib" | sudo tee -a /etc/ld.so.conf.d/ros2.confThen run the following command :
sudo ldconfigWe noticed that a segfault happens when using rmw_cyclonedds_cpp as RMW.
Please consider using the following one :
export RMW_IMPLEMENTATION=rmw_fastrtps_cppThis is tested with PolyScope 5.25, but 5.23 and 5.24 versions of the software may run into the same issue.
Some of the services used to connection might be disable by default. Consider following these steps on the teach pendant to enable them.
- Make sure you are in Local Control mode.
- Go to Hamburger menu > Settings > Security > Services and enable these services:
- Dashboard Server
- Primary Client Interface
- Secondary Client Interface
- Real-Time Client Interfcae
- Real-Time Data Exchange (RTDE)