#include <ServoMotor.h>
Inheritance diagram for opal::ServoMotor:
Public Member Functions | |
ServoMotor () | |
virtual | ~ServoMotor () |
virtual void OPAL_CALL | init (const ServoMotorData &data) |
virtual const ServoMotorData &OPAL_CALL | getData () const |
virtual MotorType OPAL_CALL | getType () const |
virtual void OPAL_CALL | setName (const std::string &name) |
virtual const std::string &OPAL_CALL | getName () const |
virtual bool OPAL_CALL | isEnabled () const |
virtual void OPAL_CALL | setEnabled (bool e) |
virtual void OPAL_CALL | setDesiredAngle (real a) |
virtual void OPAL_CALL | setDesiredAngleNorm (real a) |
virtual real OPAL_CALL | getDesiredAngle () const |
virtual void OPAL_CALL | setDesiredVel (real vel) |
virtual real OPAL_CALL | getDesiredVel () const |
virtual void OPAL_CALL | setMaxTorque (real max) |
virtual real OPAL_CALL | getMaxTorque () const |
virtual void OPAL_CALL | setRestoreSpeed (real speed) |
virtual real OPAL_CALL | getRestoreSpeed () const |
virtual void OPAL_CALL | internal_update () |
virtual bool OPAL_CALL | internal_dependsOnJoint (Joint *j) |
Protected Attributes | |
ServoMotorData | mData |
Definition at line 44 of file ServoMotor.h.
|
Definition at line 32 of file ServoMotor.cpp. |
|
Definition at line 38 of file ServoMotor.cpp. References opal::MotorData::enabled, opal::Joint::internal_setDesiredVel(), opal::Joint::internal_setMaxTorque(), opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, and mData. |
|
Returns all data describing the Motor.
Definition at line 70 of file ServoMotor.cpp. References mData. |
|
Gets the desired angle, a value between the Joint axis' limits. Definition at line 196 of file ServoMotor.cpp. References opal::ServoMotorData::desiredAngle, and mData. |
|
Returns the desired velocity.
Definition at line 207 of file ServoMotor.cpp. References opal::ServoMotorData::desiredVel, and mData. |
|
Returns the maximum amount of torque this Motor can use.
Definition at line 218 of file ServoMotor.cpp. References opal::ServoMotorData::maxTorque, and mData. |
|
Returns the Motor's name.
Implements opal::Motor. Definition at line 85 of file ServoMotor.cpp. References mData, and opal::MotorData::name. |
|
Returns the restore speed.
Definition at line 228 of file ServoMotor.cpp. References mData, and opal::ServoMotorData::restoreSpeed. |
|
Returns the Motor type.
Implements opal::Motor. Definition at line 75 of file ServoMotor.cpp. References opal::MotorData::getType(), and mData. |
|
Initializes the Motor with the given data structure. Joint pointer in the data must be valid. Definition at line 50 of file ServoMotor.cpp. References opal::Joint::getNumAxes(), opal::Motor::init(), opal::Joint::isRotational(), opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, mData, opal::Motor::mInitCalled, and setEnabled(). |
|
Returns true if this Motor depends on the given Joint.
Reimplemented from opal::Motor. Definition at line 233 of file ServoMotor.cpp. References opal::ServoMotorData::joint, and mData. |
|
Called regularly to update the Motor. This does nothing if the Motor is disabled. Implements opal::Motor. Definition at line 121 of file ServoMotor.cpp. References opal::DESIRED_ANGLE_MODE, opal::ServoMotorData::desiredAngle, opal::MotorData::enabled, opal::Joint::getAngle(), opal::Joint::internal_setDesiredVel(), opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, mData, opal::ServoMotorData::mode, opal::ServoMotorData::restoreSpeed, and opal::Joint::wakeSolids(). |
|
Returns true if the Motor is enabled.
Implements opal::Motor. Definition at line 90 of file ServoMotor.cpp. References opal::MotorData::enabled, and mData. |
|
Sets the desired angle to a value between the Joint axis' limits. Clamps given angle into allowed range for the joint. Definition at line 159 of file ServoMotor.cpp. References opal::ServoMotorData::desiredAngle, opal::Joint::getHighLimit(), opal::Joint::getLowLimit(), opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, and mData. |
|
Sets the desired angle to a value between 0.0 and 1.0 which will be mapped to the Joint axis' limits. Clamps given angle into [0,1] range. Definition at line 177 of file ServoMotor.cpp. References opal::ServoMotorData::desiredAngle, opal::Joint::getHighLimit(), opal::Joint::getLowLimit(), opal::defaults::joint::highLimit, opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, opal::defaults::joint::lowLimit, and mData. |
|
Sets the desired velocity.
Definition at line 201 of file ServoMotor.cpp. References opal::ServoMotorData::desiredVel, opal::Joint::internal_setDesiredVel(), opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, and mData. |
|
Sets whether the Motor has any effect.
Implements opal::Motor. Definition at line 95 of file ServoMotor.cpp. References opal::ServoMotorData::desiredVel, opal::MotorData::enabled, opal::Joint::internal_setDesiredVel(), opal::Joint::internal_setMaxTorque(), opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, opal::ServoMotorData::maxTorque, and mData. Referenced by init(). |
|
Sets the maximum amount of torque this Motor can use.
Definition at line 212 of file ServoMotor.cpp. References opal::Joint::internal_setMaxTorque(), opal::ServoMotorData::joint, opal::ServoMotorData::jointAxisNum, opal::ServoMotorData::maxTorque, and mData. |
|
Sets the Motor's name.
Implements opal::Motor. Definition at line 80 of file ServoMotor.cpp. References mData, and opal::MotorData::name. |
|
Sets the restore speed, the parameter used to scale how fast the Motor will achieve its desired position. Only used in the desired position mode. Definition at line 223 of file ServoMotor.cpp. References mData, and opal::ServoMotorData::restoreSpeed. |
|
Stores data describing the Motor.
Definition at line 113 of file ServoMotor.h. Referenced by getData(), getDesiredAngle(), getDesiredVel(), getMaxTorque(), getName(), getRestoreSpeed(), getType(), init(), internal_dependsOnJoint(), internal_update(), isEnabled(), setDesiredAngle(), setDesiredAngleNorm(), setDesiredVel(), setEnabled(), setMaxTorque(), setName(), setRestoreSpeed(), and ~ServoMotor(). |