Controller for raising and lowering the elevator. More...
#include <ElevatorPluginPrivate.hh>
Public Types | |
enum | State { MOVING, STATIONARY } |
Lift state. More... | |
Public Member Functions | |
LiftController (physics::JointPtr _liftJoint, float _floorHeight) | |
Constructor. More... | |
virtual | ~LiftController ()=default |
Destructor. More... | |
int | GetFloor () const |
Get the current floor. More... | |
ElevatorPluginPrivate::LiftController::State | GetState () const |
Get the current state. More... | |
void | Reset () |
Reset the controller. More... | |
void | SetFloor (int _floor) |
Set the current floor to move to. More... | |
virtual bool | Update (const common::UpdateInfo &_info) |
Update the controller. More... | |
Public Attributes | |
int | floor |
Floor the elevator is on or moving to. More... | |
float | floorHeight |
Height of each floor. More... | |
physics::JointPtr | liftJoint |
Joint to control. More... | |
common::PID | liftPID |
PID controller. More... | |
common::Time | prevSimTime |
Previous simulation time. More... | |
State | state |
State of the controller. More... | |
Controller for raising and lowering the elevator.
gazebo::ElevatorPluginPrivate::LiftController::LiftController | ( | physics::JointPtr | _liftJoint, |
float | _floorHeight | ||
) |
Constructor.
[in] | _liftJoint | Pointer to the joint that should be controlled. |
[in] | _floorHeight | Height of each floor. |
|
virtualdefault |
Destructor.
int gazebo::ElevatorPluginPrivate::LiftController::GetFloor | ( | ) | const |
Get the current floor.
ElevatorPluginPrivate::LiftController::State gazebo::ElevatorPluginPrivate::LiftController::GetState | ( | ) | const |
Get the current state.
void gazebo::ElevatorPluginPrivate::LiftController::Reset | ( | ) |
Reset the controller.
void gazebo::ElevatorPluginPrivate::LiftController::SetFloor | ( | int | _floor | ) |
Set the current floor to move to.
[in] | _floor | Floor number. |
|
virtual |
Update the controller.
[in] | _info | Update information provided by the server. |
int gazebo::ElevatorPluginPrivate::LiftController::floor |
Floor the elevator is on or moving to.
float gazebo::ElevatorPluginPrivate::LiftController::floorHeight |
Height of each floor.
physics::JointPtr gazebo::ElevatorPluginPrivate::LiftController::liftJoint |
Joint to control.
common::PID gazebo::ElevatorPluginPrivate::LiftController::liftPID |
PID controller.
common::Time gazebo::ElevatorPluginPrivate::LiftController::prevSimTime |
Previous simulation time.