Shared Igniter upgrade logic for lifting actuator-driver reverse? options
into per-attachment transmission blocks.
Used by the upgrade tasks in each driver package (Feetech, Robotis, PCA9685, Pigpio). The transformation is:
Before:
joint :shoulder do
type :revolute
limit do
lower(~u(-10 degree))
upper(~u(190 degree))
effort(~u(10 newton_meter))
velocity(~u(180 degree_per_second))
end
actuator :motor, {BB.Servo.Feetech.Actuator,
servo_id: 1, controller: :feetech, reverse?: true
}
link :arm
endAfter (with lift_offset?: true):
joint :shoulder do
type :revolute
limit do
lower(~u(-10 degree))
upper(~u(190 degree))
effort(~u(10 newton_meter))
velocity(~u(180 degree_per_second))
end
actuator :motor, {BB.Servo.Feetech.Actuator,
servo_id: 1, controller: :feetech
} do
transmission do
offset(~u(90.0 degree))
reversed? true
end
end
link :arm
endThe offset is computed as (lower + upper) / 2, preserving the
auto-centering behaviour the Feetech/Robotis drivers used to derive
internally. lift_offset?: false skips the offset computation — used by
the PCA9685 and Pigpio upgraders, which never auto-centered.
Also handles re-running on code that was previously upgraded to put the
transmission block at the joint level: such blocks are removed and
merged into the actuator's own block.
Summary
Functions
Lift reverse? opts on the given driver's actuator child-specs into
per-attachment transmission blocks across the project.
Functions
Lift reverse? opts on the given driver's actuator child-specs into
per-attachment transmission blocks across the project.
Options:
:lift_offset?(defaultfalse) — when true, also compute and emit anoffset(...)value derived from the enclosing joint'slowerandupperlimits, preserving the implicit centering that Feetech and Robotis drivers used to do internally.