Public Types | Public Member Functions | Public Attributes | List of all members
gazebo::ElevatorPluginPrivate::LiftController Class Reference

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...
 

Detailed Description

Controller for raising and lowering the elevator.

Member Enumeration Documentation

Lift state.

Enumerator
MOVING 

The lift is moving.

STATIONARY 

The lift is stationary.

Constructor & Destructor Documentation

gazebo::ElevatorPluginPrivate::LiftController::LiftController ( physics::JointPtr  _liftJoint,
float  _floorHeight 
)

Constructor.

Parameters
[in]_liftJointPointer to the joint that should be controlled.
[in]_floorHeightHeight of each floor.
virtual gazebo::ElevatorPluginPrivate::LiftController::~LiftController ( )
virtualdefault

Destructor.

Member Function Documentation

int gazebo::ElevatorPluginPrivate::LiftController::GetFloor ( ) const

Get the current floor.

Returns
Floor number
ElevatorPluginPrivate::LiftController::State gazebo::ElevatorPluginPrivate::LiftController::GetState ( ) const

Get the current state.

Returns
Current lift state.
void gazebo::ElevatorPluginPrivate::LiftController::Reset ( )

Reset the controller.

void gazebo::ElevatorPluginPrivate::LiftController::SetFloor ( int  _floor)

Set the current floor to move to.

Parameters
[in]_floorFloor number.
virtual bool gazebo::ElevatorPluginPrivate::LiftController::Update ( const common::UpdateInfo _info)
virtual

Update the controller.

Parameters
[in]_infoUpdate information provided by the server.
Returns
True if the target has been reached.

Member Data Documentation

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.

State gazebo::ElevatorPluginPrivate::LiftController::state

State of the controller.


The documentation for this class was generated from the following file: