|  | Laelaps
    2.3.5
    RoadNarrows Robotics Small Outdoor Mobile Robot Project | 
Laelaps kinematics velocity action class. More...
#include <laeKin.h>
 
  
 | Public Member Functions | |
| LaeKinActionTwist (LaeKinematics &kin) | |
| Default initialization constructor.  More... | |
| virtual | ~LaeKinActionTwist () | 
| Destructor. | |
| int | update (double fVelLinear, double fVelAngular) | 
| Update with new velocities.  More... | |
| virtual int | plan () | 
| Plan next execution.  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 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 | |
| double | m_fGoalVelLinear | 
| goal platform linear velocity | |
| double | m_fGoalVelAngular | 
| goal platform angular velocity | |
| s32_t | m_speed [LaeNumMotorCtlrs][LaeNumMotorsPerCtlr] | 
| target motor speeds (qpps) | |
|  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 velocity action class.
A velocity action only sets the velocities of a (sub)set of the powertrain velocities. Powertrains not specified are kept at their current velocities.
| LaeKinActionTwist::LaeKinActionTwist | ( | LaeKinematics & | kin | ) | 
Default initialization constructor.
| kin | Bound kinemeatics driver. | 
Definition at line 2023 of file laeKin.cxx.
References clear().
| 
 | virtual | 
Execution new velocities.
All motors with new velocities are written with new speeds.
Reimplemented from laelaps::LaeKinAction.
Definition at line 2159 of file laeKin.cxx.
References laelaps::LaeKinAction::ActionStateIdle, motor::roboclaw::RoboClaw::cmdQDriveWithAccel(), laelaps::LaeKinAction::execute(), laelaps::LaeKinematics::getMotorCtlr(), laelaps::LaeKinAction::isExecutionRequired(), laelaps::LAE_ECODE_MOT_CTLR, laelaps::LAE_OK, laelaps::LaeMotorLeft, laelaps::LaeMotorRight, laelaps::LaeNumMotorCtlrs, laelaps::LaeKinAction::m_eActionState, laelaps::LaeKinAction::m_kin, and m_speed.
Referenced by laelaps::LaeKinematics::setGoalTwist().
| 
 | virtual | 
Plan next execution.
If new velocities, the motor quad pulse per second are calculated.
Reimplemented from laelaps::LaeKinAction.
Definition at line 2053 of file laeKin.cxx.
References laelaps::LaeKinAction::ActionStateExecute, laelaps::LaeKinAction::ActionStateIdle, laelaps::LaeKinematics::getPlatform(), laelaps::LaeKinematics::getPowertrain(), laelaps::LaeKinAction::isPlanningRequired(), laelaps::LAE_OK, laelaps::LaeMotorLeft, laelaps::LaeNumMotorCtlrs, laelaps::LaeNumMotorsPerCtlr, laelaps::LaePowertrain::m_attr, laelaps::LaeKinAction::m_eActionState, m_fGoalVelAngular, m_fGoalVelLinear, laelaps::LaePowertrainAttr::m_fMetersPerPulse, laelaps::LaePlatform::m_fWheeltrack, laelaps::LaeKinAction::m_kin, m_speed, laelaps::LaePowertrainAttr::m_uMaxQpps, and laelaps::LaeKinAction::plan().
Referenced by laelaps::LaeKinematics::setGoalTwist().
| 
 | virtual | 
Terminate action.
All motors are stopped.
Reimplemented from laelaps::LaeKinAction.
Definition at line 2197 of file laeKin.cxx.
References clear(), motor::roboclaw::RoboClaw::cmdStopWithDecel(), laelaps::LaeKinematics::getMotorCtlr(), laelaps::LaeKinAction::hasTerminated(), laelaps::LAE_OK, laelaps::LaeNumMotorCtlrs, laelaps::LaeKinAction::m_kin, and laelaps::LaeKinAction::terminate().
| int LaeKinActionTwist::update | ( | double | fVelLinear, | 
| double | fVelAngular | ||
| ) | 
Update with new velocities.
| fVelLinear | Linear velocity (meters/second). | 
| fVelAngular | Angular velocity (radians/second). | 
Definition at line 2029 of file laeKin.cxx.
References laelaps::LaeKinAction::ActionStateIdle, laelaps::LaeKinAction::ActionStatePlan, laelaps::LaeKinAction::ActionStateUpdate, laelaps::LAE_OK, laelaps::LaeKinAction::m_eActionState, m_fGoalVelAngular, m_fGoalVelLinear, and laelaps::radToDeg().
Referenced by laelaps::LaeKinematics::setGoalTwist().