Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ROS 2 Nodes & Parameters

Node: sas_robot_driver_coppeliasim_node

PropertyValue
Executablesas_robot_driver_coppeliasim_node
ROS node namemyrobot_1 (set by the name launch argument of robot_launch.py)
DescriptionRobot driver node for CoppeliaSim. Reads all parameters, instantiates RobotDriverCoppeliaSim (ZMQ interface to the simulated robot) and RobotDriverROS (runs the control loop).

Parameters

ParameterTypeMandatory / OptionalDefaultPurpose
joint_limits_minarray of doubles (degrees)Mandatorynone — must be providedMinimum joint limits; converted from deg → rad internally
joint_limits_maxarray of doubles (degrees)Mandatorynone — must be providedMaximum joint limits; converted from deg → rad internally
robot_joint_namesarray of stringsMandatorynone — must be providedNames of the robot joints to control
thread_sampling_time_secdoubleMandatorynone — must be providedSampling period of the robot control-loop thread (e.g. 0.002 s = 500 Hz)
ipstringOptional127.0.0.1CoppeliaSim (ZMQ) IP address
portintOptional23000CoppeliaSim (ZMQ) port number
timeoutintOptional1000ZMQ connection timeout, in milliseconds

How mandatory/optional is determined in code:

Sample launch

launch/robot_launch.py starts the node with the parameters from config/config.yaml:

ros2 launch sas_robot_driver_coppeliasim robot_launch.py

To use a different node name or configuration file:

ros2 launch sas_robot_driver_coppeliasim robot_launch.py name:=myrobot_2 config_file:=/path/to/config.yaml

ROS2 Python Scripts In CoppeliaSim

https://github.com/user-attachments/assets/3d6222b8-e683-4039-ab72-d6a7ad08ba51

Run the following.

mkdir -p ~/sas_tutorial_workspace/docker/sas_robot_driver_coppeliasim
cd ~/sas_tutorial_workspace/docker/sas_robot_driver_coppeliasim/
curl -OL https://raw.githubusercontent.com/MarinhoLab/sas_robot_driver_coppeliasim/refs/heads/jazzy/docker_sample/run_docker_sample.sh
chmod +x run_docker_sample.sh
./run_docker_sample.sh

Notes

Adding capabilities to your own scenes

Use the following convenience scripts for the most common functionalities.

.devcontainer/sas_object_script.pyAdd as immediate child to the root of an object in the scene, for instance, to get and send poses.
.devcontainer/sas_robot_script.pyAdd as immediate child to the root of a serial-link robot to create a sas::RobotDriverServer for it.

Unusual use cases can be covered by the classes in the Python module sas_robot_driver_coppeliasim.