Controller for opening and closing the elevator door. More...
#include <ElevatorPluginPrivate.hh>
Public Types | |
enum | State { MOVING, STATIONARY } |
Door motion states. More... | |
enum | Target { OPEN, CLOSE } |
Door targets. More... | |
Public Member Functions | |
DoorController (physics::JointPtr _doorJoint) | |
Constructor. More... | |
virtual | ~DoorController ()=default |
Destructor. More... | |
ElevatorPluginPrivate::DoorController::State | GetState () const |
Get the current state. More... | |
ElevatorPluginPrivate::DoorController::Target | GetTarget () const |
Get the current target. More... | |
void | Reset () |
Reset the controller. More... | |
void | SetTarget (ElevatorPluginPrivate::DoorController::Target _target) |
Set the target for the door (OPEN or CLOSE). More... | |
virtual bool | Update (const common::UpdateInfo &_info) |
Update the controller. More... | |
Public Attributes | |
physics::JointPtr | doorJoint |
Pointer to the door joint. More... | |
common::PID | doorPID |
PID controller for the door. More... | |
common::Time | prevSimTime |
Previous simulation time. More... | |
State | state |
Current door state. More... | |
Target | target |
Current door target. More... | |
Controller for opening and closing the elevator door.
gazebo::ElevatorPluginPrivate::DoorController::DoorController | ( | physics::JointPtr | _doorJoint | ) |
Constructor.
[in] | _doorJoint | Pointer to the joint that should be controlled. |
|
virtualdefault |
Destructor.
ElevatorPluginPrivate::DoorController::State gazebo::ElevatorPluginPrivate::DoorController::GetState | ( | ) | const |
Get the current state.
ElevatorPluginPrivate::DoorController::Target gazebo::ElevatorPluginPrivate::DoorController::GetTarget | ( | ) | const |
Get the current target.
void gazebo::ElevatorPluginPrivate::DoorController::Reset | ( | ) |
Reset the controller.
void gazebo::ElevatorPluginPrivate::DoorController::SetTarget | ( | ElevatorPluginPrivate::DoorController::Target | _target | ) |
Set the target for the door (OPEN or CLOSE).
[in] | _target | The target for the door. |
|
virtual |
Update the controller.
[in] | _info | Update information provided by the server. |
physics::JointPtr gazebo::ElevatorPluginPrivate::DoorController::doorJoint |
Pointer to the door joint.
common::PID gazebo::ElevatorPluginPrivate::DoorController::doorPID |
PID controller for the door.
common::Time gazebo::ElevatorPluginPrivate::DoorController::prevSimTime |
Previous simulation time.
State gazebo::ElevatorPluginPrivate::DoorController::state |
Current door state.
Target gazebo::ElevatorPluginPrivate::DoorController::target |
Current door target.