Guide for agents that use rebot-control¶
Use this page when you help a person run the arm or write code against rebot_control.
Rules¶
Run in simulation:
backend="sim"in Python,--simon the command line. Run on the real arm only when the user asks for it in the current session and is at the arm.Before a real-arm run, run the same script in simulation.
On the real arm, do not pass
--yes. The confirmation prompt is for the user.Pass the tool that is mounted (
tool=,--tool). A wrong payload gives a wrong gravity feedforward.Do not change
safety.*,feedforward.tau_maxor the Cartesian limits to make a command pass. Report the refusal (CommandRejected,SafetyStop,ik_ok == False) to the user.Do not switch torque off on a real arm (
arm.release(),arm.disable_torque(),rebot-control releasewithout--fold) unless the user asks. The arm falls when torque goes off.Angles are radians in Python. Degrees appear only in YAML keys that end in
_deg.
Install¶
pip install -e ".[sim]" # simulation: Linux, macOS
pip install -e ".[real,sim]" # real arm: Linux, SocketCAN, can0 up
Check the installation: rebot-control state --sim.
Python¶
from rebot_control import Arm
with Arm.from_config("b601_rs", tool="pusher_ip17", backend="sim") as arm:
arm.enable() # torque on, hold the measured pose
arm.move_home() # unfold to the tool's home pose
p, R = arm.tcp_pose() # position (3,), rotation matrix (3, 3), base frame
arm.move_to_pose(p + [0.05, 0.0, 0.0], R, speed=0.05)
cart = arm.cartesian() # streaming control
for _ in range(90):
status = cart.step(p + [0.05, 0.03, 0.0], R)
arm.sleep() # one control period (30 Hz); call it once per cycle
# normal exit: fold, then torque off
Task |
Call |
|---|---|
Load an arm |
|
Joint move, blocking |
|
Joint target, streaming |
|
Cartesian move, blocking |
|
Cartesian target, streaming |
|
Hand guiding |
|
Change the tool |
|
Record the servo data |
|
Command line¶
Every command takes --arm, --tool, --calibration, --sim, --viewer.
Command |
What it does |
|---|---|
|
Prints angles, temperatures, TCP pose and torque on/off. Changes nothing. |
|
Torque on at the current pose. |
|
Gravity mode. |
|
Unfolds to the home pose and folds back. |
|
Cartesian square test. |
|
Folds an arm that was left holding, then torque off. |
|
Calibration tools. |
What the arm does when a program ends¶
End of the program |
State of the arm |
|---|---|
The |
folded, torque off |
Exception, Ctrl-C, stall |
holds its pose, stays enabled |
A held arm stays enabled after the program exits. The next Arm takes the hold over at connect() and sets
arm.taken_over. Tell the user when a program leaves the arm holding.
Where to read¶
Question |
Page |
|---|---|
Terms, modes, the control chain |
|
Life cycle, timing, joint and Cartesian calls |
|
YAML keys, units, frames, a new tool |
|
Cartesian limits, refused steps |
|
Calibration commands and their order |
|
Stops, holds, take-over, release |
|
Error messages |
|
First session on a new arm |
All pages in one file: llms-full.txt at the root of the documentation site.