pub struct Parameters {
pub a1: f64,
pub a2: f64,
pub b: f64,
pub c1: f64,
pub c2: f64,
pub c3: f64,
pub c4: f64,
pub offsets: [f64; 6],
pub sign_corrections: [i8; 6],
pub dof: i8,
}Expand description
Parameters for the robot. See parameters_robots.rs for examples of concrete robot models. Parameters for the kinematic model of the robot.
Fields§
§a1: f64The length of the first link of the robot (distance between joint 1 and joint 2).
a2: f64The length of the second link of the robot (distance between joint 2 and joint 3).
b: f64The offset in the y-direction between joint 1 and joint 2. This can be 0 for robots without a lateral offset that is very common.
c1: f64The vertical distance from the base (joint 1) to joint 2 along the z-axis.
c2: f64The vertical distance between joints 2 and 3 along the z-axis.
c3: f64The offset between joint 3 and joint 4, typically along the x-axis.
c4: f64The distance from the wrist center (last joint) to the end-effector mount In 5-DOF robots, this defines the offset between joint 5 and the end-effector mount
offsets: [f64; 6]Offsets applied to each joint angle to adjust the reference zero position. There are 6 values corresponding to each joint in a 6-DOF robot.
sign_corrections: [i8; 6]Specifies the direction of positive rotation from the zero angle for each joint.
A value of -1 reverses the default rotation direction for that joint.
dof: i8Degrees of freedom for the robot. This can either be 5 for 5-DOF robots or 6 for 6-DOF robots.
Implementations§
Source§impl Parameters
impl Parameters
Source§impl Parameters
impl Parameters
pub fn new() -> Self
pub fn igus_rebel() -> Self
pub fn irb2400_10() -> Self
pub fn staubli_tx2_140() -> Self
pub fn staubli_tx2_160() -> Self
pub fn staubli_tx2_160l() -> Self
pub fn fanuc_r2000ib_200r() -> Self
pub fn kuka_kr6_r700_sixx() -> Self
pub fn staubli_tx40() -> Self
pub fn staubli_rx160() -> Self
pub fn irb2600_12_165() -> Self
pub fn irb4600_60_205() -> Self
Source§impl Parameters
impl Parameters
Sourcepub fn from_yaml_file<P: AsRef<Path>>(path: P) -> Result<Self, ParameterError>
pub fn from_yaml_file<P: AsRef<Path>>(path: P) -> Result<Self, ParameterError>
Read the robot configuration from YAML file. YAML file like this is supported:
# FANUC m16ib20
opw_kinematics_geometric_parameters:
a1: 0.15
a2: -0.10
b: 0.0
c1: 0.525
c2: 0.77
c3: 0.74
c4: 0.10
opw_kinematics_joint_offsets: [0.0, 0.0, deg(-90.0), 0.0, 0.0, deg(180.0)]
opw_kinematics_joint_sign_corrections: [1, 1, -1, -1, -1, -1]
dof: 6Offsets, sign corrections, and DOF are optional.
YAML extension to parse the deg(angle) function is supported (serde_saphyr).
See e.g. ROS-Industrial fanuc_m16ib_support opw yaml.
Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Parameters
impl Debug for Parameters
impl Copy for Parameters
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnwindSafe for Parameters
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.