The Propulsion module for a Roboid is used to move the Roboid in space.
More...
#include <Propulsion.h>
|
| Propulsion () |
| Default Constructor for Propulsion.
|
|
void | Update (float currentTimeMs) |
| Update the propulsion state of the Roboid.
|
|
unsigned int | GetMotorCount () |
| Get the number of motors in this roboid.
|
|
Motor * | GetMotor (unsigned int motorIx) |
| Get a specific motor.
|
|
virtual void | SetTwistSpeed (float forward, float yaw=0.0F) |
| Get the Placement of a specific Motor.
|
|
virtual void | SetTwistSpeed (Vector2 linear, float yaw=0.0F) |
| Sets the forward, sideward and rotation speed of a (grounded) Roboid.
|
|
virtual void | SetTwistSpeed (Vector3 linear, float yaw=0.0F, float pitch=0.0F, float roll=0.0F) |
| Set the target 3D linear and 3D rotation speed of a (flying) Roboid.
|
|
virtual void | SetVelocity (Polar velocity) |
|
virtual Polar | GetVelocity () |
| Retrieve the current velocity of the roboid.
|
|
virtual float | GetAngularVelocity () |
| Retrieve the current angular velocity of the roboid.
|
|
|
Roboid * | roboid = nullptr |
| The roboid of this propulsion system.
|
|
The Propulsion module for a Roboid is used to move the Roboid in space.
Usually, a specific implementation of the propulsion module is used for a robot. This base class does not implement the functions to move the Roboid around.
◆ Propulsion()
Propulsion::Propulsion |
( |
| ) |
|
◆ Update()
void Propulsion::Update |
( |
float |
currentTimeMs | ) |
|
Update the propulsion state of the Roboid.
- Parameters
-
currentTimeMs | The time in milliseconds when calling this |
◆ GetMotorCount()
unsigned int Propulsion::GetMotorCount |
( |
| ) |
|
Get the number of motors in this roboid.
- Returns
- The number of motors. Zero when no motors are present
◆ GetMotor()
Motor * Propulsion::GetMotor |
( |
unsigned int |
motorIx | ) |
|
Get a specific motor.
- Parameters
-
motorIx | The index of the motor |
- Returns
- Returns the motor or a nullptr when no motor with the given index could be found
◆ SetTwistSpeed() [1/3]
void Propulsion::SetTwistSpeed |
( |
float |
forward, |
|
|
float |
yaw = 0.0F |
|
) |
| |
|
virtual |
Get the Placement of a specific Motor.
- Parameters
-
motorIx | The index of the Motor |
- Returns
- Returns the Placement or a nullptr when no Placement with the give index could be found
Sets the forward and rotation speed of a (grounded) Roboid
- Parameters
-
forward | The target forward speed |
yaw | The target rotation speed around the vertical axis This function is typically used for Roboid which are driving on the ground. |
Reimplemented in Passer::RoboidControl::DifferentialDrive, and Passer::RoboidControl::Quadcopter.
◆ SetTwistSpeed() [2/3]
void Propulsion::SetTwistSpeed |
( |
Vector2 |
linear, |
|
|
float |
yaw = 0.0F |
|
) |
| |
|
virtual |
◆ SetTwistSpeed() [3/3]
void Propulsion::SetTwistSpeed |
( |
Vector3 |
linear, |
|
|
float |
yaw = 0.0F , |
|
|
float |
pitch = 0.0F , |
|
|
float |
roll = 0.0F |
|
) |
| |
|
virtual |
◆ SetVelocity()
void Propulsion::SetVelocity |
( |
Polar |
velocity | ) |
|
|
virtual |
◆ GetVelocity()
Polar Propulsion::GetVelocity |
( |
| ) |
|
|
virtual |
Retrieve the current velocity of the roboid.
- Returns
- The velocity in polar coordinates The actual units of the velocity depend on the implementation
Reimplemented in Passer::RoboidControl::DifferentialDrive.
◆ GetAngularVelocity()
float Propulsion::GetAngularVelocity |
( |
| ) |
|
|
virtual |
Retrieve the current angular velocity of the roboid.
- Returns
- The angular velocity The actual unit of the angular velocity depend on the implementation
Reimplemented in Passer::RoboidControl::DifferentialDrive.
◆ roboid
Roboid* Passer::RoboidControl::Propulsion::roboid = nullptr |
The roboid of this propulsion system.
◆ motorCount
unsigned int Passer::RoboidControl::Propulsion::motorCount = 0 |
|
protected |
◆ motors
Motor** Passer::RoboidControl::Propulsion::motors = nullptr |
|
protected |
The documentation for this class was generated from the following files: