ROS & ROS2: Conditions

Conditions make it possible to monitor the robot control and trigger specific reactions (termination of a running motion) if definable limits are exceeded or not reached

Reset conditions

Reset all conditions

Default service name

Message type (srv)

/iiwa/reset_conditions

std_srvs/Empty

$ rosservice call /iiwa/reset_conditions "{}"

Force conditions

Define the force condition (threshold and tolerance) for each Cartesian axis

Default service name

Message type (srv)

Units

/iiwa/set_force_condition

libiiwa_msgs/SetArray

# TODO

Implementation details

Note

The current implementation links each defined condition by a logic OR operation

# TODO

Example

# thresholds (x: 20.0, y: 21.0, z: 22.0) and tolerances (x: 10.0, y: 11.0, z: 12.0) are specified
$ rosservice call /iiwa/set_force_condition "[20.0, 21.0, 22.0, 10.0, 11.0, 12.0]"

# thresholds (x: 20.0, y: 21.0, z: 22.0) are specified. Default tolerances (10.0)
$ rosservice call /iiwa/set_force_condition "[20.0, 21.0, 22.0]"

# force condition only for z axis: threshold (15.0) and tolerance of (1.0)
$ rosservice call /iiwa/set_force_condition "[.nan, .nan, 15.0, .nan, .nan, 1.0]"

Joint torque conditions

Define the joint torque condition (lower and upper limits) for each joint axis

Default service name

Message type (srv)

Units

/iiwa/set_joint_torque_condition

libiiwa_msgs/SetArray

# TODO

Implementation details

Note

The current implementation links each defined condition by a logic OR operation

# TODO

Example

# limits for all joints
$ rosservice call /iiwa/set_joint_torque_condition "[-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]"

# limits only for joint 4 (min: -5.0 Nm, max: 10.0 Nm)
$ rosservice call /iiwa/set_joint_torque_condition "[.nan, .nan, .nan, -5.0, .nan, .nan, .nan, .nan, .nan, .nan, 10.0, .nan, .nan, .nan]"