RamseteController

class RamseteController @JvmOverloads constructor(val trackWidth: Double, val zeta: Double = 0.7, val bBar: Double = 2.0) : RobotPosVelController

Ramsete controller for tracking tank trajectories.

The standard Ramsete control law from equation \((5.12)\) of this paper is \[ \begin{pmatrix}v\\ \omega\end{pmatrix} = \begin{pmatrix} v_d \cos (\theta_d - \theta) + 2 \zeta \sqrt{\omega_d^2 + b v_d^2} \Big\lbrack (x_d - x) \cos \theta + (y_d - y) \sin \theta \Big\rbrack\\ \omega_d + b v_d \frac{\sin(\theta_d - \theta)}{\theta_d - \theta} \Big\lbrack (x_d - x) \cos \theta - (y_d - y) \sin \theta \Big\rbrack + 2 \zeta \sqrt{\omega_d^2 + b v_d^2} (\theta_d - \theta) \end{pmatrix} \] where \(\zeta \in (0, 1)\) and \(b \gt 0\). Since \(b\) has units, we substitute \(b = \frac{\bar{b}}{l^2}\) where \(l\) is the track width.

Constructors

Link copied to clipboard
constructor(trackWidth: Double, zeta: Double = 0.7, bBar: Double = 2.0)

Properties

Link copied to clipboard
Link copied to clipboard
val bBar: Double = 2.0
Link copied to clipboard
Link copied to clipboard
val zeta: Double = 0.7

Functions

Link copied to clipboard
fun compute(s: DualNum<Time>, targetPose: Pose2dDual<Arclength>, actualPose: Pose2d): PoseVelocity2dDual<Time>
open override fun compute(targetPose: Pose2dDual<Time>, actualPose: Pose2d, actualVelActual: PoseVelocity2d): PoseVelocity2dDual<Time>

Computes the velocity and acceleration command. The frame Target is the reference robot, and the frame Actual is the measured, physical robot.

Link copied to clipboard

Computes the velocity and acceleration command. The frame Target is the reference robot, and the frame Actual is the measured, physical robot.

Link copied to clipboard
fun sinc(x: Double): Double