Configuration¶
There are three kinds of YAML file. Built-in ones live in src/rebot_control/configs/. Pass either a built-in name
("b601_rs", "pusher_ip17") or a path to your own file.
File |
What |
Loaded by |
|---|---|---|
arm ( |
hardware, rates, gains, feedforward, safety limits, poses, simulator |
|
tool ( |
TCP pose, payload, home pose, Cartesian limits |
|
calibration ( |
identified link masses / COM, friction, torque ripple, gains |
|
arm = Arm.from_config("b601_rs", tool="my_tools/pusher.yaml", calibration="calibration/b601_rs.yaml",
overrides={"feedforward": {"friction_scale": 0.5}})
overrides is deep-merged into the arm YAML before it is parsed. It is handy for experiments without copying the
file.
Units and frames¶
Angles are degrees in YAML (keys ending in
_deg) and radians everywhere in Python.Lengths are in m, masses in kg, torques in Nm. Gains are in Nm/rad (kp) and Nms/rad (kd), the units of the MIT frame.
Base frame: the URDF
base_link. x points forward, y left, z up, and the origin is on the table under the base.Joint angles are URDF joint angles. With the factory zero, raw motor angle = joint angle.
The flange is URDF
link6. Tool TCP and payload are expressed in it.TCP rotation:
tcp.rpy_deguses the URDF convention: fixed axes,R = Rz(yaw) Ry(pitch) Rx(roll).
Arm file (main keys)¶
Key |
Meaning |
|---|---|
|
SocketCAN interface ( |
|
|
|
caller loop (30) / MIT frame stream (150) |
|
PD gains in HOLD mode; |
|
gravity compensation (on, 1.0) |
|
friction compensation, 0 until friction is calibrated; 0.5 to 0.8 typical after |
|
scale of the angle-periodic torque ripple model of the calibration file (default 1; no effect without a |
|
clip of the total feedforward per joint (protects against a wrong model) |
|
reflected rotor inertia per joint (kg*m^2), used in gain maths and in the simulator |
|
see safety.md |
|
folded pose and the staged unfold / fold |
|
simulator only: physics rate, joint damping / dry friction of the simulated arm, torque noise |
Tool file¶
name: my_pusher
mount_frame: link6
tcp:
xyz: [-0.096, 0.0, 0.172] # tool tip in the flange frame (m)
rpy_deg: [0.0, -60.0, 0.0] # TCP axes; z = approach axis (used by the tilt limit)
payload:
mass_kg: 0.30
com_xyz: [0.023, 0.036, 0.062] # in the flange frame (m)
# inertia: [ixx, iyy, izz, ixy, ixz, iyz] # about the COM (kg*m^2); optional (point mass otherwise)
home_deg: [0, 20, 28.6, -38.8, 0, 0] # used by arm.move_home() and as the IK posture
cartesian: # default CartesianLimits for this tool (see cartesian-control.md)
x: [0.22, 0.56]
y: [-0.20, 0.20]
z: [0.003, 0.20]
max_speed: 0.25
max_ang_speed: 2.0
max_tilt_deg: 30.0
max_yaw_deg: 60.0
For a new tool:
Copy a tool file and get TCP and payload from CAD.
Check the home pose in simulation:
rebot-control home --sim --viewer --tool my_tool.yaml.On the arm, refine with
calib payloadandcalib tcp(calibration.md).
Built-in tools:
Name |
What |
|---|---|
|
bare flange; use it for bring-up and gravity calibration |
|
printed flange, 10 mm rod at 30 deg, phone plate (pushing experiments) |
|
Seeed gripper as a rigid payload; the gripper motor (CAN id 7) is not driven |
Calibration file¶
rebot-control calib ... writes it and merges each new result into the existing file:
meta: {gravity_date: ..., gravity_rms_after: [...], ...}
link_params: {link2: {mass: 1.58, com: [-0.118, -0.004, -0.027]}, ...} # replaces URDF mass / COM
friction: {fc_pos: [...], fc_neg: [...], fv: [...], vs: [...], bias: [...]}
ripple: {cycles: [...], a1: [...], b1: [...], a2: [...], b2: [...]} # torque ripple model, see calibration.md
gains: {kp: [...], kd: [...]} # only with calib gains --save
It belongs to one physical arm. Keep it next to your experiment code, not inside the package.