Recipes¶
Add an arm config key¶
Add a field with a default to the dataclass in
config.py. Store it in radians or SI.Parse it in
ArmConfig.from_dict(convert*_deg).Add it, with a comment, to
configs/arms/b601_rs.yaml.Document it in
docs/user/configuration.md(and indocs/user/safety.mdif it is a safety parameter).Add a test if it changes behaviour.
Add a built-in tool¶
Add
configs/tools/<name>.yaml: TCP, payload,home_deg,cartesian.Check that the home pose is clear:
is_clear(RobotModel(cfg, tool), tool.home). Then tryrebot-control home --sim --tool <name>.Add it to the tools table in
docs/user/configuration.md.
Add a calibration routine¶
Add
calib/<name>.pywith acollect_*(arm, ..., progress=print)that only usesArmmethods, and a purefit_*(model, data)that works on saved data.Add a
calib <name>subcommand incli.py. It saves raw data (_save_data), supports--from-data, writes results with_save_calibrationor a tool YAML, and asks_confirmbefore moving.In
tests/test_sim.py, perturb the simulated truth (truth_*) and check that the fit recovers it.Document it:
docs/user/calibration.md(how to run) anddocs/developer/identification.md(maths, limits). Add a test-plan step if it needs the real arm.
Add a CLI command¶
Add cmd_<name>(args) and a subparser in build_parser() with parents=[common]. Commands that move the arm must call
_confirm(args, ...) before moving. Document it in the module docstring and in the user docs.
Add a backend¶
See ../developer/backends.md. Implement Backend in joint units and
register it in arm.make_backend. Do not move control logic into it.
Change servo or filter behaviour¶
Read
../developer/servo-and-timing.mdfirst.Make the change, then run the full tests. The friction identification test is sensitive to frame timing.
Update the doc. If the change must be checked on the real arm, add a step to
docs/user/hardware-test-plan.mdand tell the user.