Skip to Content

Common

rammp_common_interfaces. Two things no single subsystem owns: the emergency stop, and the arbitration protocol for taking control of a resource. Every arbitrated resource on the robot runs its own arbitration server speaking this one protocol on its own namespace: the arm at the root, the base under /base.

Emergency stop

EStop (msg)

Broadcast on /estop, best-effort, every 100 ms per publisher. The protocol lets any node engage; on the chair the joystick’s e-stop button is what does, the MIB owns the latch and is the only thing that can end a stop, and the arm driver reads the topic and obeys. A ROS 2 node reads it rather than publishing it; how to pick the latch’s state out of the traffic is on Controlling the base. Engaging is fail-safe: an ENGAGED from anyone is always acted on, never age- or sequence-checked.

FieldTypeMeaning
headerstd_msgs/HeaderThe stamp is for the log only, never for decisions
stateuint8STATE_ENGAGED (1) engages. STATE_NOT_ENGAGED (0) is a heartbeat, or a clear attempt. Any other value reads as engaged.
sourcestringWho published it (node name), for the log and the clear attempt
reasonstringFree text, for the log
pub_sequint32This publisher’s message number: +1 per message, wraps
clear_targetstringClear attempts only: whose engagement to clear. "" otherwise.
clear_pub_sequint32Clear attempts only: the newest pub_seq the clearer had received from clear_target

What a message means:

stateclear_targetMeaningWho sends it
ENGAGEDanyEngageAny node
NOT_ENGAGED""Heartbeat: alive, not engaging. It never ends a stop.Any node, every period
NOT_ENGAGED<source>A clear attempt for that source’s engagementThe clearer only

A plain NOT_ENGAGED is not a clear, or any node’s heartbeat would end another node’s stop. The stop is released only when a clear attempt succeeds: the target accepts it and answers NOT_ENGAGED with a newer pub_seq, within the timeout. A source the clearer watches that goes silent longer than the timeout counts as engaged.

It is not a std_msgs/Bool because the protocol is load-bearing. The .msg mirrors the firmware’s rammp::EStop in rammp-rtps , where the rules and timings live. Subscribe best-effort, or a firmware publisher never matches.

Arbitration

Who may command a resource right now. A client acquires control, receives a token, and puts that token on every command the resource arbitrates. Engaging the e-stop and every new acquire both clear ownership and invalidate outstanding tokens.

AcquireControl (srv)

Acquire control of a resource. This seizes: if another owner holds it, the call succeeds anyway, halting their in-flight motion and settling their outstanding goals. By operational contract only the task orchestrator calls it.

FieldTypeMeaning
Requestowner_idstringHuman-readable label. Mirrors sender_id on arbitrated goals.
tokenuint8[16]Optional pre-generated key, so one orchestrator key can cover several resources. All-zero, the default, means mint one.
Responseacceptedbool
tokenuint8[16]The capability. Put it on every command this resource arbitrates.
generationuint64
messagestring

A supplied key gives up what minting guarantees: every holder of the key is the owner at once, and a restart does not lock out a stale holder. Check that the returned token equals the one sent; a server that predates the field ignores it and mints.

ReleaseControl (srv)

Release control you hold. Refused unless the token matches the current owner.

FieldType
Requesttokenuint8[16]
Responsereleasedbool
messagestring

RevokeControl (srv)

Operator override: take the resource from whoever holds it. Carries no token, because it is the recovery path for a crashed owner and ownership has no lease.

FieldType
Requestreasonstring
Responserevokedbool
messagestring

ControlStatus (msg)

Published on change, so a client that starts late learns the current state at once: the arm latches it, the base resends it every second. One publisher per arbitrated resource.

FieldTypeMeaning
headerstd_msgs/Header
arbitration_enabledboolfalse means tokens are ignored. A launch-time parameter on the arm, a build-time constant on the MIB, true on the chair.
estoppedboolLatched. Nothing is admitted while true.
ownedboolWhether anyone holds the resource
owner_idstringEmpty if none
generationuint64Bumps on every grant. A client compares it to detect that it was dispossessed.
rejected_countuint64Commands refused since start

Where they are served

ResourceStatusServicesNotes
The arm/control_status/acquire_control, /release_control, /revoke_controlQoS and rates in the arm interface reference
The base/base/control_status/base/acquire_control, /base/release_control, /base/revoke_controlThe token goes on every TwistSetpoint, the base’s only tokened command. A release or revoke during autonomy drops the base to IDLE. See Taking the base.

Both subscribe to the one /estop. The MIB owns its latch.

Edit this page on GitHub

Last updated on