![]() |
Laelaps
2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
|
Laelaps kinematics duty cycle action class. More...
#include <laeKin.h>
Public Member Functions | |
| LaeKinActionDutyCycle (LaeKinematics &kin) | |
| Default initialization constructor. More... | |
| virtual | ~LaeKinActionDutyCycle () |
| Destructor. | |
| int | update (const LaeMapDutyCycle &dutycycle) |
| Update with new velocities. More... | |
| virtual int | execute () |
| Execution new velocities. More... | |
| virtual int | terminate () |
| Terminate action. More... | |
Public Member Functions inherited from laelaps::LaeKinAction | |
| LaeKinAction (LaeKinematics &kin, ActionType eActionType=ActionTypeIdle) | |
| Default intialization constructor. More... | |
| virtual | ~LaeKinAction () |
| Destructor. | |
| virtual int | plan () |
| Plan next execution. More... | |
| virtual bool | isIdle () |
| Test if action is idle. More... | |
| virtual bool | isPlanningRequired () |
| Test if action requires (re)planning. More... | |
| virtual bool | isExecutionRequired () const |
| Test if more action requires (more) execution. More... | |
| virtual bool | hasTerminated () const |
| Test if action has been terminated. More... | |
| virtual ActionType | getActionType () const |
| Get the action type for this class. More... | |
| virtual ActionState | getActionState () const |
| Get the action state. More... | |
Protected Member Functions | |
| void | clear () |
| Clear goal. | |
Protected Attributes | |
| LaeMapDutyCycle | m_mapGoalDutyCycle |
| map of goal duty cycles | |
Protected Attributes inherited from laelaps::LaeKinAction | |
| LaeKinematics & | m_kin |
| bound kinematics driver | |
| ActionType | m_eActionType |
| action type enum | |
| ActionState | m_eActionState |
| action state. | |
Additional Inherited Members | |
Public Types inherited from laelaps::LaeKinAction | |
| enum | ActionType { ActionTypeIdle, ActionTypeVelocity, ActionTypeDutyCycle, ActionTypeTwist, ActionTypeNavForDist, ActionTypeNavToPos } |
| Supported kinematic extended actions. More... | |
| enum | ActionState { ActionStateIdle, ActionStateUpdate, ActionStatePlan, ActionStateExecute, ActionStateTerminated } |
| Action states. More... | |
Static Public Member Functions inherited from laelaps::LaeKinAction | |
| static LaeKinAction * | newAction (LaeKinematics &kin, const ActionType eActionType) |
| Archetype constructor to create action type instance. More... | |
| static LaeKinAction * | replaceAction (LaeKinematics &kin, LaeKinAction *pAction, const ActionType eNewActionType) |
| Archetype constructor to replace action type instance. More... | |
Laelaps kinematics duty cycle action class.
A velocity action only sets the duty cycles of a (sub)set of the powertrain motors. Powertrains not specified are kept at their current duty cycles.
| LaeKinActionDutyCycle::LaeKinActionDutyCycle | ( | LaeKinematics & | kin | ) |
Default initialization constructor.
| kin | Bound kinemeatics driver. |
Definition at line 1872 of file laeKin.cxx.
|
virtual |
Execution new velocities.
All motors with new velocities are written with new speeds.
Reimplemented from laelaps::LaeKinAction.
Definition at line 1920 of file laeKin.cxx.
References laelaps::LaeKinAction::ActionStateIdle, motor::roboclaw::RoboClaw::cmdDutyDrive2(), laelaps::LaeKinAction::execute(), laelaps::LaeKinematics::getMotorCtlr(), laelaps::LaePowertrain::getName(), laelaps::LaeKinematics::getPowertrain(), laelaps::LaeKinAction::isExecutionRequired(), laelaps::LAE_ECODE_MOT_CTLR, laelaps::LAE_OK, laelaps::LaeNumMotorCtlrs, laelaps::LaeNumMotorsPerCtlr, laelaps::LaeKinAction::m_eActionState, laelaps::LaeKinAction::m_kin, and m_mapGoalDutyCycle.
Referenced by laelaps::LaeKinematics::setGoalDutyCycles().
|
virtual |
Terminate action.
All motors are stopped.
Reimplemented from laelaps::LaeKinAction.
Definition at line 1985 of file laeKin.cxx.
References clear(), motor::roboclaw::RoboClaw::cmdDutyDrive2(), laelaps::LaeKinematics::getMotorCtlr(), laelaps::LaeKinAction::hasTerminated(), laelaps::LAE_OK, laelaps::LaeNumMotorCtlrs, laelaps::LaeKinAction::m_kin, and laelaps::LaeKinAction::terminate().
| int LaeKinActionDutyCycle::update | ( | const LaeMapDutyCycle & | dutycycle | ) |
Update with new velocities.
| velocity | Map of powertrain velocities. |
Definition at line 1877 of file laeKin.cxx.
References laelaps::LaeKinAction::ActionStateExecute, laelaps::LaeKinAction::ActionStateIdle, laelaps::LaeKinAction::ActionStateUpdate, laelaps::LAE_OK, laelaps::LaeKinAction::m_eActionState, and m_mapGoalDutyCycle.
Referenced by laelaps::LaeKinematics::setGoalDutyCycles().