ur_ros2
Universal Robots ROS 2 interface implementations.
This module defines Universal Robots ROS 2-backed robot wrappers used by RobotBlockSet robot interfaces. It provides communication plumbing, controller integration, state feedback handling, and motion-execution helpers for multiple robot platforms.
- class robotblockset.ros2.ur_ros2.ur_ros2(name: str = 'ur10', namespace: str = '', control_strategy: str = 'JointPositionTrajectory')[source]
Bases:
robot_ros2Generic Universal Robots ROS 2 interface.
- Attributes:
robot_mode (RobotMode | None) – Last robot-mode message received from the dashboard interface.
safety_mode (SafetyMode | None) – Last safety-mode message received from the dashboard interface.
Initialize a ROS 2 Universal Robots interface.
- Parameters:
name (str, optional) – Name of the robot node.
namespace (str, optional) – Namespace for the robot topics, services, and actions.
control_strategy (str, optional) – Initial RobotBlockSet control strategy.
Notes
The constructor configures the joint-trajectory controller interface, subscribes to wrench, robot-mode, and safety-mode topics, starts the ROS 2 executor thread, and initializes the robot state.
- __init__(name: str = 'ur10', namespace: str = '', control_strategy: str = 'JointPositionTrajectory') None[source]
Initialize a ROS 2 Universal Robots interface.
- Parameters:
name (str, optional) – Name of the robot node.
namespace (str, optional) – Namespace for the robot topics, services, and actions.
control_strategy (str, optional) – Initial RobotBlockSet control strategy.
Notes
The constructor configures the joint-trajectory controller interface, subscribes to wrench, robot-mode, and safety-mode topics, starts the ROS 2 executor thread, and initializes the robot state.
- isReady() bool[source]
Check whether the robot is ready for motion.
- Returns:
Trueif the safety mode isNORMAL, otherwiseFalse.- Return type:
bool
Notes
This readiness check reflects the reported safety mode and does not guarantee that the motion controller is active.
- inMotion() bool[source]
Check whether the robot reports running motion.
- Returns:
Trueif the robot-mode state isRUNNING.- Return type:
bool
- Check(silent: bool = False) List[str][source]
Check the robot status and return active issues.
- Parameters:
silent (bool, optional) – If
True, suppress status messages while checking the robot state.- Returns:
Status strings describing conditions that prevent normal operation.
- Return type:
list[str]
Notes
The returned list is empty when the robot is ready and active.
- class robotblockset.ros2.ur_ros2.ur10e(name: str = 'ur10e', namespace: str = '', control_strategy: str = 'JointPositionTrajectory')[source]
Bases:
ur_ros2,ur10e_specROS 2 interface for the Universal Robots UR10e platform.
- Attributes:
All attributes from :class:`ur_ros2` and :class:`ur10e_spec`.
Initialize the ROS 2 UR10e robot wrapper.
- Parameters:
name (str, optional) – Name of the robot node.
namespace (str, optional) – Namespace for the robot topics, services, and actions.
control_strategy (str, optional) – Initial RobotBlockSet control strategy.
- __init__(name: str = 'ur10e', namespace: str = '', control_strategy: str = 'JointPositionTrajectory') None[source]
Initialize the ROS 2 UR10e robot wrapper.
- Parameters:
name (str, optional) – Name of the robot node.
namespace (str, optional) – Namespace for the robot topics, services, and actions.
control_strategy (str, optional) – Initial RobotBlockSet control strategy.
- class robotblockset.ros2.ur_ros2.ur10(name: str = 'ur10e', namespace: str = '', control_strategy: str = 'JointPositionTrajectory')[source]
Bases:
ur_ros2,ur10e_specROS 2 interface for the Universal Robots UR10 platform.
- Attributes:
All attributes from :class:`ur_ros2` and the selected robot specification.
Initialize the ROS 2 UR10 robot wrapper.
- Parameters:
name (str, optional) – Name of the robot node.
namespace (str, optional) – Namespace for the robot topics, services, and actions.
control_strategy (str, optional) – Initial RobotBlockSet control strategy.
- __init__(name: str = 'ur10e', namespace: str = '', control_strategy: str = 'JointPositionTrajectory') None[source]
Initialize the ROS 2 UR10 robot wrapper.
- Parameters:
name (str, optional) – Name of the robot node.
namespace (str, optional) – Namespace for the robot topics, services, and actions.
control_strategy (str, optional) – Initial RobotBlockSet control strategy.
Classes
|
ROS 2 interface for the Universal Robots UR10 platform. |
|
ROS 2 interface for the Universal Robots UR10e platform. |
|
Generic Universal Robots ROS 2 interface. |