Description
Definition for a Curiosity driver system.
The rover is controlled through angular velocities at all 6 wheels and steering angles at the front and rear wheels. This base class controls directly the wheel angular speeds and steering angles. Derived classes can use different mechanisms for setting these controls.
#include <Curiosity.h>


Public Types | |
| enum | DriveMotorType { DriveMotorType::SPEED, DriveMotorType::TORQUE } |
| Type of drive motor control. More... | |
Public Member Functions | |
| void | SetSteering (double angle) |
| Set current steering input (angle: negative for left turn, positive for right turn). More... | |
| void | SetSteering (double angle, CuriosityWheelID id) |
| Set current steering input (angle: negative for left turn, positive for right turn). More... | |
| void | SetSteeringAngles (const std::array< double, 4 > &angles) |
| Set all steering angles. | |
| void | SetDriveSpeeds (const std::array< double, 6 > &speeds) |
| Set all wheel angular speeds. | |
| virtual DriveMotorType | GetDriveMotorType () const |
| Indicate the control type for the drive motors (default: SPEED). | |
Protected Member Functions | |
| virtual void | Update (double time) |
| Update the driver system. More... | |
Protected Attributes | |
| Curiosity * | curiosity |
| associated Curiosity rover | |
| std::array< double, 6 > | drive_speeds |
| angular speeds for drive motors (positive for forward motion) | |
| std::array< double, 4 > | steer_angles |
| angles for steer motors (negative for left turn, positive for right turn) | |
Friends | |
| class | Curiosity |
Member Enumeration Documentation
◆ DriveMotorType
Member Function Documentation
◆ SetSteering() [1/2]
| void chrono::curiosity::CuriosityDriver::SetSteering | ( | double | angle | ) |
Set current steering input (angle: negative for left turn, positive for right turn).
This function sets the same steering angle for all steerable wheels.
◆ SetSteering() [2/2]
| void chrono::curiosity::CuriosityDriver::SetSteering | ( | double | angle, |
| CuriosityWheelID | id | ||
| ) |
Set current steering input (angle: negative for left turn, positive for right turn).
This function sets the steering angle for the specified wheel.
◆ Update()
|
inlineprotectedvirtual |
Update the driver system.
This function is called at each rover Update and can be used by derived classes to set new drive motor angular speeds and steering motor angles. A positive steering input corresponds to a left turn and a negative value to a right turn.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_models/robot/curiosity/Curiosity.h
- /builds/uwsbel/chrono/src/chrono_models/robot/curiosity/Curiosity.cpp