controller arm_tracking#
Describes the entry arm_tracking at version 0.1.0, registered by mime.control._arm_tracking.ArmTracking.
At a glance#
controller
arm_tracking, version0.1.0, namespacemimeDerivative, by mode: inside the compiled step
piecewise_jump, as a callbackcutValidity: none declared
What it models, and when not to use it#
A magnet carried by an arm, following a body#
What it models. The controller of an arm that carries a magnet above a robot in a tube and keeps it there as the
robot swims: exp.set_controller(ArmTracking(description=asset("arm.urdf"), end_effector="link_6", home=rad(...), axis=X, up=Z, at=m(...)), reads={"body_pose": "umr.pose", "body_twist": "umr.twist", "joint_positions": "rpm.arm.joint_positions"}, writes={"joint_positions": "rpm.arm.joint_positions"}, mode="callback"), or mode="graph"
to run it inside the compiled step. Each control period it reads the body’s pose, its twist and the arm’s joint
positions, sets a target for the arm’s end effector at the standoff along up from where the body is along axis, that
distance held within reach, and writes the joint positions that a few damped-least-squares steps reach from the arm’s
present ones: the command of a kinematic arm. The target moves a fraction smoothing of the way towards that point each
tick, from the end effector’s pose at home; with orientation_feedback, its orientation also turns so that the end
effector’s z follows the body’s.
It is the v0.2 line’s controller of the AR4 rig, ported: the same target, filter and inverse kinematics, compared with the v0.2 controller on a recorded input sequence. It computes in single precision whatever the run’s precision, as the v0.2 controller did, so a run in double precision with it is mixed.
When not to use it.
When what the controller reads matters: it reads the body’s pose and twist and the arm’s joint positions straight from the physics state, which the build report lists as ground truth, not deployable (see MIME-ANO-104). No instrument gives a real controller the robot’s pose inside a body.
For a dynamic arm: it writes joint positions, and the joint torques of the v0.2 line’s computed-torque control wait for the dynamic arm.
When a derivative of the run is needed and it runs as a callback: between compiled chunks no derivative passes through its writes. Inside the compiled step one does, and it is
piecewise_jump: the reach is a clip (a kink), and the inverse kinematics’ half turn, the orientation feedback’s hemisphere and its fallback where the body’s z lies along the home pose’s x are jumps. A tracking target never comes near a half turn of the end effector.For a tube that is not straight through the origin along
axis: it follows the body’s distance along that one line.When the target filter’s time constant must stay fixed as the rate changes:
smoothingis a fraction per tick, so the same value at another rate is another filter.
Versions. arm_tracking 0.1.0 is its first: as a callback or inside the compiled step, writing a kinematic
arm’s joint positions.
Settings#
Setting |
Type |
Default |
Dimension |
Role |
Default’s kind |
|---|---|---|---|---|---|
|
|
|
none |
design |
convention |
|
|
|
length (m) |
physical |
convention |
|
|
|
none |
design |
none |
|
|
|
none |
numerical |
numerical |
|
|
|
none |
physical |
none |
|
|
|
none |
design |
none |
|
|
|
none |
numerical |
numerical |
|
|
|
dimensionless |
design |
none |
|
|
|
none |
numerical |
numerical |
|
|
|
time (s) |
numerical |
numerical |
|
|
|
none |
physical |
convention |
|
|
|
none |
design |
convention |
|
|
|
length (m) |
numerical |
numerical |
|
|
|
none |
numerical |
numerical |
|
|
|
length (m) |
numerical |
numerical |
|
|
|
none |
design |
none |
Each role and default’s kind is the entry’s setting_roles (mime.registry.SettingRole); a setting that declares none is required.
Each default is a claim (mime.registry.DefaultKind): a determined default is resolved in every profile, a convention taken in every profile, a numerical default taken in exploratory only and stamped pending. Their rules and bases:
acknowledged(convention): the setting’s written default; no element of the description is read past unless acknowledged with its reasonat(convention): the setting’s written default; the arm’s base sits at the world’s origin unless placeddamping(numerical): the value the earlier line’s controller ran with; the frozen reference of the arm’s experiment was run with it; no study of it is recordedgain(numerical): the value the earlier line’s controller ran with; a design value of the controller (where and how it holds the arm), held as a numerical default so that A0’s frozen declarations stand: the frozen reference of the arm’s experiment was run with it, and no study of it is recordediterations(numerical): the value the earlier line’s controller ran with; the frozen reference of the arm’s experiment was run with it; no study of it is recordedlookahead(numerical): the value the earlier line’s controller ran with; a design value of the controller (where and how it holds the arm), held as a numerical default so that A0’s frozen declarations stand: the frozen reference of the arm’s experiment was run with it, and no study of it is recordedorientation(convention): the setting’s written default; the arm’s base is not turned from the world unless turnedorientation_feedback(convention): the setting’s written default; the target is not turned to follow the body unless askedreach(numerical): the value the earlier line’s controller ran with; a design value of the controller (where and how it holds the arm), held as a numerical default so that A0’s frozen declarations stand: the frozen reference of the arm’s experiment was run with it, and no study of it is recordedsmoothing(numerical): the value the earlier line’s controller ran with; a design value of the controller (where and how it holds the arm), held as a numerical default so that A0’s frozen declarations stand: the frozen reference of the arm’s experiment was run with it, and no study of it is recordedstandoff(numerical): the value the earlier line’s controller ran with; a design value of the controller (where and how it holds the arm), held as a numerical default so that A0’s frozen declarations stand: the frozen reference of the arm’s experiment was run with it, and no study of it is recorded
Reads and writes#
reads: each label bound by the experiment to a thing’s state or an observation’s output:
Label |
Units |
Shape |
|---|---|---|
|
|
|
|
|
|
|
|
|
writes: each label bound by the experiment to an apparatus’s command, whose drive it replaces:
Label |
Units |
Shape |
|---|---|---|
|
|
|
Nodes it builds#
Builds no node of its own.
Gradient status#
The derivative depends on the mode the controller is placed in, and a saved experiment’s lock records that mode’s status:
Inside the compiled step:
piecewise_jump, its law’s ownAs a callback:
cut, the binding’s whatever the law
The derivative through this controller inside the compiled step is piecewise_jump: not the exact derivative of what it computes everywhere.
Switches the law evaluates, each declared once by its owner:
Switch |
Indicator |
Orders, per output group |
Route to exact |
|---|---|---|---|
|
the body’s distance along the axis less the reach’s lower end, m |
|
none: a distance below the reach is held at its end, whose derivative in the distance is zero; a smooth envelope would be another controller |
|
the reach’s upper end less the body’s distance along the axis, m |
|
none: a distance above the reach is held at its end, as at the lower one |
|
minus the cosine of half the angle from the end effector’s orientation to its target’s (the w of the turn between them), dimensionless, positive past a half turn |
|
none: past a half turn the shorter way round is the other way, and each inverse-kinematics step turns back; a target within a half turn of the end effector, as a tracking one is, never reaches it |
|
the series’ threshold less the squared sine of half the angle from the end effector’s orientation to its target’s, dimensionless, positive where its rotation vector is taken from its series |
|
none needed: the series meets the closed form to rounding in its value and its slope, so the derivative on either side is the one function’s |
|
the length of the home pose’s x made perpendicular to the body’s projected z, less the length below which the two are taken as parallel, dimensionless |
|
none: with the home pose’s x along the body’s z the target’s x is undefined, and the home pose’s y stands in for it |
|
the length of q (q . held), q the turn’s quaternion and held the target’s orientation, dimensionless: zero at the edge of held’s hemisphere |
|
none: at the edge q and -q are as near the held orientation, and the filter goes the other way round on either side |
The derivative through this controller as a callback is cut: not the exact derivative of what it computes everywhere.
Where: the controller’s writes: a compiled chunk takes them as fixed inputs, so a derivative of the run stops at them (it is zero through them)
Why: the run calls the controller’s step on the host between compiled chunks, where no derivative passes through a call
Route to exact: place the controller inside the compiled step, where its status is its law’s own, derived from the switches it declares
Validity#
none declared
References#
[@Sciavicco2000], [@deJongh2025NonlinDyn]
Other declarations#
Class variable |
Type |
Value |
|---|---|---|
|
|
|
|
|
|