AnimatLab
2
Test
|
Public Member Functions | |
virtual float * | GetDataPointer (const std::string &strDataType) |
virtual Simulator * | GetSimulator () |
virtual void | Initialize () |
Initializes this object. More... | |
virtual void | InitMotorData () |
Initializes the internal data on position and velocity from the actual motor. More... | |
virtual void | IOComponentID (int iID) |
virtual bool | IsMotorControl () |
Returns true if this part interface is for controlling a motor. More... | |
virtual void | Load (StdUtils::CStdXml &oXml) |
virtual void | MicroSleep (unsigned int iTime) |
virtual float | QuantizeServoPosition (float fltPos) |
virtual float | QuantizeServoVelocity (float fltVel) |
virtual void | QueryProperties (CStdPtrArray< TypeProperty > &aryProperties) |
virtual void | ResetSimulation () |
virtual bool | SetData (const std::string &strDataType, const std::string &strValue, bool bThrowError=true) |
Set a variable based on a string data type name. More... | |
virtual void | SetupIO () |
This method is called after all connections to whatever control board have been made. It is meant to be used to setup connection information specific to this part. For example, We connect to a Firmata microcontroller like an Arduino, and then do a setup that could take some time. We should not attempt to setup any of the pins until after the board itself has been setup. After that we need to loop through and setup all the parts. That is what this method is for. More... | |
virtual void | ShutdownIO () |
This method is called just before the IO thread is closed down. It gives the IO objects a chance to do any required cleanup. More... | |
virtual void | ShutdownMotor () |
Shuts the motor down cleanly and ensures that it is not continuing to move after processing has stopped. More... | |
virtual void | StepIO (int iPartIdx) |
This method is used to send/recieve the actual IO. This will often be in a seperate thread than the StepSimulation. StepSimulation gets/sets the values in the sim and gets it read for the thread that does the IO. Once that thread is ready to send/receive it uses that value to perform the operation. More... | |
virtual void | StepSimulation () |
virtual void | Stop () |
virtual void | WaitForMoveToFinish () |
![]() | |
virtual void | CCWComplianceMargin (int iVal) |
virtual int | CCWComplianceMargin () |
virtual void | CCWComplianceSlope (int iVal) |
virtual int | CCWComplianceSlope () |
virtual int | ConvertFloatVelocity (float fltVelocity) |
Gets the fixed point velocity form the floating point. More... | |
virtual float | ConvertFPLoad (int iLoad) |
Gets the floating point value of the servo load. The fixed point value is retrieved from the servo and then converted. More... | |
virtual float | ConvertFPVelocity (int iVel) |
Gets the floating point value of the servo actual velocity. The fixed point value is retrieved from the servo and then converted to rad/s. More... | |
virtual int | ConvertPosFloatToFP (float fltPos) |
virtual float | ConvertPosFPToFloat (int iPos) |
virtual void | CWComplianceMargin (int iVal) |
virtual int | CWComplianceMargin () |
virtual void | CWComplianceSlope (int iVal) |
virtual int | CWComplianceSlope () |
virtual float | GetActualLoad () |
Gets the floating point value of the servo actual torque. The fixed point value is retrieved from the servo and then converted to Nm. More... | |
virtual int | GetActualLoad_FP () |
Gets the fixed point value of the servo actual load. This is the exact value returned from the servo. More... | |
virtual float | GetActualPosition () |
Gets the floating point value of the servo actual position. The fixed point value is retrieved from the servo and then converted to radians. More... | |
virtual int | GetActualPosition_FP () |
Gets the fixed point value of the servo actual position. This is the exact value returned from the servo. More... | |
virtual float | GetActualTemperatureCelcius () |
Gets the floating point value of the servo actual temperature. The fixed point value is retrieved from the servo and then converted to celcius. More... | |
virtual float | GetActualTemperatureFahrenheit () |
Gets the floating point value of the servo actual temperature. The fixed point value is retrieved from the servo and then converted to fahrenheit. More... | |
virtual float | GetActualVelocity () |
Gets the floating point value of the servo actual velocity. The fixed point value is retrieved from the servo and then converted to rad/s. More... | |
virtual int | GetActualVelocity_FP () |
Gets the fixed point value of the servo actual velocity. This is the exact value returned from the servo. More... | |
virtual float | GetActualVoltage () |
Gets the floating point value of the servo actual voltage. The fixed point value is retrieved from the servo and then converted to V. More... | |
virtual int | GetActualVoltage_FP () |
Gets the fixed point value of the servo actual voltage. This is the exact value returned from the servo. More... | |
virtual float | GetCCWAngleLimit () |
Gets the limit for the CCW limit of the servo in radian values. More... | |
virtual int | GetCCWAngleLimit_FP () |
Gets the limit for the CCW limit of the servo in fixed point value. More... | |
virtual int | GetCCWComplianceMargin_FP () |
virtual int | GetCCWComplianceSlope_FP () |
virtual float | GetCWAngleLimit () |
Gets the limit for the CW limit of the servo in radian values. More... | |
virtual int | GetCWAngleLimit_FP () |
Gets the limit for the CW limit of the servo in fixed point value. More... | |
virtual int | GetCWComplianceMargin_FP () |
virtual int | GetCWComplianceSlope_FP () |
virtual int | GetFirmwareVersion () |
Returns whether the servo firmware version number. More... | |
virtual float | GetGoalPosition () |
Gets the floating point value of the servo goal position. The fixed point value is retrieved from the servo and then converted to radians. More... | |
virtual int | GetGoalPosition_FP () |
Gets the fixed point value of the servo goal position. This is the exact value returned from the servo. More... | |
virtual float | GetGoalVelocity () |
Gets the floating point value of the servo velocity. The fixed point value is retrieved from the servo and then converted to rad/s. More... | |
virtual int | GetGoalVelocity_FP () |
Gets the fixed point value of the servo velocity. This is the exact value returned from the servo. More... | |
virtual int | GetIDNumber () |
Returns whether the servo ID number. More... | |
virtual bool | GetIsAlarmShutdown () |
Returns whether the alarm shutdown state is active. More... | |
virtual void | GetIsLEDOn (bool &bIsBlueOn, bool &bIsGreenOn, bool &bIsRedOn) |
Returns whether the servo blue led is currently on. More... | |
virtual bool | GetIsMoving () |
Returns whether the servo is currently moving or has already reached its goal state. More... | |
virtual float | GetMaxSimPos () |
Gets the maximum position in radians that the simulation will allow for the joint. More... | |
virtual int | GetMaxSimPos_FP () |
Gets the maximum position in fixed point that the simulation will allow for the joint. More... | |
virtual int | GetMaxTorque_FP () |
virtual float | GetMinSimPos () |
Gets the minimum position in radians that the simulation will allow for the joint. More... | |
virtual int | GetMinSimPos_FP () |
Gets the minimum position in fixed point that the simulation will allow for the joint. More... | |
virtual int | GetModelNumber () |
Returns whether the model number of the servo. More... | |
virtual float | GetPresentLoad () |
virtual float | GetPresentPosition () |
virtual float | GetPresentTemperature () |
virtual float | GetPresentVelocity () |
virtual float | GetPresentVoltage () |
virtual int | GetReturnDelayTime_FP () |
Gets the return delay time of the servo. More... | |
virtual int | GetTorqueLimit_FP () |
Gets the torque limit of the servo in fixed point value. More... | |
virtual int | LastGoalPosition_FP () |
Gets the last goal position that was sent to the servo. This is used so we can see the last value we set without having to requery it from the servo. More... | |
virtual int | LastGoalVelocity_FP () |
Gets the last goal velocity that was sent to the servo. This is used so we can see the last value we set without having to requery it from the servo. More... | |
virtual void | MaxAngle (float fltVal) |
virtual float | MaxAngle () |
virtual void | MaxLoadFP (int iVal) |
virtual int | MaxLoadFP () |
virtual void | MaxPosFP (int iVal) |
virtual int | MaxPosFP () |
virtual void | MaxTorque (int iVal) |
virtual int | MaxTorque () |
virtual void | MaxVelocityFP (int iVal) |
virtual int | MaxVelocityFP () |
virtual void | MinAngle (float fltVal) |
virtual float | MinAngle () |
virtual void | MinLoadFP (int iVal) |
virtual int | MinLoadFP () |
virtual void | MinPosFP (int iVal) |
virtual int | MinPosFP () |
virtual void | MinVelocityFP (int iVal) |
virtual int | MinVelocityFP () |
virtual void | QueryMotorData (bool bVal) |
virtual bool | QueryMotorData () |
virtual bool | ResetToStartPos () |
virtual void | ResetToStartPos (bool bVal) |
virtual void | RPMPerFPUnit (float fltVal) |
virtual float | RPMPerFPUnit () |
virtual void | ServoID (int iID) |
Sets the ID that will be used for communications with this servo. This is NOT writing an ID to the servo. It is just specifying which one to use for com access. More... | |
virtual int | ServoID () |
Gets the servo ID being used for communications. More... | |
virtual void | SetCCWAngleLimit (float fltLimit) |
Sets the limit for the CCW limit of the servo using radians. More... | |
virtual void | SetCCWAngleLimit_FP (int iVal) |
Sets the limit for the CCW limit of the servo using fixed point value. More... | |
virtual void | SetCCWComplianceMargin_FP (int iVal) |
virtual void | SetCCWComplianceSlope_FP (int iVal) |
virtual void | SetCWAngleLimit (float fltLimit) |
Sets the limit for the CW limit of the servo using radians. More... | |
virtual void | SetCWAngleLimit_FP (int iVal) |
Sets the limit for the CW limit of the servo using fixed point value. More... | |
virtual void | SetCWComplianceMargin_FP (int iVal) |
virtual void | SetCWComplianceSlope_FP (int iVal) |
virtual void | SetGoalPosition (float fltPos) |
Sets the floating point value of the servo goal position. This is the position in radians. It will be converted to a fixed point value based on the motor configuration and then used to set the position. This method assumes that center value is 0 and that it uses +/- values on either side. More... | |
virtual void | SetGoalPosition_FP (int iPos) |
Sets the fixed point value of the servo goal position. This is the exact value that will be sent to the servo. More... | |
virtual void | SetGoalVelocity (float fltVelocity) |
Sets the floating point value of the servo velocity. This is the velocity in rad/s. It will be converted to a fixed point value based on the motor configuration and then used to set the velocity. More... | |
virtual void | SetGoalVelocity_FP (int iVelocity) |
Sets the fixed point value of the servo velocity. This is the exact value that will be sent to the servo. This method excludes the velocity of 0 which defaults it to move at its fastest speed. If you want to do that then use the SetMaximumVelocity method. More... | |
virtual void | SetMaximumVelocity () |
Sets the servo goal speed to 0 for maximum velocity. More... | |
virtual void | SetMaxSimPos (float fltVal) |
Sets the maximum position that the simulation will allow for this joint in radians. More... | |
virtual void | SetMaxTorque_FP (int iVal) |
virtual void | SetMinSimPos (float fltVal) |
Sets the minimum position that the simulation will allow for this joint in radians. More... | |
virtual void | SetNextGoalPosition (float fltPos) |
Sets the floating point value of the servo goal position that will be used the next time the iO for this servo is processed. This is the position in radians. It will be converted to a fixed point value based on the motor configuration and then used to set the position. This method assumes that center value is 0 and that it uses +/- values on either side. More... | |
virtual void | SetNextGoalPosition_FP (int iPos) |
Sets the fixed point value of the servo goal position that will be used the next time the IO for this servo is processed. This is the exact value that will be sent to the servo. More... | |
virtual void | SetNextGoalVelocity (float fltVelocity) |
Sets the floating point value of the servo velocity the next time the IO for this servo is processed. This is the velocity in rad/s. It will be converted to a fixed point value based on the motor configuration and then used to set the velocity. More... | |
virtual void | SetNextGoalVelocity_FP (int iVelocity) |
Sets the fixed point value of the servo velocity for the next time the IO for this servo is processed. More... | |
virtual void | SetNextMaximumVelocity () |
Sets the servo goal speed to 0 for maximum velocity the next time the IO for this servo is processed. More... | |
virtual void | SetReturnDelayTime_FP (int iVal) |
Sets the return delay time of the servo. More... | |
virtual void | SetTorqueLimit_FP (int iVal) |
Sets the torque limit of the servo using fixed point value. More... | |
virtual float | TranslationRange () |
Gets the the total range of translation for a prismatic joint (meters). More... | |
virtual void | TranslationRange (float fltVal) |
Sets the total range for translation of a prismatic joint. More... | |
![]() | |
virtual RbFirmataController * | GetFirmata () |
virtual void | ParentIOControl (RobotIOControl *lpParent) |
virtual void | SetFirmata (RbFirmataController *lpFirmata) |
![]() | |
virtual bool | Changed () |
virtual void | Changed (bool bVal) |
virtual Gain * | GetGain () |
Gets the poitner to the gain function. More... | |
virtual bool | IncludeInPartsCycle () |
virtual int | IOComponentID () |
virtual float | IOScaledValue () |
virtual void | IOScaledValue (float fltVal) |
virtual float | IOValue () |
virtual void | IOValue (float fltVal) |
virtual int | IOValueInt () |
virtual void | IOValueInt (int iVal) |
virtual void | LinkedPartID (std::string strID) |
virtual std::string | LinkedPartID () |
virtual void | Load (CStdXml &oXml) |
virtual void | ParentIOControl (RobotIOControl *lpParent) |
virtual RobotIOControl * | ParentIOControl () |
virtual void | PropertyName (std::string strName) |
virtual std::string | PropertyName () |
virtual void | QueryProperties (CStdPtrArray< TypeProperty > &aryProperties) |
Queries this object for a list of properties that can be changed using SetData. More... | |
virtual void | SetGain (Gain *lpGain) |
virtual float | StepIODuration () |
Gets the time duration required to perform one step of the IO for this part. More... | |
![]() | |
AnimatBase () | |
Constructs an AnimatBase object. More... | |
virtual | ~AnimatBase () |
Destroys the AnimatBase object.. More... | |
virtual bool | AddItem (const std::string &strItemType, const std::string &strXml, bool bThrowError=true, bool bDoNotInit=false) |
Adds a new object to this parent. More... | |
virtual void | AfterResetSimulation () |
Called after a simulation reset for some objects. More... | |
virtual long | CalculateSnapshotByteSize () |
Calculates the snapshot byte size. More... | |
virtual void | Copy (CStdSerialize *lpSource) |
virtual void | Enabled (bool bVal) |
Tells whether this item is enabled or not. This is not actually used for all objects, only specific ones. I am putting it in the base class though to prevent numerous duplications. More... | |
virtual bool | Enabled () |
Tells whether this item is enabled or not. This is not actually used for all objects, only specific ones. I am putting it in the base class though to prevent numerous duplications. More... | |
virtual NeuralModule * | GetNeuralModule () |
Gets the neural module. More... | |
virtual Node * | GetNode () |
Gets the node. More... | |
virtual Structure * | GetStructure () |
Gets the structure for this node. More... | |
virtual bool | HasProperty (const std::string &strName) |
Queries this object if it has a property with the given name. More... | |
virtual std::string | ID () |
Gets the unique GUID ID of this object. More... | |
virtual void | ID (std::string strValue) |
Sets the unique GUID ID of the object. More... | |
virtual void | Kill (bool bState=true) |
Kills. More... | |
virtual void | LoadKeyFrameSnapshot (byte *aryBytes, long &lIndex) |
Loads a key frame snapshot. More... | |
virtual std::string | Name () |
Gets the name of this object. More... | |
virtual void | Name (std::string strValue) |
Sets the name of the object. Blank is acceptable. More... | |
virtual AnimatPropertyType | PropertyType (const std::string &strName) |
virtual void | ReInitialize () |
Re-initialize this object. More... | |
virtual bool | RemoveItem (const std::string &strItemType, const std::string &strID, bool bThrowError=true) |
Removes a child item from this parent. More... | |
virtual void | Reset () |
Resets this object. More... | |
virtual void | RigidBodyAdded (std::string strID) |
virtual void | RigidBodyRemoved (std::string strID) |
virtual void | SaveKeyFrameSnapshot (byte *aryBytes, long &lIndex) |
Saves a key frame snapshot. More... | |
virtual bool | Selected () |
Tells if this items is selected or not. More... | |
virtual void | Selected (bool bValue, bool bSelectMultiple) |
Selects this object. More... | |
virtual bool | SetData (const std::string &strDataType, const float fltValue, bool bThrowError=true) |
Set a variable based on a string data type name. More... | |
virtual bool | SetData (const std::string &strDataType, const long lValue, bool bThrowError=true) |
Set a variable based on a string data type name. More... | |
virtual void | SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify) |
Sets the system pointers. More... | |
virtual void | SimPausing () |
Called just before the simulation pauses. More... | |
virtual void | SimStarting () |
Called just before the simulation starts. More... | |
virtual void | SimStopping () |
Called just before the simulation stops. More... | |
virtual void | TimeStepModified () |
Notification method that the time step modified has been modified. Objects should recalculate any slice times as needed. More... | |
virtual std::string | Type () |
returns the string type name of this object. More... | |
virtual void | Type (std::string strValue) |
Sets the class type for this object. More... | |
virtual void | VerifySystemPointers () |
Verify that system pointers have been set correctly. More... | |
virtual void | VisualSelectionModeChanged (int iNewMode) |
Visual selection mode changed. More... | |
Protected Member Functions | |
virtual void | AddMotorUpdate (int iPos, int iSpeed) |
virtual void | ConfigureServo () |
Checks the current limits on the motor and sets them according to the simulation params. More... | |
virtual void | DynamixelGetRegister (const unsigned char &iServoID, const unsigned char &iReg, const unsigned int &iValue) |
virtual void | DynamixelRecieved (const int &iServoID) |
virtual void | DynamixelTransmitError (const int &iCmd, const int &iServoID) |
virtual int | GetRegister (unsigned char reg, unsigned char length) |
virtual void | Move (float fltPos, float fltVel) |
Moves the motor to the specified position at the given speed. More... | |
virtual int | ReadAlarmShutdown (int iServoID) |
virtual int | ReadCCWAngleLimit (int iServoID) |
virtual int | ReadCCWComplianceMargin (int iServoID) |
virtual int | ReadCCWComplianceSlope (int iServoID) |
virtual int | ReadCWAngleLimit (int iServoID) |
virtual int | ReadCWComplianceMargin (int iServoID) |
virtual int | ReadCWComplianceSlope (int iServoID) |
virtual int | ReadFirmwareVersion (int iServoID) |
virtual int | ReadGoalPosition (int iServoID) |
virtual int | ReadID (int iServoID) |
virtual int | ReadIsMoving (int iServoID) |
virtual int | ReadLED (int iServoID) |
virtual int | ReadMaxTorque (int iServoID) |
virtual int | ReadModelNumber (int iServoID) |
virtual int | ReadMovingSpeed (int iServoID) |
virtual int | ReadPresentLoad (int iServoID) |
virtual int | ReadPresentPosition (int iServoID) |
virtual int | ReadPresentSpeed (int iServoID) |
virtual int | ReadPresentTemperature (int iServoID) |
virtual int | ReadPresentVoltage (int iServoID) |
virtual int | ReadReturnDelayTime (int iServoID) |
virtual int | ReadTorqueLimit (int iServoID) |
virtual void | SetRegister (unsigned char reg, unsigned char length, unsigned int value) |
virtual void | UpdateAllMotorData () |
virtual void | UpdateKeyMotorData () |
virtual void | UpdateMotorData () |
virtual void | WriteCCWAngleLimit (int iServoID, int iVal) |
virtual void | WriteCCWComplianceMargin (int iServoID, int iVal) |
virtual void | WriteCCWComplianceSlope (int iServoID, int iVal) |
virtual void | WriteCWAngleLimit (int iServoID, int iVal) |
virtual void | WriteCWComplianceMargin (int iServoID, int iVal) |
virtual void | WriteCWComplianceSlope (int iServoID, int iVal) |
virtual void | WriteGoalPosition (int iServoID, int iPos) |
virtual void | WriteMaxTorque (int iServoID, int iVal) |
virtual void | WriteMovingSpeed (int iServoID, int iVelocity) |
virtual void | WriteReturnDelayTime (int iServoID, int iVal) |
virtual void | WriteTorqueLimit (int iServoID, int iVal) |
![]() | |
virtual void | GetLimitValues () |
virtual void | RecalculateParams () |
virtual bool | SetData (const std::string &strDataType, const std::string &strValue) |
virtual void | SetMotorPosVel () |
![]() | |
virtual void | AddGain (std::string strXml) |
Creates and adds a gain object. More... | |
Protected Attributes | |
boost::signals2::connection | m_EDynamixelGetRegister |
boost::signals2::connection | m_EDynamixelReceived |
boost::signals2::connection | m_EDynamixelTransmitError |
int | m_iAlarm |
Keeps track of alarm Status. | |
int | m_iCCWAngleLimit |
Keeps track of the counter-clockwise limit. | |
int | m_iCWAngleLimit |
Keeps track of the clockwise limit. | |
int | m_iFirmwareVersion |
Keeps track of the servos firmware version. This is updated once at the start of the sim and then used throughout. | |
int | m_iIsMoving |
Keeps track of whether this servo is moving. | |
unsigned int | m_iLastGetRegisterID |
unsigned int | m_iLastGetRegisterValue |
int | m_iLED |
Keeps track of LED Status. | |
int | m_iModelNum |
Keeps track of the servos model number. This is updated once at the start of the sim and then used throughout. | |
int | m_iReturnDelayTime |
Keeps track of the servos return delay time. | |
int | m_iTorqueLimit |
Keeps track of the torque limit. | |
unsigned long long | m_lStartServoUpdateTick |
The tick when we start a servo update. | |
![]() | |
bool | m_bIsHinge |
bool | m_bNeedSetVelStopPos |
bool | m_bQueryMotorData |
bool | m_bResetToStartPos |
If true then we should reset to the start position at the beginning of the simulation. | |
bool | m_bVelStopPosSet |
Keeps track of whether we have already set velocity to stop when doing velocity control. | |
float | m_fltCenterPos |
The center point value in radians. | |
float | m_fltConvertFPToLoad |
Used to conver the load fixed point value back to a percentage of load. | |
float | m_fltConvertFPToPosS |
The conversion factor to convert FP velocity value to rad/s. | |
float | m_fltConvertPosSToFP |
The conversion factor to convert rad/s to FP velocity. | |
float | m_fltFloatToFPTranslation |
Conversion factor for when we are doing prismatic joints. Converts rotations to linear movements. | |
float | m_fltFPToFloatTranslation |
Conversion factor for when we are doing prismatic joints. Converts rotations to linear movements. | |
float | m_fltHiLimit |
Hi constraint limit value. | |
float | m_fltIOPos |
Used to report back the IO position of the servo at each step. | |
float | m_fltIOVelocity |
Used to report back the IO velocity of the servo at each step. | |
float | m_fltLoad |
The current load that was last read in for this servo. | |
float | m_fltLowLimit |
Low constraint limit value. | |
float | m_fltMaxAngle |
Maximum value that can be set for the position in floating point number. | |
float | m_fltMaxPosSec |
Stores the maximum rad/sec for this motor. | |
float | m_fltMaxSimPos |
This is the maximum angle in radians that can be used for this servo as specified in the simulation. | |
float | m_fltMinAngle |
Minimum value that can be set for the position in floating point number. | |
float | m_fltMinSimPos |
This is the minimum angle in radians that can be used for this servo as specified in the simulation. | |
float | m_fltPosFloatToFPIntercept |
The conversion factor to convert radians to FP position. | |
float | m_fltPosFloatToFPSlope |
The conversion factor to convert radians to FP position. | |
float | m_fltPosFPToFloatIntercept |
The conversion factor to convert FP position to floating point position.. | |
float | m_fltPosFPToFloatSlope |
The conversion factor to convert FP position to floating point position. | |
float | m_fltPresentPos |
The current position that was last read in for this servo. | |
float | m_fltPresentVelocity |
The current velocity that was last read in for this servo. | |
float | m_fltReadParamTime |
The time taken to read the params of this motor for the current step. | |
float | m_fltRPMPerFPUnit |
Stores the maximum rot/min for this motor. The max rotations (rad) per fixed point unit. | |
float | m_fltTemperature |
The current temperature that was last read in for this servo. | |
float | m_fltTotalAngle |
Maximum angle the servo can move in floating point number. m_iMaxPosFP - m_iMinPosFP. | |
float | m_fltTranslationRange |
The total translation range over which a prismatic joint can move. This does not apply to hinge joints. | |
float | m_fltVoltage |
The current voltage that was last read in for this servo. | |
int | m_iCCWComplianceMargin |
Used to set the CCW compliance margin of the servo. | |
int | m_iCCWComplianceSlope |
Used to set the CCW compliance slope of the servo. | |
int | m_iCenterPosFP |
The center point value in fixed point numbers. | |
int | m_iCWComplianceMargin |
Used to set the CW compliance margin of the servo. | |
int | m_iCWComplianceSlope |
Used to set the CW compliance slope of the servo. | |
int | m_iLastGoalPos |
Keeps track of the last servo goal position that we set. | |
int | m_iLastGoalVelocity |
Keeps track of the last servo goal velocity that we set. | |
int | m_iLoad |
The current load that was last read in for this servo. | |
int | m_iMaxLoadFP |
Maximum value that can be set for the load. | |
int | m_iMaxPosFP |
Maximum value that can be set for the position in fixed point number. | |
int | m_iMaxSimPos |
This is the maximum angle in fixed point that can be used for this servo as specified in the simulation. | |
int | m_iMaxTorque |
Used to set the maximum torque of the servo. | |
int | m_iMaxVelocityFP |
Maximum value that can be set for the velocity. | |
int | m_iMinLoadFP |
Minimum value that can be set for the load. | |
int | m_iMinPosFP |
Minimum value that can be set for the position in fixed point number. | |
int | m_iMinSimPos |
This is the minimum angle in fixed point that can be used for this servo as specified in the simulation. | |
int | m_iMinVelocityFP |
Minimum value that can be set for the velocity. | |
int | m_iNextGoalPos |
This is the goal position that you would like to use in the next time step. | |
int | m_iNextGoalVelocity |
This is the goal velocity that you would like to use in the next time step. | |
int | m_iPresentPos |
The current position that was last read in for this servo. | |
int | m_iPresentVelocity |
The current velocity that was last read in for this servo. | |
int | m_iServoID |
ID used for communications with this servo. | |
int | m_iTemperature |
The current temperature that was last read in for this servo. | |
int | m_iTotalAngle |
Maximum angle the servo can move in fixed point number. m_iMaxPosFP - m_iMinPosFP. | |
int | m_iVoltage |
The current voltage that was last read in for this servo. | |
MotorizedJoint * | m_lpMotorJoint |
Pointer to an associated motorized joint. | |
![]() | |
RbFirmataController * | m_lpFirmata |
![]() | |
bool | m_bChanged |
True when the value changes. | |
float | m_fltIOScaledValue |
float | m_fltIOValue |
float | m_fltStepIODuration |
int | m_iIOComponentID |
int | m_iIOValue |
This stores the temporary IO value to be used later in IO calculations. | |
Gain * | m_lpGain |
Pointer to the Gain that will be used to convert the source value into the target value. | |
RobotInterface * | m_lpParentInterface |
RobotIOControl * | m_lpParentIOControl |
BodyPart * | m_lpPart |
float * | m_lpProperty |
std::string | m_strPartID |
std::string | m_strPropertyName |
![]() | |
bool | m_bEnabled |
Tells if this item is enabled or not. If it is not enabled then it is not run. | |
bool | m_bSelected |
Tells whether the object is selected or not. | |
AnimatSim::Behavior::NeuralModule * | m_lpModule |
The pointer to this items parentNeuralModule. If this is not relevant for this object then this is NULL. | |
Node * | m_lpNode |
The pointer to this items parent Node. If this is not relevant for this object then this is NULL. | |
Simulator * | m_lpSim |
The pointer to a Simulation. | |
AnimatSim::Environment::Structure * | m_lpStructure |
The pointer to this items parent Structure. If this is not relevant for this object then this is NULL. | |
std::string | m_strID |
The unique Id for this object. | |
std::string | m_strName |
The name for this object. | |
std::string | m_strType |
The type for this object. Examples are Box, Plane, Neuron, etc.. | |
Additional Inherited Members | |
![]() | |
static RobotPartInterface * | CastToDerived (AnimatBase *lpBase) |
Definition at line 18 of file RbFirmataDynamixelServo.h.
|
protectedvirtual |
Checks the current limits on the motor and sets them according to the simulation params.
Reimplemented from RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo.
Definition at line 231 of file RbFirmataDynamixelServo.cpp.
References RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iCCWComplianceMargin, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iCCWComplianceSlope, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iCWComplianceMargin, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iCWComplianceSlope, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iMaxSimPos, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iMaxTorque, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iMinSimPos, and RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iServoID.
|
virtual |
Initializes this object.
After an object is loaded in it must be initialized before it can be used. This allows the object to retrieve any pointers or setup memory that it will need during execution. Each object is responsible for initializing any of its child objects, so you simply need to call this method on the containing class to init all child objects. It also calls VerifySystemPointers to make sure that the system pointers have been setup correctly.
Reimplemented from AnimatSim::Robotics::RobotPartInterface.
Definition at line 471 of file RbFirmataDynamixelServo.cpp.
References AnimatSim::Robotics::RobotPartInterface::Initialize(), and RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_lpMotorJoint.
|
virtual |
Initializes the internal data on position and velocity from the actual motor.
Reimplemented from RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo.
Definition at line 254 of file RbFirmataDynamixelServo.cpp.
References RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::InitMotorData(), RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_bQueryMotorData, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iServoID, AnimatSim::AnimatBase::m_lpSim, and m_lStartServoUpdateTick.
Referenced by SetupIO().
|
inlinevirtual |
Returns true if this part interface is for controlling a motor.
Reimplemented from AnimatSim::Robotics::RobotPartInterface.
Definition at line 126 of file RbFirmataDynamixelServo.h.
|
protectedvirtual |
Moves the motor to the specified position at the given speed.
Reimplemented from RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo.
Definition at line 217 of file RbFirmataDynamixelServo.cpp.
References RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::ConvertFloatVelocity(), and RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iServoID.
|
virtual |
Set a variable based on a string data type name.
This is a generic method that can be used to set any variable in an AnimatBase object by specifying the name of the variable and a string representation of that data. The GUI uses this method to set data into variables in the simulation when the user changes them in the UI. The value string can be as simple as a float or int, or as complex as an xml packet. It is the developers responsibilty to know what type of data is needed and to process it accordingly.
strDataType | string name of the data type to set. |
strValue | The string value of the data. It is up to the developer to determine what this should be. For example, in most cases it is simply a float and you just have to convert it to a float and make the appropriate mutator method call. However, it can be any type of string, including an entire xml packet. It is the developers responsibility to know how to set and process the data as required. |
bThrowError | true to throw error if there is a problem. If false then it will not return an error, just return false. |
Reimplemented from AnimatSim::Robotics::RobotPartInterface.
Definition at line 297 of file RbFirmataDynamixelServo.cpp.
References AnimatSim::Robotics::RobotPartInterface::SetData(), and StdUtils::Std_CheckString().
|
virtual |
This method is called after all connections to whatever control board have been made. It is meant to be used to setup connection information specific to this part. For example, We connect to a Firmata microcontroller like an Arduino, and then do a setup that could take some time. We should not attempt to setup any of the pins until after the board itself has been setup. After that we need to loop through and setup all the parts. That is what this method is for.
Reimplemented from AnimatSim::Robotics::RobotPartInterface.
Definition at line 484 of file RbFirmataDynamixelServo.cpp.
References InitMotorData(), AnimatSim::Simulator::InSimulation(), RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_fltHiLimit, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_fltLowLimit, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iLastGoalPos, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iLastGoalVelocity, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iNextGoalPos, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iNextGoalVelocity, AnimatSim::AnimatBase::m_lpSim, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::SetMaxSimPos(), and RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::SetMinSimPos().
|
virtual |
This method is called just before the IO thread is closed down. It gives the IO objects a chance to do any required cleanup.
Reimplemented from AnimatSim::Robotics::RobotPartInterface.
Definition at line 511 of file RbFirmataDynamixelServo.cpp.
References ShutdownMotor().
|
virtual |
Shuts the motor down cleanly and ensures that it is not continuing to move after processing has stopped.
Reimplemented from RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo.
Definition at line 245 of file RbFirmataDynamixelServo.cpp.
References RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_bQueryMotorData, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iServoID, and RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::ShutdownMotor().
Referenced by ShutdownIO().
|
virtual |
This method is used to send/recieve the actual IO. This will often be in a seperate thread than the StepSimulation. StepSimulation gets/sets the values in the sim and gets it read for the thread that does the IO. Once that thread is ready to send/receive it uses that value to perform the operation.
Reimplemented from AnimatSim::Robotics::RobotPartInterface.
Definition at line 499 of file RbFirmataDynamixelServo.cpp.
References AnimatSim::AnimatBase::m_lpSim.
|
virtual |
For the Firmata dynamixel we do not need to try and set the current position. It is more efficient to use the stop command built into the ArbotixFirmata sketch.
Reimplemented from RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo.
Definition at line 452 of file RbFirmataDynamixelServo.cpp.
References AnimatSim::Simulator::InSimulation(), RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iLastGoalPos, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iLastGoalVelocity, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iNextGoalPos, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iNextGoalVelocity, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iPresentPos, RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::m_iServoID, AnimatSim::AnimatBase::m_lpSim, and RoboticsAnimatSim::Robotics::RobotIOControls::RbDynamixelServo::Stop().