pub struct TargetControlOptions {
pub limits: OtgLimits,
pub rotation_limits: OtgLimits,
pub backend: Backend,
pub controller_mode: ControllerMode,
pub max_deviation: f64,
pub max_angular_deviation: f64,
pub settle: Settle,
pub limit_rate: bool,
pub realtime_priority: Option<i32>,
pub observer: Option<CartesianObserver>,
}Expand description
Options of Robot::start_cartesian_target_control;
Default is the documented starting point and the with_* methods change one field each.
Fields§
§limits: OtgLimitsThe translational budget as a norm: m/s, m/s^2, m/s^3. The generator gets
OtgLimits::per_axis_for_norm(3) of it and the backstop the norm itself.
Default 0.3, 0.5, 20: measured on a real FER, the robot’s joint-space continuity check
refuses 2.5 m/s^2 near the ready pose and its collision threshold trips above about
1 m/s^2, so the default sits well below both.
rotation_limits: OtgLimitsThe rotational budget as a norm: rad/s, rad/s^2, rad/s^3; the generator gets
libfranka’s pose-interface factor (0.99) of its per_axis_for_norm(3), the backstop
applies that factor itself. Default 0.5, 1.0, 20: a fifth of the FR3’s velocity
limit, validated on the simulator’s joint-side check only.
backend: BackendWhat turns the generator’s pose into a command: the crate’s impedance law sending
torques, or a pose stream to the robot’s own controller. Default
Backend::Impedance of ImpedanceOptions::cartesian.
controller_mode: ControllerModeThe robot’s internal controller, with Backend::RobotController only. Default
ControllerMode::CartesianImpedance.
max_deviation: f64How far, m, the measured O_T_EE position may stray from the start before the target
is frozen and the loop ends with super::DEVIATION_MESSAGE. Default 0.30.
max_angular_deviation: f64How far, rad, the measured O_T_EE orientation may turn from the start before the
same guard fires. Default 0.5.
settle: SettleWhen a stop counts as settled; the tolerance applies to the position in m and to the orientation error in rad alike. Default 1 mm and 1 mrad for 250 cycles.
limit_rate: boolWhether limit_rate_cartesian_pose runs under the two budgets as the backstop, with
the loop’s own libfranka limiter behind it; with Backend::Impedance, whether the
torque rate limiter runs. Default true.
realtime_priority: Option<i32>SCHED_FIFO priority for the loop thread; None is the highest, as in Robot::new.
observer: Option<CartesianObserver>Called every cycle on the realtime thread; see CartesianObserver.
Implementations§
Source§impl TargetControlOptions
impl TargetControlOptions
Sourcepub fn with_limits(self, limits: OtgLimits) -> Self
pub fn with_limits(self, limits: OtgLimits) -> Self
Sets the translational norm budget.
Sourcepub fn with_rotation_limits(self, limits: OtgLimits) -> Self
pub fn with_rotation_limits(self, limits: OtgLimits) -> Self
Sets the rotational norm budget (rad/s, rad/s^2, rad/s^3).
Sourcepub fn with_backend(self, backend: Backend) -> Self
pub fn with_backend(self, backend: Backend) -> Self
Sets the backend.
Sourcepub fn with_controller_mode(self, mode: ControllerMode) -> Self
pub fn with_controller_mode(self, mode: ControllerMode) -> Self
Sets the robot’s internal controller (Backend::RobotController only).
Sourcepub fn with_max_deviation(self, metres: f64) -> Self
pub fn with_max_deviation(self, metres: f64) -> Self
Sets the deviation guard on the position, m.
Sourcepub fn with_max_angular_deviation(self, radians: f64) -> Self
pub fn with_max_angular_deviation(self, radians: f64) -> Self
Sets the deviation guard on the orientation, rad.
Sourcepub fn with_settle(self, settle: Settle) -> Self
pub fn with_settle(self, settle: Settle) -> Self
Sets the settle criterion.
Sourcepub fn with_limit_rate(self, limit_rate: bool) -> Self
pub fn with_limit_rate(self, limit_rate: bool) -> Self
Switches the backstop and the loop’s limiter.
Sourcepub fn with_realtime_priority(self, priority: Option<i32>) -> Self
pub fn with_realtime_priority(self, priority: Option<i32>) -> Self
Sets the loop thread’s SCHED_FIFO priority (None: the highest).
Sourcepub fn with_observer(
self,
observer: impl FnMut(&RobotState, &CartesianSent) + Send + 'static,
) -> Self
pub fn with_observer( self, observer: impl FnMut(&RobotState, &CartesianSent) + Send + 'static, ) -> Self
Installs the observer.
Sourcepub fn validate(&self) -> FrankaResult<()>
pub fn validate(&self) -> FrankaResult<()>
Checks the options without starting anything.
§Errors
crate::error::FrankaError::InvalidArgument naming the field.
Trait Implementations§
Source§impl Debug for TargetControlOptions
impl Debug for TargetControlOptions
Auto Trait Implementations§
impl !RefUnwindSafe for TargetControlOptions
impl !Sync for TargetControlOptions
impl !UnwindSafe for TargetControlOptions
impl Freeze for TargetControlOptions
impl Send for TargetControlOptions
impl Unpin for TargetControlOptions
impl UnsafeUnpin for TargetControlOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.