Struct jalansim::dynamics::models::DiffDrive

template <typename T>

ClassList > jalansim > dynamics > models > DiffDrive

Simple differential drive robot dynamics model. More...

  • #include <diff_drive.hpp>

Public Attributes

Type Name
T vmax = T(2.0)
Maximum linear velocity (m/s)
T vmin = T(-0.5)
Minimum linear velocity (m/s)
T wheel_b = T(0.262)
Wheelbase/track width (m)
T wheel_r = T(0.098)
Wheel radius (m)
T wmax = T(2.0)
Maximum angular velocity (rad/s)
T wmin = T(-2.0)
Minimum angular velocity (rad/s)

Public Static Attributes

Type Name
std::size_t INPUT_DIM = 2
Input dimension: [v, omega].
std::size_t STATE_DIM = 3
State dimension: [x, y, theta].

Public Functions

Type Name
JALANSIM_HOST_DEVICE void reset ()
Reset the model to initial state.
JALANSIM_HOST_DEVICE void rhs (const T * x, const T * u, T * dx, T dt=T(0.0)) const
Compute state derivatives (kinematic model).

Detailed Description

Implements kinematic model for a differential drive robot with direct velocity and angular velocity control. State includes position (x, y) and orientation (theta). Control inputs are linear velocity and angular velocity. Includes velocity limits for safety constraints.

State: [x, y, theta] Input: [linear_velocity, angular_velocity]

Template parameters:

  • T Numeric type (float, double)

Public Attributes Documentation

variable vmax

Maximum linear velocity (m/s)

T jalansim::dynamics::models::DiffDrive< T >::vmax;

variable vmin

Minimum linear velocity (m/s)

T jalansim::dynamics::models::DiffDrive< T >::vmin;

variable wheel_b

Wheelbase/track width (m)

T jalansim::dynamics::models::DiffDrive< T >::wheel_b;

variable wheel_r

Wheel radius (m)

T jalansim::dynamics::models::DiffDrive< T >::wheel_r;

variable wmax

Maximum angular velocity (rad/s)

T jalansim::dynamics::models::DiffDrive< T >::wmax;

variable wmin

Minimum angular velocity (rad/s)

T jalansim::dynamics::models::DiffDrive< T >::wmin;

Public Static Attributes Documentation

variable INPUT_DIM

Input dimension: [v, omega].

std::size_t jalansim::dynamics::models::DiffDrive< T >::INPUT_DIM;

variable STATE_DIM

State dimension: [x, y, theta].

std::size_t jalansim::dynamics::models::DiffDrive< T >::STATE_DIM;

Public Functions Documentation

function reset

Reset the model to initial state.

inline JALANSIM_HOST_DEVICE void jalansim::dynamics::models::DiffDrive::reset () 

function rhs

Compute state derivatives (kinematic model).

inline JALANSIM_HOST_DEVICE void jalansim::dynamics::models::DiffDrive::rhs (
    const T * x,
    const T * u,
    T * dx,
    T dt=T(0.0)
) const

Parameters:

  • x State vector [x, y, theta]
  • u Input vector [linear_vel, angular_vel]
  • dx Output state derivatives
  • dt Time step (unused in this model)


The documentation for this class was generated from the following file include/jalansim/dynamics/models/diff_drive.hpp