The Robot Raconteur Training Simulator is a Gazebo based simulator designed to help users learn Robot Raconteur. It provides simulated devices and Robot Raconteur device drivers.
Table of Contents:
The Robot Raconteur Training Simulator is a Gazebo based simulator that contains three scenes:
Universal Robot UR5e Scene
Multi Robot Scene
iRobot Create Scene
The training simulator provides multiple Robot Raconteur services. This section contains the default Robot Raconteur connection information for clients to connect to the service. Also see the Robot Raconteur Service Browser to detect services on the network. The services can be connected using a URL, Discovery, or Subscriptions. See the Robot Raconteur documentation for more information on connecting to services.
rr+tcp://localhost:52511?service=robot
ur5e_robot
ur5e1_robot
robot
com.robotraconteur.robotics.robot.Robot
rr+tcp://localhost:52512?service=robot
ur5e_robot_2
ur5e2_robot
robot
com.robotraconteur.robotics.robot.Robot
rr+tcp://localhost:52521?service=gripper
ur5e1_gripper
ur5e1_gripper
gripper
com.robotraconteur.robotics.tool.Tool
rr+tcp://localhost:52522?service=gripper
ur5e2_gripper
ur5e2_gripper
gripper
com.robotraconteur.robotics.tool.Tool
rr+tcp://localhost:59823?service=camera
gazebo_camera
com.robotraconteur.imaging.camera
camera
com.robotraconteur.imaging.Camera
rr+tcp://localhost:11346?service=GazeboServer
gazebosim
org.gazebosim.gazebo.GazeboServer
GazeboServer
org.gazebosim.gazebo.Server
rr+tcp://localhost:52511?service=robot
ur5e_robot
ur5e_robot
robot
com.robotraconteur.robotics.robot.Robot
rr+tcp://localhost:52512?service=robot
abb_robot
abb_robot
robot
com.robotraconteur.robotics.robot.Robot
rr+tcp://localhost:52513?service=robot
sawyer_robot
sawyer_robot
robot
com.robotraconteur.robotics.robot.Robot
rr+tcp://localhost:52521?service=gripper
ur5e_gripper
ur5e_gripper
gripper
com.robotraconteur.robotics.tool.Tool
rr+tcp://localhost:52522?service=gripper
abb_gripper
abb_gripper
gripper
com.robotraconteur.robotics.tool.Tool
rr+tcp://localhost:52523?service=gripper
sawyer_gripper
sawyer_gripper
gripper
com.robotraconteur.robotics.tool.Tool
rr+tcp://localhost:59823?service=camera
gazebo_camera
com.robotraconteur.imaging.camera
camera
com.robotraconteur.imaging.Camera
Use examples in https://github.com/robotraconteur/RobotRaconteur_Python_Examples to operate the iRobot Create scene.
rr+tcp://localhost:11346?service=GazeboServer
gazebosim
org.gazebosim.gazebo.GazeboServer
GazeboServer
org.gazebosim.gazebo.Server
Download and install Miniforge for Python 3.11 from https://github.com/conda-forge/miniforge?tab=readme-ov-file#download .
Open the Miniforge3 prompt by clicking Start -> Miniforge3 -> Miniforge Prompt
In the terminal, run the following to install the simulator:
conda create -c conda-forge -c robotraconteur -c wasontech -n rr_training_sim robotraconteur_training_sim
Download and install Miniforge for Python 3.11 from https://github.com/conda-forge/miniforge?tab=readme-ov-file#download .
The Linux installer will configure your system to start conda by default in new terminals. This can be disabled with the following command:
conda config --set auto_activate_base false
In a new terminal, run the following to install the simulator:
source ~/miniforge3/bin/activate
conda create -c conda-forge -c robotraconteur -c wasontech -n rr_training_sim robotraconteur_training_sim
The iRobot Create scene only contains the simulation. The simulated drivers are contained in the Python Examples repository. See https://github.com/robotraconteur/RobotRaconteur_Python_Examples
A shortcut is created in the Start menu on Windows. Click Start -> Robot Raconteur Training Sim -> RR Training Sim (create)
To run the simulation from the command line, open the Miniforge3 prompt by clicking Start -> Miniforge3 -> Miniforge Prompt
Run the following command:
conda activate rr_training_sim
run_create_sim
Open a new prompt and run the following commands to run the simulation:
source ~/miniforge3/bin/activate
conda activate rr_training_sim
run_create_sim
A shortcut is created in the Start menu on Windows. Click Start -> Robot Raconteur Training Sim -> RR Training Sim (2ur5e)
To run the simulation from the command line, open the Miniforge3 prompt by clicking Start -> Miniforge3 -> Miniforge Prompt
Run the following command:
conda activate rr_training_sim
run_2ur5e_sim
Open a new prompt and run the following commands to run the simulation:
source ~/miniforge3/bin/activate
conda activate rr_training_sim
run_2ur5e_sim
The simulator comes with several Robot Raconteur driver client example scripts. In a terminal with the rr_training_sim
conda environment active, such as the one used to start the simulator, run the following to cd to the directory containing the scripts:
Windows:
cd %CONDA_PREFIX%\gz_example\example_scripts
Linux:
cd $CONDA_PREFIX/gz_example/example_scripts
Jog example ur5_client_jog_freespace.py
- A client commanding the robot using the jog_freespace
command.
python ur5_client_jog_freespace.py
Position command example ur5_client_position_command.py
- A client commanding the robot using the position_command
wire member.
python ur5_client_position_command.py
Trajectory command example ur5_client_trajectory.py
- A client commanding the robot using the execute_trajectory
member generator function.
python ur5_client_trajectory.py
Camera single frame synchronous capture camera_client_captureframe.py
- An example camera client that synchronously captures a frame from the overhead camera.
python camera_client_captureframe.py
Camera streaming camera_client_image.py
- An example camera client that streams a preview of the overhead camera.
A shortcut is created in the Start menu on Windows. Click Start -> Robot Raconteur Training Sim -> RR Training Sim (multi robot)
To run the simulation from the command line, open the Miniforge3 prompt by clicking Start -> Miniforge3 -> Miniforge Prompt
Run the following command:
conda activate rr_training_sim
run_multi_robot_sim
Open a new prompt and run the following commands to run the simulation:
source ~/miniforge3/bin/activate
conda activate rr_training_sim
run_multi_robot_sim
The PyRI Open-Source Programming Environment and Teach Pendant can be used to operate and program the devices training simulator. It can manipulate the robots, operate the tools, and read the camera. It can also program the robots using restricted Python and Blockly. See https://github.com/pyri-project/pyri-core/blob/master/README.md
See the log files for the output of processes. On Windows, these are located at %LOCALAPPDATA%\drekar-launch\drekar-launch\Logs
.
On Linux the logs are located at $HOME/.cache/drekar-launch/log
.
Gazebo won't start
Sometimes gzserver
fails to quit properly. On Linux, run killall gzserver
. On Windows, use the Task Manager -> Details tab to kill gzserver
.
Gazebo or Drivers fail to start again after closing all windows
Linux sockets have a behavior called TIME_WAIT
, which means the socket will remain open for a few minutes after the program has exited. This can be checked using the command netstat -an | grep TIME_WAIT
. Try waiting a few minutes before restarting the simulation, or reboot the computer.
Connection Refused when trying to connect using a script
Check to make sure the drivers have all opened properly. Check the log files to make sure that all the processes are operating correctly. More debug information is available if the simulations are launched from the command line. Check the connection info in the section above for the simulation. Real devices will have different connection URLs and other values. Check the driver documentation for more information on connecting. Use the Robot Raconteur Service Browser to see if the driver is discoverable on the network. Try (temporarily) disabling the firewall if networking between computers is being used.
This work was supported in part bythe Advanced Robotics for Manufacturing ("ARM") Institute under Agreement Number W911NF-17-3-0004 sponsored by the Office of the Secretary of Defense. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of either ARM or the Office of the Secretary of Defense of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes, notwithstanding any copyright notation herein.
This work was supported in part by the New York State Empire State Development Division of Science, Technology and Innovation (NYSTAR) under contract C160142.