Simox  2.3.50
VirtualRobot::RobotNodePrismatic Class Reference
Inheritance diagram for VirtualRobot::RobotNodePrismatic:
VirtualRobot::RobotNode VirtualRobot::SceneObject

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW RobotNodePrismatic (RobotWeakPtr rob, const std::string &name, float jointLimitLo, float jointLimitHi, const Eigen::Matrix4f &preJointTransform, const Eigen::Vector3f &translationDirection, VisualizationNodePtr visualization=VisualizationNodePtr(), CollisionModelPtr collisionModel=CollisionModelPtr(), float jointValueOffset=0.0f, const SceneObject::Physics &p=SceneObject::Physics(), CollisionCheckerPtr colChecker=CollisionCheckerPtr(), RobotNodeType type=Generic)
 
 RobotNodePrismatic (RobotWeakPtr rob, const std::string &name, float jointLimitLo, float jointLimitHi, float a, float d, float alpha, float theta, VisualizationNodePtr visualization=VisualizationNodePtr(), CollisionModelPtr collisionModel=CollisionModelPtr(), float jointValueOffset=0.0f, const SceneObject::Physics &p=SceneObject::Physics(), CollisionCheckerPtr colChecker=CollisionCheckerPtr(), RobotNodeType type=Generic)
 
virtual ~RobotNodePrismatic ()
 
virtual bool initialize (SceneObjectPtr parent=SceneObjectPtr(), const std::vector< SceneObjectPtr > &children=std::vector< SceneObjectPtr >())
 
virtual void print (bool printChildren=false, bool printDecoration=true) const
 
virtual bool isTranslationalJoint () const
 
Eigen::Vector3f getJointTranslationDirection (const SceneObjectPtr coordSystem=SceneObjectPtr()) const
 
Eigen::Vector3f getJointTranslationDirectionJointCoordSystem () const
 
void setVisuScaleFactor (Eigen::Vector3f &scaleFactor)
 
- Public Member Functions inherited from VirtualRobot::RobotNode
 RobotNode (RobotWeakPtr rob, const std::string &name, float jointLimitLo, float jointLimitHi, VisualizationNodePtr visualization=VisualizationNodePtr(), CollisionModelPtr collisionModel=CollisionModelPtr(), float jointValueOffset=0.0f, const SceneObject::Physics &p=SceneObject::Physics(), CollisionCheckerPtr colChecker=CollisionCheckerPtr(), RobotNodeType type=Generic)
 
virtual ~RobotNode ()
 
RobotPtr getRobot () const
 
void setJointValue (float q)
 
void collectAllRobotNodes (std::vector< RobotNodePtr > &storeNodes)
 
virtual float getJointValue () const
 
void respectJointLimits (float &jointValue) const
 
bool checkJointLimits (float jointValue, bool verbose=false) const
 
virtual Eigen::Matrix4f getLocalTransformation ()
 
virtual void setGlobalPose (const Eigen::Matrix4f &pose)
 
virtual Eigen::Matrix4f getGlobalPose () const
 
virtual Eigen::Matrix4f getPoseInRootFrame () const
 
virtual Eigen::Vector3f getPositionInRootFrame () const
 
virtual void showCoordinateSystem (bool enable, float scaling=1.0f, std::string *text=NULL, const std::string &visualizationType="")
 
float getJointLimitLo ()
 
float getJointLimitHi ()
 
virtual void setJointLimits (float lo, float hi)
 
virtual bool isRotationalJoint () const
 
virtual void showStructure (bool enable, const std::string &visualizationType="")
 
virtual std::vector< RobotNodePtrgetAllParents (RobotNodeSetPtr rns=RobotNodeSetPtr())
 
virtual RobotNodePtr clone (RobotPtr newRobot, bool cloneChildren=true, RobotNodePtr initializeWithParent=RobotNodePtr(), CollisionCheckerPtr colChecker=CollisionCheckerPtr(), float scaling=1.0f)
 
float getJointValueOffset () const
 
float getJointLimitHigh () const
 
float getJointLimitLow () const
 
virtual void setMaxVelocity (float maxVel)
 
virtual void setMaxAcceleration (float maxAcc)
 
virtual void setMaxTorque (float maxTo)
 
float getMaxVelocity ()
 
float getMaxAcceleration ()
 
float getMaxTorque ()
 
RobotNodeType getType ()
 
SceneObjectPtr clone (const std::string &, CollisionCheckerPtr=CollisionCheckerPtr(), float=1.0f) const
 Forbid cloning method from SceneObject. We need to know the new robot for cloning. More...
 
const DHParametergetOptionalDHParameters ()
 
virtual void updatePose (bool updateChildren=true)
 
virtual void propagateJointValue (const std::string &jointName, float factor=1.0f)
 
virtual SensorPtr getSensor (const std::string &name) const
 
virtual bool hasSensor (const std::string &name) const
 
virtual std::vector< SensorPtrgetSensors () const
 
virtual bool registerSensor (SensorPtr sensor)
 
virtual std::string toXML (const std::string &basePath, const std::string &modelPathRelative="models", bool storeSensors=true)
 
void setLocalTransformation (Eigen::Matrix4f &newLocalTransformation)
 
virtual void setJointValueNoUpdate (float q)
 
- Public Member Functions inherited from VirtualRobot::SceneObject
 SceneObject (const std::string &name, VisualizationNodePtr visualization=VisualizationNodePtr(), CollisionModelPtr collisionModel=CollisionModelPtr(), const Physics &p=Physics(), CollisionCheckerPtr colChecker=CollisionCheckerPtr())
 
virtual ~SceneObject ()
 
std::string getName () const
 
void setName (const std::string &name)
 
virtual void setGlobalPoseNoChecks (const Eigen::Matrix4f &pose)
 
virtual CollisionModelPtr getCollisionModel ()
 
virtual CollisionCheckerPtr getCollisionChecker ()
 
void setVisualization (VisualizationNodePtr visualization)
 
void setCollisionModel (CollisionModelPtr colModel)
 
virtual VisualizationNodePtr getVisualization (SceneObject::VisualizationType visuType=SceneObject::Full)
 
virtual void setUpdateVisualization (bool enable)
 
bool getUpdateVisualizationStatus ()
 
virtual void setUpdateCollisionModel (bool enable)
 
bool getUpdateCollisionModelStatus ()
 
virtual void setupVisualization (bool showVisualization, bool showAttachedVisualizations)
 
virtual void showPhysicsInformation (bool enableCoM, bool enableInertial, VisualizationNodePtr comModel=VisualizationNodePtr())
 
virtual bool showCoordinateSystemState ()
 
virtual void showBoundingBox (bool enable, bool wireframe=false)
 
virtual bool ensureVisualization (const std::string &visualizationType="")
 
Eigen::Matrix4f toLocalCoordinateSystem (const Eigen::Matrix4f &poseGlobal) const
 
Eigen::Vector3f toLocalCoordinateSystemVec (const Eigen::Vector3f &positionGlobal) const
 
Eigen::Matrix4f toGlobalCoordinateSystem (const Eigen::Matrix4f &poseLocal) const
 
Eigen::Vector3f toGlobalCoordinateSystemVec (const Eigen::Vector3f &positionLocal) const
 
Eigen::Matrix4f getTransformationTo (const SceneObjectPtr otherObject)
 
Eigen::Matrix4f getTransformationFrom (const SceneObjectPtr otherObject)
 
Eigen::Matrix4f transformTo (const SceneObjectPtr otherObject, const Eigen::Matrix4f &poseInOtherCoordSystem)
 
Eigen::Vector3f transformTo (const SceneObjectPtr otherObject, const Eigen::Vector3f &positionInOtherCoordSystem)
 
virtual int getNumFaces (bool collisionModel=false)
 
virtual Eigen::Vector3f getCoMLocal ()
 
virtual Eigen::Vector3f getCoMGlobal ()
 
float getMass () const
 
void setMass (float m)
 
Physics::SimulationType getSimulationType () const
 
void setSimulationType (Physics::SimulationType s)
 
Eigen::Matrix3f getInertiaMatrix ()
 
void setInertiaMatrix (const Eigen::Matrix3f &im)
 
float getFriction ()
 
void setFriction (float friction)
 
SceneObject::Physics getPhysics ()
 
std::vector< std::string > getIgnoredCollisionModels ()
 
template<typename T >
boost::shared_ptr< T > getVisualization (SceneObject::VisualizationType visuType=SceneObject::Full)
 
void highlight (VisualizationPtr visualization, bool enable)
 
SceneObjectPtr clone (const std::string &name, CollisionCheckerPtr colChecker=CollisionCheckerPtr(), float scaling=1.0f) const
 
virtual bool attachChild (SceneObjectPtr child)
 
virtual void detachChild (SceneObjectPtr child)
 
virtual bool hasChild (SceneObjectPtr child, bool recursive=false) const
 
virtual bool hasChild (const std::string &childName, bool recursive=false) const
 
virtual bool hasParent ()
 
virtual SceneObjectPtr getParent () const
 
virtual std::vector< SceneObjectPtrgetChildren () const
 
virtual bool saveModelFiles (const std::string &modelPath, bool replaceFilenames)
 

Protected Member Functions

virtual void updateVisualizationPose (const Eigen::Matrix4f &globalPose, bool updateChildren=false)
 
virtual void checkValidRobotNodeType ()
 Checks if nodeType constraints are fulfilled. Otherwise an exception is thrown. Called on initialization. More...
 
 RobotNodePrismatic ()
 
virtual void updateTransformationMatrices (const Eigen::Matrix4f &parentPose)
 
virtual RobotNodePtr _clone (const RobotPtr newRobot, const VisualizationNodePtr visualizationModel, const CollisionModelPtr collisionModel, CollisionCheckerPtr colChecker, float scaling)
 
virtual std::string _toXML (const std::string &modelPath)
 
- Protected Member Functions inherited from VirtualRobot::RobotNode
virtual void updateTransformationMatrices ()
 
virtual void updatePose (const Eigen::Matrix4f &parentPose, bool updateChildren=true)
 
virtual void updateVisualizationPose (const Eigen::Matrix4f &globalPose, float jointValue, bool updateChildren=false)
 
 RobotNode ()
 
virtual SceneObject_clone (const std::string &, CollisionCheckerPtr=CollisionCheckerPtr(), float=1.0f) const
 
void setJointValueNotInitialized (float q)
 
- Protected Member Functions inherited from VirtualRobot::SceneObject
virtual void detachedFromParent ()
 Parent detached this object. More...
 
virtual void attached (SceneObjectPtr parent)
 Parent attached this object. More...
 
std::string getFilenameReplacementVisuModel (const std::string standardExtension=".wrl")
 
std::string getFilenameReplacementColModel (const std::string standardExtension=".wrl")
 
 SceneObject ()
 
std::string getSceneObjectXMLString (const std::string &basePath, int tabs)
 basic data, used by Obstacle and ManipulationObject More...
 
virtual bool initializePhysics ()
 

Protected Attributes

Eigen::Vector3f jointTranslationDirection
 
bool visuScaling
 
Eigen::Vector3f visuScaleFactor
 
Eigen::Vector3f unscaledLocalCoM
 
- Protected Attributes inherited from VirtualRobot::RobotNode
float jointValueOffset
 
float jointLimitLo
 
float jointLimitHi
 
DHParameter optionalDHParameter
 
float maxVelocity
 
float maxAcceleration
 given in m/s More...
 
float maxTorque
 given in m/s^2 More...
 
Eigen::Matrix4f localTransformation
 given in Nm More...
 
std::map< std::string, float > propagatedJointValues
 
RobotWeakPtr robot
 
RobotNodeType nodeType
 
std::vector< SensorPtrsensors
 
float jointValue
 
- Protected Attributes inherited from VirtualRobot::SceneObject
std::string name
 
bool initialized
 
Eigen::Matrix4f globalPose
 
std::vector< SceneObjectPtrchildren
 
SceneObjectWeakPtr parent
 
CollisionModelPtr collisionModel
 
VisualizationNodePtr visualizationModel
 
bool updateVisualization
 
bool updateCollisionModel
 
Physics physics
 
CollisionCheckerPtr collisionChecker
 

Friends

class RobotFactory
 

Additional Inherited Members

- Public Types inherited from VirtualRobot::RobotNode
enum  RobotNodeType { Generic, Joint, Body, Transform }
 Experimental: Additional information about the node. More...
 
- Public Types inherited from VirtualRobot::SceneObject
enum  VisualizationType { Full, Collision, CollisionData }
 

Constructor & Destructor Documentation

VirtualRobot::RobotNodePrismatic::RobotNodePrismatic ( RobotWeakPtr  rob,
const std::string &  name,
float  jointLimitLo,
float  jointLimitHi,
const Eigen::Matrix4f &  preJointTransform,
const Eigen::Vector3f &  translationDirection,
VisualizationNodePtr  visualization = VisualizationNodePtr(),
CollisionModelPtr  collisionModel = CollisionModelPtr(),
float  jointValueOffset = 0.0f,
const SceneObject::Physics p = SceneObject::Physics(),
CollisionCheckerPtr  colChecker = CollisionCheckerPtr(),
RobotNodeType  type = Generic 
)
Parameters
robThe robot
nameThe name
jointLimitLolower joint limit
jointLimitHiupper joint limit
preJointTransformThis transformation is applied before the translation of the joint is done
translationDirectionThis is the direction of the translation (local)
visualizationA visualization model
collisionModelA collision model
jointValueOffsetAn offset that is internally added to the joint value
pphysics information
colCheckerA collision checker instance (if not set, the global col checker is used)
VirtualRobot::RobotNodePrismatic::RobotNodePrismatic ( RobotWeakPtr  rob,
const std::string &  name,
float  jointLimitLo,
float  jointLimitHi,
float  a,
float  d,
float  alpha,
float  theta,
VisualizationNodePtr  visualization = VisualizationNodePtr(),
CollisionModelPtr  collisionModel = CollisionModelPtr(),
float  jointValueOffset = 0.0f,
const SceneObject::Physics p = SceneObject::Physics(),
CollisionCheckerPtr  colChecker = CollisionCheckerPtr(),
RobotNodeType  type = Generic 
)
Parameters
robThe robot
nameThe name
jointLimitLolower joint limit
jointLimitHiupper joint limit
aUse DH parameters for setting up this RobotNode
dUse DH parameters for setting up this RobotNode
alphaUse DH parameters for setting up this RobotNode
thetaUse DH parameters for setting up this RobotNode
visualizationA visualization model
collisionModelA collision model
jointValueOffsetAn offset that is internally added to the joint value
pphysics information
colCheckerA collision checker instance (if not set, the global col checker is used)
VirtualRobot::RobotNodePrismatic::~RobotNodePrismatic ( )
virtual
VirtualRobot::RobotNodePrismatic::RobotNodePrismatic ( )
inlineprotected

Member Function Documentation

RobotNodePtr VirtualRobot::RobotNodePrismatic::_clone ( const RobotPtr  newRobot,
const VisualizationNodePtr  visualizationModel,
const CollisionModelPtr  collisionModel,
CollisionCheckerPtr  colChecker,
float  scaling 
)
protectedvirtual

Derived classes must implement their clone method here. Passed models are already scaled. Scaling factor should be only used for kinematic computations.

Implements VirtualRobot::RobotNode.

std::string VirtualRobot::RobotNodePrismatic::_toXML ( const std::string &  modelPath)
protectedvirtual

Derived classes add custom XML tags here

Implements VirtualRobot::RobotNode.

void VirtualRobot::RobotNodePrismatic::checkValidRobotNodeType ( )
protectedvirtual

Checks if nodeType constraints are fulfilled. Otherwise an exception is thrown. Called on initialization.

Reimplemented from VirtualRobot::RobotNode.

Eigen::Vector3f VirtualRobot::RobotNodePrismatic::getJointTranslationDirection ( const SceneObjectPtr  coordSystem = SceneObjectPtr()) const

In global coord system.

Parameters
coordSystemWhen not set the direction is transformed to global coord system. Otherwise any scene object can be used as coord system.
Eigen::Vector3f VirtualRobot::RobotNodePrismatic::getJointTranslationDirectionJointCoordSystem ( ) const

This is the original joint axis, without any transformations applied.

bool VirtualRobot::RobotNodePrismatic::initialize ( SceneObjectPtr  parent = SceneObjectPtr(),
const std::vector< SceneObjectPtr > &  children = std::vector<SceneObjectPtr>() 
)
virtual

Initialize robot node. Here pointers to robot and children are created from names. Be sure all children are created and registered to robot before calling initialize. Usually RobotFactory manages the initialization.

Reimplemented from VirtualRobot::RobotNode.

bool VirtualRobot::RobotNodePrismatic::isTranslationalJoint ( ) const
virtual

Reimplemented from VirtualRobot::RobotNode.

void VirtualRobot::RobotNodePrismatic::print ( bool  printChildren = false,
bool  printDecoration = true 
) const
virtual

Print status information.

Reimplemented from VirtualRobot::RobotNode.

void VirtualRobot::RobotNodePrismatic::setVisuScaleFactor ( Eigen::Vector3f &  scaleFactor)

Enables scaling of visualization and collision model according to joint value. The jointOffset is used to determine the unscaled value. Be careful, the scaling triggers a computation of the collision model, which may be time consuming.

Parameters
scaleFactorIf (0,0,0), the scaling is disabled, otherwise the value indicates the scale factors for each dimension.
void VirtualRobot::RobotNodePrismatic::updateTransformationMatrices ( const Eigen::Matrix4f &  parentPose)
protectedvirtual

Reimplemented from VirtualRobot::RobotNode.

void VirtualRobot::RobotNodePrismatic::updateVisualizationPose ( const Eigen::Matrix4f &  globalPose,
bool  updateChildren = false 
)
protectedvirtual

Can be called by a RobotNodeActuator in order to set the pose of this node. This is useful, if the node is actuated externally, i.e. via a physics engine.

Parameters
globalPoseThe new global pose. The joint value is not determined from this pose. The RobotNodeActuator is responsible for setting the corresponding joint value
updateChildrenUsually it is assumed that all RobotNodes are updated this way (updateChildren=false). If not, the children poses can be updated according to this node (updateCHildren=true).

Reimplemented from VirtualRobot::RobotNode.

Friends And Related Function Documentation

friend class RobotFactory
friend

Field Documentation

Eigen::Vector3f VirtualRobot::RobotNodePrismatic::jointTranslationDirection
protected
Eigen::Vector3f VirtualRobot::RobotNodePrismatic::unscaledLocalCoM
protected
Eigen::Vector3f VirtualRobot::RobotNodePrismatic::visuScaleFactor
protected
bool VirtualRobot::RobotNodePrismatic::visuScaling
protected