Struct RoverKinematics
pub struct RoverKinematics {
pub chassis: VehicleChassisConfig,
pub wheel: WheelConfig,
pub state: VehicleState,
}Expand description
Zero-heap rover vehicle simulator.
Fields§
§chassis: VehicleChassisConfig§wheel: WheelConfig§state: VehicleStateImplementations§
§impl RoverKinematics
impl RoverKinematics
pub const fn new(
chassis: VehicleChassisConfig,
wheel: WheelConfig,
start_position: [f32; 3],
) -> RoverKinematics
pub const fn new( chassis: VehicleChassisConfig, wheel: WheelConfig, start_position: [f32; 3], ) -> RoverKinematics
Creates a new vehicle kinematics simulator.
pub fn step<F>(
&mut self,
throttle: f32,
steer: f32,
brake: f32,
dt: f32,
ground_probe: F,
)
pub fn step<F>( &mut self, throttle: f32, steer: f32, brake: f32, dt: f32, ground_probe: F, )
Advances vehicle physics by one fixed timestep $\Delta t$.
throttle: Drive input in range[-1.0, 1.0](negative is reverse).steer: Steering input in range[-1.0, 1.0](positive is right).brake: Brake input in range[0.0, 1.0].ground_probe: Elevation query function(x, z) -> (elevation, normal).
pub fn step_3d<const MAX_LEAVES: usize>(
&mut self,
throttle: f32,
steer: f32,
brake: f32,
dt: f32,
bvh: &BroadphaseBvh<MAX_LEAVES>,
shapes: &[ColliderShape3D],
motors: &[Motor],
)
pub fn step_3d<const MAX_LEAVES: usize>( &mut self, throttle: f32, steer: f32, brake: f32, dt: f32, bvh: &BroadphaseBvh<MAX_LEAVES>, shapes: &[ColliderShape3D], motors: &[Motor], )
Advances the 4-wheel rover kinematics using 3D sphere-cast wheel suspension probes
(cast_sphere) against a [BroadphaseBvh] and 3D collider shapes (SdfAnalytical,
Cuboid, ConvexHull, etc.).
Trait Implementations§
§impl Clone for RoverKinematics
impl Clone for RoverKinematics
§fn clone(&self) -> RoverKinematics
fn clone(&self) -> RoverKinematics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RoverKinematics
Auto Trait Implementations§
impl Freeze for RoverKinematics
impl RefUnwindSafe for RoverKinematics
impl Send for RoverKinematics
impl Sync for RoverKinematics
impl Unpin for RoverKinematics
impl UnsafeUnpin for RoverKinematics
impl UnwindSafe for RoverKinematics
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
Mutably borrows from an owned value. Read more