Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
PowerCubeSim Class Reference

#include <PowerCubeSim.h>

List of all members.

Public Types

enum  PC_CTRL_STATE { PC_CTRL_OK = 0, PC_CTRL_NOT_REFERENCED = -1, PC_CTRL_ERR = -2, PC_CTRL_POW_VOLT_ERR = -3 }
 Looks for connected Modules and returns their Ids in a vector. More...

Public Member Functions

int Close ()
bool getConfig (std::vector< double > &result)
 Returns the current Joint Angles.
std::vector< double > getCurrentAngularMaxAccel ()
std::vector< double > getCurrentAngularMaxVel ()
std::string getErrorMessage () const
bool getJointVelocities (std::vector< double > &result)
 Returns the current Angular velocities (Rad/s)
vector< int > getModuleMap () const
bool getStatusMoving (int cubeNo) const
bool Init (PowerCubeCtrlParams *params)
bool isInitialized () const
void millisleep (unsigned int milliseconds) const
bool MoveJointSpaceSync (const std::vector< double > &Angle)
 same as MoveJointSpace, but final angles should by reached simultaniously! Returns the time that the movement will take
bool MoveVel (const std::vector< double > &vel)
 Moves all cubes by the given velocities.
 PowerCubeSim ()
void setCurrentAngles (std::vector< double > Angles)
void setCurrentJointVelocities (std::vector< double > Angles)
bool setMaxAcceleration (double radPerSecSquared)
 Sets the maximum angular acceleration (rad/s^2) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than one...
bool setMaxAcceleration (const std::vector< double > &radPerSecSquared)
bool setMaxVelocity (double radpersec)
 Sets the maximum angular velocity (rad/s) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than one...
bool setMaxVelocity (const std::vector< double > &radpersec)
void setStatusMoving (int cubeNo, bool moving)
bool statusAcc ()
 Returs true if any of the Joints are accelerating.
bool statusDec ()
 Returns true if any of the Joints are decelerating.
bool statusMoving ()
 Returns true if any of the Joints are still moving Should also return true if Joints are accelerating or decelerating.
bool statusMoving (int cubeNo)
bool Stop ()
 Stops the Manipulator immediately.
 ~PowerCubeSim ()

Public Attributes

double maxVel

Protected Member Functions

int startSimulatedMovement (std::vector< double > target)
double timeRampMove (double dtheta, double vnow, double v, double a)
 Tells the Modules not to start moving until PCubel_startMotionAll is called.

Protected Attributes

Jointd m_AngleOffsets
pthread_mutex_t m_Angles_Mutex
pthread_mutex_t m_AngularVel_Mutex
std::vector< double > m_CurrentAngles
std::vector< double > m_CurrentAngularMaxAccel
std::vector< double > m_CurrentAngularMaxVel
std::vector< double > m_CurrentAngularVel
int m_Dev
int m_DOF
std::string m_ErrorMessage
vector< int > m_IdModules
int m_Initialized
std::vector< double > m_maxAcc
std::vector< double > m_maxVel
pthread_mutex_t m_Movement_Mutex
std::vector< bool > m_MovementInProgress
int m_NumOfModules
SimThreadArgs ** m_SimThreadArgs
pthread_t * m_SimThreadID
float maxAcc

Detailed Description

Definition at line 105 of file PowerCubeSim.h.


Member Enumeration Documentation

Looks for connected Modules and returns their Ids in a vector.

Waits until all Modules are homed, writes status comments to out.

Enumerator:
PC_CTRL_OK 
PC_CTRL_NOT_REFERENCED 
PC_CTRL_ERR 
PC_CTRL_POW_VOLT_ERR 

Definition at line 180 of file PowerCubeSim.h.


Constructor & Destructor Documentation

Definition at line 86 of file PowerCubeSim.cpp.

The Deconstructor

Definition at line 173 of file PowerCubeSim.cpp.


Member Function Documentation

int PowerCubeSim::Close ( void  ) [inline]

Definition at line 119 of file PowerCubeSim.h.

bool PowerCubeSim::getConfig ( std::vector< double > &  result)

Returns the current Joint Angles.

Definition at line 185 of file PowerCubeSim.cpp.

Definition at line 195 of file PowerCubeSim.h.

Definition at line 194 of file PowerCubeSim.h.

std::string PowerCubeSim::getErrorMessage ( ) const [inline]

Definition at line 117 of file PowerCubeSim.h.

bool PowerCubeSim::getJointVelocities ( std::vector< double > &  result)

Returns the current Angular velocities (Rad/s)

Definition at line 208 of file PowerCubeSim.cpp.

vector<int> PowerCubeSim::getModuleMap ( ) const [inline]

Definition at line 193 of file PowerCubeSim.h.

bool PowerCubeSim::getStatusMoving ( int  cubeNo) const [inline]

Definition at line 191 of file PowerCubeSim.h.

The Init function opens the bus and initializes it. Furthermore the Id`s of the Cubes are taken and mapped. These function has to be used before the cubes can be positioned after the power up.

Parameters:
m_DOFgives the number of Degrees of freedom of the manipulator which is connected (the gripper is not counted as DOF)

Definition at line 103 of file PowerCubeSim.cpp.

bool PowerCubeSim::isInitialized ( ) const [inline]

Definition at line 115 of file PowerCubeSim.h.

void PowerCubeSim::millisleep ( unsigned int  milliseconds) const

Definition at line 749 of file PowerCubeSim.cpp.

bool PowerCubeSim::MoveJointSpaceSync ( const std::vector< double > &  Angle)

same as MoveJointSpace, but final angles should by reached simultaniously! Returns the time that the movement will take

same as MoveJointSpace, but final angles should by reached simultaniously!

Definition at line 263 of file PowerCubeSim.cpp.

bool PowerCubeSim::MoveVel ( const std::vector< double > &  vel)

Moves all cubes by the given velocities.

Starts moving all cubes with the given velocities.

Definition at line 409 of file PowerCubeSim.cpp.

void PowerCubeSim::setCurrentAngles ( std::vector< double >  Angles)

Definition at line 226 of file PowerCubeSim.cpp.

Definition at line 243 of file PowerCubeSim.cpp.

bool PowerCubeSim::setMaxAcceleration ( double  radPerSecSquared)

Sets the maximum angular acceleration (rad/s^2) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than one...

Definition at line 458 of file PowerCubeSim.cpp.

bool PowerCubeSim::setMaxAcceleration ( const std::vector< double > &  radPerSecSquared)

Definition at line 469 of file PowerCubeSim.cpp.

bool PowerCubeSim::setMaxVelocity ( double  radpersec)

Sets the maximum angular velocity (rad/s) for the Joints, use with care! A Value of 0.5 is already pretty fast, you probably don't want anything more than one...

Definition at line 437 of file PowerCubeSim.cpp.

bool PowerCubeSim::setMaxVelocity ( const std::vector< double > &  radpersec)

Definition at line 446 of file PowerCubeSim.cpp.

void PowerCubeSim::setStatusMoving ( int  cubeNo,
bool  moving 
)

Definition at line 530 of file PowerCubeSim.cpp.

int PowerCubeSim::startSimulatedMovement ( std::vector< double >  target) [protected]

Definition at line 728 of file PowerCubeSim.cpp.

Returs true if any of the Joints are accelerating.

Definition at line 562 of file PowerCubeSim.cpp.

Returns true if any of the Joints are decelerating.

Definition at line 545 of file PowerCubeSim.cpp.

Returns true if any of the Joints are still moving Should also return true if Joints are accelerating or decelerating.

Returns true if some cubes are still moving.

Definition at line 484 of file PowerCubeSim.cpp.

bool PowerCubeSim::statusMoving ( int  cubeNo)

Definition at line 509 of file PowerCubeSim.cpp.

bool PowerCubeSim::Stop ( void  )

Stops the Manipulator immediately.

Definition at line 428 of file PowerCubeSim.cpp.

double PowerCubeSim::timeRampMove ( double  dtheta,
double  vnow,
double  v,
double  a 
) [protected]

Tells the Modules not to start moving until PCubel_startMotionAll is called.

Returns the time for a ramp-move about dtheta with v, a would take, assuming the module is currently moving at vnowClose.

Execute move commands immediately from now on: Returns the time for a ramp-move about dtheta with v, a would take, assuming the module is currently moving at vnowClose

Definition at line 365 of file PowerCubeSim.cpp.


Member Data Documentation

Definition at line 225 of file PowerCubeSim.h.

pthread_mutex_t PowerCubeSim::m_Angles_Mutex [protected]

Definition at line 242 of file PowerCubeSim.h.

pthread_mutex_t PowerCubeSim::m_AngularVel_Mutex [protected]

Definition at line 243 of file PowerCubeSim.h.

Definition at line 229 of file PowerCubeSim.h.

Definition at line 232 of file PowerCubeSim.h.

Definition at line 231 of file PowerCubeSim.h.

Definition at line 230 of file PowerCubeSim.h.

int PowerCubeSim::m_Dev [protected]

Definition at line 219 of file PowerCubeSim.h.

int PowerCubeSim::m_DOF [protected]

Definition at line 216 of file PowerCubeSim.h.

std::string PowerCubeSim::m_ErrorMessage [protected]

Definition at line 238 of file PowerCubeSim.h.

Definition at line 220 of file PowerCubeSim.h.

int PowerCubeSim::m_Initialized [protected]

Definition at line 217 of file PowerCubeSim.h.

std::vector<double> PowerCubeSim::m_maxAcc [protected]

Definition at line 223 of file PowerCubeSim.h.

std::vector<double> PowerCubeSim::m_maxVel [protected]

Definition at line 222 of file PowerCubeSim.h.

pthread_mutex_t PowerCubeSim::m_Movement_Mutex [protected]

Definition at line 244 of file PowerCubeSim.h.

Definition at line 227 of file PowerCubeSim.h.

Definition at line 218 of file PowerCubeSim.h.

Definition at line 246 of file PowerCubeSim.h.

pthread_t* PowerCubeSim::m_SimThreadID [protected]

Definition at line 245 of file PowerCubeSim.h.

float PowerCubeSim::maxAcc [protected]

Definition at line 240 of file PowerCubeSim.h.

Definition at line 188 of file PowerCubeSim.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Tue Mar 5 2013 14:44:47