This class is used to further define a vehicle with Ackermann steering.
More...
#include <Model.hpp>
|
| | Model (const std::shared_ptr< const Params > ¶ms) |
| | Constructor. More...
|
| |
|
void | reset () |
| | Reset system state variables to defaults.
|
| |
| void | setState (const double speed, const double heading) |
| | Set the current system state. More...
|
| |
| void | getState (double &speed, double &heading) const |
| | Get the current state estimate; return as parameters specified. More...
|
| |
| void | setGoal (const double speed, const double heading) |
| | Set the target setpoint. More...
|
| |
| void | getGoal (double &speed, double &heading) const |
| | Get the current setpoint; return as parameters specified. More...
|
| |
| void | getCommand (double &throttle, double &steering) const |
| | Get the current commanded throttle and steering angle; return as parameters specified. More...
|
| |
| void | getCommand (double &throttle, double &steering, double &steer_vel) const |
| | Get the current commanded throttle and steering angle; return as parameters specified. More...
|
| |
| void | command (double desired_speed, double steering, const double dt) |
| | Simulate execution of the given throttle and steering commands. More...
|
| |
| void | getError (double &speed_error, double &heading_error) const |
| | Return the current error between desired and setpoint; return as parameters specified. More...
|
| |
| void | getWheelLinVel (double &wheel_LeftFront, double &wheel_RightFront, double &wheel_LeftRear, double &wheel_RightRear) const |
| | Return the current linear velocity at each wheel; used for calculating wheel speed with tire information. Return as parameters specified. More...
|
| |
This class is used to further define a vehicle with Ackermann steering.
◆ Model()
| ackermann::Model::Model |
( |
const std::shared_ptr< const Params > & |
params | ) |
|
|
explicit |
Constructor.
- Parameters
-
| params | Shared pointer detailing rover characteristic parameters |
◆ command()
| void ackermann::Model::command |
( |
double |
desired_speed, |
|
|
double |
steering, |
|
|
const double |
dt |
|
) |
| |
Simulate execution of the given throttle and steering commands.
- Parameters
-
| throttle | The commanded throttle ([0,1]). |
| steering | The commanded steering angle (rad). |
| dt | The amount of time to simulate over (s). |
◆ getCommand() [1/2]
| void ackermann::Model::getCommand |
( |
double & |
throttle, |
|
|
double & |
steering |
|
) |
| const |
Get the current commanded throttle and steering angle; return as parameters specified.
- Parameters
-
| throttle | The last commanded throttle (limited to [0,1]). |
| steering | The last commanded steering angle (rad). |
◆ getCommand() [2/2]
| void ackermann::Model::getCommand |
( |
double & |
throttle, |
|
|
double & |
steering, |
|
|
double & |
steer_vel |
|
) |
| const |
Get the current commanded throttle and steering angle; return as parameters specified.
- Parameters
-
| throttle | The last commanded throttle (limited to [0,1]). |
| steering | The last commanded steering angle (rad). |
| steer_vel | The current steering angle velocity (rad/s). |
◆ getError()
| void ackermann::Model::getError |
( |
double & |
speed_error, |
|
|
double & |
heading_error |
|
) |
| const |
Return the current error between desired and setpoint; return as parameters specified.
- Parameters
-
| speed_error | Current speed error (m/s). |
| heading_error | Current heading error (rad). |
◆ getGoal()
| void ackermann::Model::getGoal |
( |
double & |
speed, |
|
|
double & |
heading |
|
) |
| const |
Get the current setpoint; return as parameters specified.
- Parameters
-
| speed | Desired system speed (m/s). |
| heading | Desired system heading (rad). |
◆ getState()
| void ackermann::Model::getState |
( |
double & |
speed, |
|
|
double & |
heading |
|
) |
| const |
Get the current state estimate; return as parameters specified.
- Parameters
-
| speed | Estimated system speed (m/s). |
| heading | Estimated system heading (rad). |
◆ getWheelLinVel()
| void ackermann::Model::getWheelLinVel |
( |
double & |
wheel_LeftFront, |
|
|
double & |
wheel_RightFront, |
|
|
double & |
wheel_LeftRear, |
|
|
double & |
wheel_RightRear |
|
) |
| const |
Return the current linear velocity at each wheel; used for calculating wheel speed with tire information. Return as parameters specified.
- Parameters
-
| wheel_LeftFront& | Left front wheel linear velocity |
| wheel_RightFront& | Right front wheel linear velocity |
| wheel_LeftRear& | Left rear wheel linear velocity |
| wheel_RightRear& | Right rear wheel linear velocity |
◆ setGoal()
| void ackermann::Model::setGoal |
( |
const double |
speed, |
|
|
const double |
heading |
|
) |
| |
Set the target setpoint.
- Parameters
-
| speed | Desired system speed (m/s). |
| heading | Desired system heading (rad). |
◆ setState()
| void ackermann::Model::setState |
( |
const double |
speed, |
|
|
const double |
heading |
|
) |
| |
Set the current system state.
- Parameters
-
| speed | Actual system speed (m/s) |
| heading | Actual system heading (rad). |
The documentation for this class was generated from the following files: