Simox  2.3.49
VirtualRobot::Robot Class Referenceabstract
Inheritance diagram for VirtualRobot::Robot:
VirtualRobot::SceneObject VirtualRobot::LocalRobot

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Robot (const std::string &name, const std::string &type="")
 
virtual ~Robot ()
 
virtual void setRootNode (RobotNodePtr node)=0
 
virtual RobotNodePtr getRootNode () const =0
 
virtual void applyJointValues ()
 
virtual void setThreadsafe (bool)
 
template<typename T >
boost::shared_ptr< T > getVisualization (SceneObject::VisualizationType visuType=SceneObject::Full, bool sensors=true)
 
void showStructure (bool enable, const std::string &type="")
 
void showCoordinateSystems (bool enable, const std::string &type="")
 
void showPhysicsInformation (bool enableCoM, bool enableInertial, VisualizationNodePtr comModel=VisualizationNodePtr())
 
void setupVisualization (bool showVisualization, bool showAttachedVisualizations)
 
virtual std::string getName ()
 
virtual std::string getType ()
 
virtual void print (bool printChildren=false, bool printDecoration=true) const
 
void setUpdateVisualization (bool enable)
 
void setUpdateCollisionModel (bool enable)
 
boost::shared_ptr< Robotshared_from_this () const
 
virtual RobotConfigPtr getConfig ()
 
virtual bool setConfig (RobotConfigPtr c)
 
virtual void registerRobotNode (RobotNodePtr node)=0
 
virtual void deregisterRobotNode (RobotNodePtr node)=0
 
virtual bool hasRobotNode (RobotNodePtr node)=0
 
virtual bool hasRobotNode (const std::string &robotNodeName)=0
 
virtual RobotNodePtr getRobotNode (const std::string &robotNodeName)=0
 
virtual std::vector< RobotNodePtrgetRobotNodes ()
 
virtual void getRobotNodes (std::vector< RobotNodePtr > &storeNodes, bool clearVector=true)=0
 
virtual void registerRobotNodeSet (RobotNodeSetPtr nodeSet)=0
 
virtual void deregisterRobotNodeSet (RobotNodeSetPtr nodeSet)=0
 
virtual bool hasRobotNodeSet (RobotNodeSetPtr nodeSet)
 
virtual bool hasRobotNodeSet (const std::string &name)=0
 
virtual RobotNodeSetPtr getRobotNodeSet (const std::string &nodeSetName) const =0
 
virtual std::vector< RobotNodeSetPtrgetRobotNodeSets () const
 
virtual void getRobotNodeSets (std::vector< RobotNodeSetPtr > &storeNodeSet) const =0
 
virtual void registerEndEffector (EndEffectorPtr endEffector)=0
 
virtual bool hasEndEffector (EndEffectorPtr endEffector)
 
virtual bool hasEndEffector (const std::string &endEffectorName)=0
 
virtual EndEffectorPtr getEndEffector (const std::string &endEffectorName)=0
 
virtual std::vector< EndEffectorPtrgetEndEffectors ()
 
virtual void getEndEffectors (std::vector< EndEffectorPtr > &storeEEF)=0
 
virtual std::vector< CollisionModelPtrgetCollisionModels ()
 
virtual CollisionCheckerPtr getCollisionChecker ()
 
virtual void highlight (VisualizationPtr visualization, bool enable)
 
virtual int getNumFaces (bool collisionModel=false)
 
virtual void setGlobalPose (const Eigen::Matrix4f &globalPose, bool applyValues)=0
 
void setGlobalPose (const Eigen::Matrix4f &globalPose)
 
virtual void setGlobalPoseForRobotNode (const RobotNodePtr &node, const Eigen::Matrix4f &globalPoseNode)
 
virtual Eigen::Vector3f getCoMLocal ()
 
virtual Eigen::Vector3f getCoMGlobal ()
 
virtual float getMass ()
 
virtual RobotPtr extractSubPart (RobotNodePtr startJoint, const std::string &newRobotType, const std::string &newRobotName, bool cloneRNS=true, bool cloneEEFs=true, CollisionCheckerPtr collisionChecker=CollisionCheckerPtr(), float scaling=1.0f)
 
virtual RobotPtr clone (const std::string &name, CollisionCheckerPtr collisionChecker=CollisionCheckerPtr(), float scaling=1.0f)
 
virtual void setFilename (const std::string &filename)
 
virtual std::string getFilename ()
 
virtual ReadLockPtr getReadLock ()
 
virtual WriteLockPtr getWriteLock ()
 
virtual void setJointValue (RobotNodePtr rn, float jointValue)
 
virtual void setJointValue (const std::string &nodeName, float jointValue)
 
virtual void setJointValues (const std::map< std::string, float > &jointValues)
 
virtual void setJointValues (const std::map< RobotNodePtr, float > &jointValues)
 
virtual void setJointValues (RobotNodeSetPtr rns, const std::vector< float > &jointValues)
 
virtual void setJointValues (const std::vector< RobotNodePtr > rn, const std::vector< float > &jointValues)
 
virtual void setJointValues (RobotNodeSetPtr rns, const Eigen::VectorXf &jointValues)
 
virtual void setJointValues (RobotConfigPtr config)
 
virtual void setJointValues (RobotNodeSetPtr rns, RobotConfigPtr config)
 
virtual void setJointValues (TrajectoryPtr trajectory, float t)
 
virtual BoundingBox getBoundingBox (bool collisionModel=true)
 
virtual SensorPtr getSensor (const std::string &name)
 
virtual std::vector< SensorPtrgetSensors ()
 
virtual std::string toXML (const std::string &basePath=".", const std::string &modelPath="models", bool storeEEF=true, bool storeRNS=true, bool storeSensors=true)
 
float getScaling ()
 
void setScaling (float scaling)
 
- 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 Eigen::Matrix4f getGlobalPose () const
 
virtual void setGlobalPoseNoChecks (const Eigen::Matrix4f &pose)
 
virtual CollisionModelPtr getCollisionModel ()
 
void setVisualization (VisualizationNodePtr visualization)
 
void setCollisionModel (CollisionModelPtr colModel)
 
virtual VisualizationNodePtr getVisualization (SceneObject::VisualizationType visuType=SceneObject::Full)
 
virtual bool initialize (SceneObjectPtr parent=SceneObjectPtr(), const std::vector< SceneObjectPtr > &children=std::vector< SceneObjectPtr >())
 
bool getUpdateVisualizationStatus ()
 
bool getUpdateCollisionModelStatus ()
 
virtual void showCoordinateSystem (bool enable, float scaling=1.0f, std::string *text=NULL, const std::string &visualizationType="")
 
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)
 
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)
 
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 void updatePose (bool updateChildren=true)
 Compute the global pose of this object. More...
 
virtual bool saveModelFiles (const std::string &modelPath, bool replaceFilenames)
 

Protected Member Functions

 Robot ()
 
void createVisualizationFromCollisionModels ()
 
virtual void applyJointValuesNoLock ()
 It is assumed that the mutex is already set. More...
 
- Protected Member Functions inherited from VirtualRobot::SceneObject
virtual SceneObject_clone (const std::string &name, CollisionCheckerPtr colChecker=CollisionCheckerPtr(), float scaling=1.0f) const
 
virtual void detachedFromParent ()
 Parent detached this object. More...
 
virtual void attached (SceneObjectPtr parent)
 Parent attached this object. More...
 
virtual void updatePose (const Eigen::Matrix4f &parentPose, bool updateChildren=true)
 
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

float scaling
 
std::string filename
 
std::string type
 
bool updateVisualization
 
boost::recursive_mutex mutex
 
bool use_mutex
 
- 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 RobotIO
 

Additional Inherited Members

- Public Types inherited from VirtualRobot::SceneObject
enum  VisualizationType { Full, Collision, CollisionData }
 

Detailed Description

This is the main object defining the kinematic structure of a robot.

See also
RobotIO, RobotNode, RobotNodeSet, EndEffector

Constructor & Destructor Documentation

VirtualRobot::Robot::Robot ( const std::string &  name,
const std::string &  type = "" 
)

Constructor

Parameters
nameSpecifies the name of this instance.
typeSpecifies the type of the robot (e.g. multiple robots of the same type could exists with different names)
VirtualRobot::Robot::~Robot ( )
virtual
VirtualRobot::Robot::Robot ( )
protected

Member Function Documentation

void VirtualRobot::Robot::applyJointValues ( )
virtual

Update the transformations of all joints

void VirtualRobot::Robot::applyJointValuesNoLock ( )
protectedvirtual

It is assumed that the mutex is already set.

Can be called internally, when lock is already set.

Reimplemented in VirtualRobot::LocalRobot.

VirtualRobot::RobotPtr VirtualRobot::Robot::clone ( const std::string &  name,
CollisionCheckerPtr  collisionChecker = CollisionCheckerPtr(),
float  scaling = 1.0f 
)
virtual

Clones this robot.

Parameters
nameThe new name.
collisionCheckerIf set, the returned robot is registered with this col checker, otherwise the CollisionChecker of the original robot is used.
scalingScale Can be set to create a scaled version of this robot. Scaling is applied on kinematic, visual, and collision data.
void VirtualRobot::Robot::createVisualizationFromCollisionModels ( )
protected

Goes through all RobotNodes and if no visualization is present: the collision model is checked and in case it owns a visualization it is cloned and used as visualization.

virtual void VirtualRobot::Robot::deregisterRobotNode ( RobotNodePtr  node)
pure virtual

Implemented in VirtualRobot::LocalRobot.

virtual void VirtualRobot::Robot::deregisterRobotNodeSet ( RobotNodeSetPtr  nodeSet)
pure virtual

Implemented in VirtualRobot::LocalRobot.

VirtualRobot::RobotPtr VirtualRobot::Robot::extractSubPart ( RobotNodePtr  startJoint,
const std::string &  newRobotType,
const std::string &  newRobotName,
bool  cloneRNS = true,
bool  cloneEEFs = true,
CollisionCheckerPtr  collisionChecker = CollisionCheckerPtr(),
float  scaling = 1.0f 
)
virtual

Extract a sub kinematic from this robot and create a new robot instance.

Parameters
startJointThe kinematic starts with this RobotNode
newRobotTypeThe name of the newly created robot type
newRobotNameThe name of the newly created robot
cloneRNSClone all robot node sets that belong to the original robot and for which the remaining robot nodes of the subPart are sufficient.
cloneEEFsClone all end effectors that belong to the original robot and for which the remaining robot nodes of the subPart are sufficient.
collisionCheckerThe new robot can be registered to a different collision checker. If not set, the collision checker of the original robot is used.
scalingCan be set to create a scaled version of this robot. Scaling is applied on kinematic, visual, and collision data.
VirtualRobot::BoundingBox VirtualRobot::Robot::getBoundingBox ( bool  collisionModel = true)
virtual

The (current) bounding box in global coordinate system.

Parameters
collisionModelEither the collision or the visualization model is considered.
Returns
The bounding box.
VirtualRobot::CollisionCheckerPtr VirtualRobot::Robot::getCollisionChecker ( )
virtual

Reimplemented from VirtualRobot::SceneObject.

std::vector< CollisionModelPtr > VirtualRobot::Robot::getCollisionModels ( )
virtual
Eigen::Vector3f VirtualRobot::Robot::getCoMGlobal ( )
virtual

Return Center of Mass of this robot in global coordinates. All RobotNodes of this robot are considered according to their mass.

Reimplemented from VirtualRobot::SceneObject.

Eigen::Vector3f VirtualRobot::Robot::getCoMLocal ( )
virtual

Return center of mass of this robot in local coordinate frame. All RobotNodes of this robot are considered according to their mass.

Reimplemented from VirtualRobot::SceneObject.

VirtualRobot::RobotConfigPtr VirtualRobot::Robot::getConfig ( )
virtual

get the complete setup of all robot nodes

virtual EndEffectorPtr VirtualRobot::Robot::getEndEffector ( const std::string &  endEffectorName)
pure virtual

Implemented in VirtualRobot::LocalRobot.

std::vector< EndEffectorPtr > VirtualRobot::Robot::getEndEffectors ( )
virtual
virtual void VirtualRobot::Robot::getEndEffectors ( std::vector< EndEffectorPtr > &  storeEEF)
pure virtual

Implemented in VirtualRobot::LocalRobot.

std::string VirtualRobot::Robot::getFilename ( )
virtual

Retrieve the stored filename.

float VirtualRobot::Robot::getMass ( )
virtual

Return accumulated mass of this robot.

std::string VirtualRobot::Robot::getName ( )
virtual
int VirtualRobot::Robot::getNumFaces ( bool  collisionModel = false)
virtual

get number of faces (i.e. triangles) of this object collisionModel Indicates weather the faces of the collision model or the full model should be returned.

Reimplemented from VirtualRobot::SceneObject.

ReadLockPtr VirtualRobot::Robot::getReadLock ( )
virtual

This readlock can be used to protect data access. It locks the mutex until deletion. For internal use. API users will usually not need this functionality since all data access is protected automatically.

Exemplary usage: { ReadLockPtr lock = robot->getReadLock(); now the mutex is locked

access data ...

        } // end of scope -> lock gets deleted and mutex is released automatically
virtual RobotNodePtr VirtualRobot::Robot::getRobotNode ( const std::string &  robotNodeName)
pure virtual

Implemented in VirtualRobot::LocalRobot.

std::vector< RobotNodePtr > VirtualRobot::Robot::getRobotNodes ( )
virtual
virtual void VirtualRobot::Robot::getRobotNodes ( std::vector< RobotNodePtr > &  storeNodes,
bool  clearVector = true 
)
pure virtual

Implemented in VirtualRobot::LocalRobot.

virtual RobotNodeSetPtr VirtualRobot::Robot::getRobotNodeSet ( const std::string &  nodeSetName) const
pure virtual

Implemented in VirtualRobot::LocalRobot.

std::vector< RobotNodeSetPtr > VirtualRobot::Robot::getRobotNodeSets ( ) const
virtual
virtual void VirtualRobot::Robot::getRobotNodeSets ( std::vector< RobotNodeSetPtr > &  storeNodeSet) const
pure virtual

Implemented in VirtualRobot::LocalRobot.

virtual RobotNodePtr VirtualRobot::Robot::getRootNode ( ) const
pure virtual

Implemented in VirtualRobot::LocalRobot.

float VirtualRobot::Robot::getScaling ( )
SensorPtr VirtualRobot::Robot::getSensor ( const std::string &  name)
virtual

Returns the sensor with the given name.

std::vector< SensorPtr > VirtualRobot::Robot::getSensors ( )
virtual

Returns all sensors that are defined within this robot.

std::string VirtualRobot::Robot::getType ( )
virtual
template<typename T >
boost::shared_ptr< T > VirtualRobot::Robot::getVisualization ( SceneObject::VisualizationType  visuType = SceneObject::Full,
bool  sensors = true 
)

Retrieve a visualization in the given format.

Parameters
visuTypeThe visualization type (Full or Collision model)
sensorsAdd sensors models to the visualization. Example usage: boost::shared_ptr<VirtualRobot::CoinVisualization> visualization = robot->getVisualization<CoinVisualization>(); SoNode* visualisationNode = NULL; if (visualization) visualisationNode = visualization->getCoinVisualization();

This method collects all visualization nodes and creates a new Visualization subclass which is given by the template parameter T. T must be a subclass of VirtualRobot::Visualization. A compile time error is thrown if a different class type is used as template argument.

WriteLockPtr VirtualRobot::Robot::getWriteLock ( )
virtual

This writelock can be used to protect data access. It locks the mutex until deletion. For internal use. API users will usually not need this functionality since all data access is protected automatically.

Exemplary usage: { WriteLockPtr lock = robot->getWriteLock(); now the mutex is locked

access data ...

        } // end of scope -> lock gets deleted and mutex is released automatically
bool VirtualRobot::Robot::hasEndEffector ( EndEffectorPtr  endEffector)
virtual
Returns
true if instance of VirtualRobot::Robot contains a reference to endEffector and false otherwise
virtual bool VirtualRobot::Robot::hasEndEffector ( const std::string &  endEffectorName)
pure virtual

Implemented in VirtualRobot::LocalRobot.

virtual bool VirtualRobot::Robot::hasRobotNode ( RobotNodePtr  node)
pure virtual

Implemented in VirtualRobot::LocalRobot.

virtual bool VirtualRobot::Robot::hasRobotNode ( const std::string &  robotNodeName)
pure virtual

Implemented in VirtualRobot::LocalRobot.

bool VirtualRobot::Robot::hasRobotNodeSet ( RobotNodeSetPtr  nodeSet)
virtual
virtual bool VirtualRobot::Robot::hasRobotNodeSet ( const std::string &  name)
pure virtual

Implemented in VirtualRobot::LocalRobot.

void VirtualRobot::Robot::highlight ( VisualizationPtr  visualization,
bool  enable 
)
virtual

Convenient method for highlighting the visualization of this robot. It is automatically checked whether the collision model or the full model is part of the visualization.

Parameters
visualizationThe visualization for which the highlighting should be performed.
enableOn or off
void VirtualRobot::Robot::print ( bool  printChildren = false,
bool  printDecoration = true 
) const
virtual

Print status information.

Reimplemented from VirtualRobot::SceneObject.

virtual void VirtualRobot::Robot::registerEndEffector ( EndEffectorPtr  endEffector)
pure virtual

Implemented in VirtualRobot::LocalRobot.

virtual void VirtualRobot::Robot::registerRobotNode ( RobotNodePtr  node)
pure virtual

This method is automatically called in RobotNode's initialization routine.

Implemented in VirtualRobot::LocalRobot.

virtual void VirtualRobot::Robot::registerRobotNodeSet ( RobotNodeSetPtr  nodeSet)
pure virtual

This method is automatically called in RobotNodeSet's initialization routine.

Implemented in VirtualRobot::LocalRobot.

bool VirtualRobot::Robot::setConfig ( RobotConfigPtr  c)
virtual

Sets the configuration according to the RobotNodes, defined in c. All other nodes are not affected.

void VirtualRobot::Robot::setFilename ( const std::string &  filename)
virtual

Just storing the filename.

virtual void VirtualRobot::Robot::setGlobalPose ( const Eigen::Matrix4f &  globalPose,
bool  applyValues 
)
pure virtual

Set the global position of this robot

Implemented in VirtualRobot::LocalRobot.

void VirtualRobot::Robot::setGlobalPose ( const Eigen::Matrix4f &  pose)
virtual

Update the pose of this object. The visualization and collision models are updated accordingly.

Parameters
poseThe new pose of this object

Reimplemented from VirtualRobot::SceneObject.

Reimplemented in VirtualRobot::LocalRobot.

void VirtualRobot::Robot::setGlobalPoseForRobotNode ( const RobotNodePtr node,
const Eigen::Matrix4f &  globalPoseNode 
)
virtual

Set the global pose of this robot so that the RobotNode node is at position globalPoseNode

void VirtualRobot::Robot::setJointValue ( RobotNodePtr  rn,
float  jointValue 
)
virtual

Set a joint value [rad]. The internal matrices and visualizations are updated accordingly. If you intend to update multiple joints, use setJointValues for faster access.

void VirtualRobot::Robot::setJointValue ( const std::string &  nodeName,
float  jointValue 
)
virtual

Set a joint value [rad]. The internal matrices and visualizations are updated accordingly. If you intend to update multiple joints, use setJointValues for faster access.

void VirtualRobot::Robot::setJointValues ( const std::map< std::string, float > &  jointValues)
virtual

Set joint values [rad]. The complete robot is updated to apply the new joint values.

Parameters
jointValuesA map containing RobotNode names with according values.
void VirtualRobot::Robot::setJointValues ( const std::map< RobotNodePtr, float > &  jointValues)
virtual

Set joint values [rad]. The complete robot is updated to apply the new joint values.

Parameters
jointValuesA map containing RobotNodes with according values.
void VirtualRobot::Robot::setJointValues ( RobotNodeSetPtr  rns,
const std::vector< float > &  jointValues 
)
virtual

Set joint values [rad]. The subpart of the robot, defined by the start joint (kinematicRoot) of rns, is updated to apply the new joint values.

Parameters
rnsThe RobotNodeSet defines the joints
jointValuesA vector with joint values, size must be equal to rns.
void VirtualRobot::Robot::setJointValues ( const std::vector< RobotNodePtr rn,
const std::vector< float > &  jointValues 
)
virtual

Set joint values [rad]. The complete robot is updated to apply the new joint values.

Parameters
rnThe RobotNodes
jointValuesA vector with joint values, size must be equal to rn.
void VirtualRobot::Robot::setJointValues ( RobotNodeSetPtr  rns,
const Eigen::VectorXf &  jointValues 
)
virtual

Set joint values [rad]. The subpart of the robot, defined by the start joint (kinematicRoot) of rns, is updated to apply the new joint values.

Parameters
rnsThe RobotNodeSet defines the joints
jointValuesA vector with joint values, size must be equal to rns.
void VirtualRobot::Robot::setJointValues ( RobotConfigPtr  config)
virtual

Set joint values [rad]. The complete robot is updated to apply the new joint values.

Parameters
configThe RobotConfig defines the RobotNodes and joint values.
void VirtualRobot::Robot::setJointValues ( RobotNodeSetPtr  rns,
RobotConfigPtr  config 
)
virtual

Set joint values [rad]. Only those joints in config are affected which are present in rns. The subpart of the robot, defined by the start joint (kinematicRoot) of rns, is updated to apply the new joint values.

Parameters
rnsOnly joints in this rns are updated.
configThe RobotConfig defines the RobotNodes and joint values.
void VirtualRobot::Robot::setJointValues ( TrajectoryPtr  trajectory,
float  t 
)
virtual

Apply configuration of trajectory at time t

Parameters
trajectoryThe trajectory
tThe time (0<=t<=1)
virtual void VirtualRobot::Robot::setRootNode ( RobotNodePtr  node)
pure virtual

The root node is the first RobotNode of this robot.

Implemented in VirtualRobot::LocalRobot.

void VirtualRobot::Robot::setScaling ( float  scaling)
void VirtualRobot::Robot::setThreadsafe ( bool  flag)
virtual

Configures the robot to threadsafe or not. Per default the robot is threadsafe, i.e., updating the robot state and reading the Poses from the nodes is mutual exclusive. This feature can be turned off, however, in order to be make data access faster in single threaded applications.

void VirtualRobot::Robot::setUpdateCollisionModel ( bool  enable)
virtual

Reimplemented from VirtualRobot::SceneObject.

void VirtualRobot::Robot::setUpdateVisualization ( bool  enable)
virtual

Enables/Disables the visualization updates of collision model and visualization model.

Reimplemented from VirtualRobot::SceneObject.

void VirtualRobot::Robot::setupVisualization ( bool  showVisualization,
bool  showAttachedVisualizations 
)
virtual

Setup the full model visualization.

Parameters
showVisualizationIf false, the visualization is disabled.
showAttachedVisualizationsIf false, the visualization of any attached optional visualizations is disabled.

Reimplemented from VirtualRobot::SceneObject.

boost::shared_ptr< Robot > VirtualRobot::Robot::shared_from_this ( ) const
void VirtualRobot::Robot::showCoordinateSystems ( bool  enable,
const std::string &  type = "" 
)

Shows the coordinate systems of the robot nodes

void VirtualRobot::Robot::showPhysicsInformation ( bool  enableCoM,
bool  enableInertial,
VisualizationNodePtr  comModel = VisualizationNodePtr() 
)
virtual

Display some physics debugging information. enableCoM If true, the center of mass is shown (if given). If a comModel is given it is used for visualization, otherwise a standrad marker is shown. enableInertial If true, a visualization of the inertial matrix is shown (if given). comModel If set, this visualization is used to display the CoM location. If not set, a standard marker is used.

Reimplemented from VirtualRobot::SceneObject.

void VirtualRobot::Robot::showStructure ( bool  enable,
const std::string &  type = "" 
)

Shows the structure of the robot

std::string VirtualRobot::Robot::toXML ( const std::string &  basePath = ".",
const std::string &  modelPath = "models",
bool  storeEEF = true,
bool  storeRNS = true,
bool  storeSensors = true 
)
virtual

Creates an XML string that defines the complete robot. Filenames of all visualization models are set to modelPath/RobotNodeName_visu and/or modelPath/RobotNodeName_colmodel.

See also
RobotIO::saveXML.

Friends And Related Function Documentation

friend class RobotIO
friend

Field Documentation

std::string VirtualRobot::Robot::filename
protected
boost::recursive_mutex VirtualRobot::Robot::mutex
mutableprotected
float VirtualRobot::Robot::scaling
protected
std::string VirtualRobot::Robot::type
protected
bool VirtualRobot::Robot::updateVisualization
protected
bool VirtualRobot::Robot::use_mutex
protected