pub struct RobotArmBuilder { /* private fields */ }Expand description
Builder for generating code for a serial robot arm.
Created by robot_arm(). Accumulates requested functions and then
delegates to CodeGen for final output. All symbolic work happens
in a private Context owned by the builder.
Implementations§
Source§impl RobotArmBuilder
impl RobotArmBuilder
Sourcepub fn generate_fk(self, name: &str) -> Self
pub fn generate_fk(self, name: &str) -> Self
Generate forward kinematics position functions (fk_x, fk_y, fk_z).
Sourcepub fn generate_fk_matrix(self, name: &str) -> Self
pub fn generate_fk_matrix(self, name: &str) -> Self
Generate the full 4×4 homogeneous forward-kinematics transform as a
matrix function name(theta…) -> [f64; 16] (row-major), via
symplex::robotics::fk_chain.
The position functions from generate_fk are
the last column of this matrix; the upper-left 3×3 block is the
end-effector rotation.
Sourcepub fn generate_jacobian(self, name: &str) -> Self
pub fn generate_jacobian(self, name: &str) -> Self
Generate the Jacobian matrix function.
Sourcepub fn generate_all(self) -> Self
pub fn generate_all(self) -> Self
Generate all standard functions (FK position + Jacobian).
Sourcepub fn write_to_out_dir(self, filename: &str) -> Result<(), Box<dyn Error>>
pub fn write_to_out_dir(self, filename: &str) -> Result<(), Box<dyn Error>>
Write generated code to $OUT_DIR/<filename>.
Sourcepub fn write_to_path(self, path: impl AsRef<Path>) -> Result<(), Box<dyn Error>>
pub fn write_to_path(self, path: impl AsRef<Path>) -> Result<(), Box<dyn Error>>
Write generated code to an explicit path.
Sourcepub fn into_codegen(self) -> CodeGen
pub fn into_codegen(self) -> CodeGen
Get the inner CodeGen builder for further customization.
Auto Trait Implementations§
impl !RefUnwindSafe for RobotArmBuilder
impl !UnwindSafe for RobotArmBuilder
impl Freeze for RobotArmBuilder
impl Send for RobotArmBuilder
impl Sync for RobotArmBuilder
impl Unpin for RobotArmBuilder
impl UnsafeUnpin for RobotArmBuilder
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
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 more