Simox  2.3.74.0
VirtualRobot::SceneObject Class Reference
Inheritance diagram for VirtualRobot::SceneObject:
VirtualRobot::GraspableSensorizedObject VirtualRobot::Robot VirtualRobot::Sensor VirtualRobot::Obstacle VirtualRobot::RobotNode VirtualRobot::LocalRobot VirtualRobot::CameraSensor VirtualRobot::ContactSensor VirtualRobot::ForceTorqueSensor VirtualRobot::PositionSensor VirtualRobot::ManipulationObject VirtualRobot::RobotNodeFixed VirtualRobot::RobotNodeHemisphere VirtualRobot::RobotNodePrismatic VirtualRobot::RobotNodeRevolute

Data Structures

struct  Physics
 

Public Types

enum  VisualizationType { Full, Collision, CollisionData }
 

Public Member Functions

 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 Eigen::Vector3f getGlobalPosition () const
 
virtual Eigen::Matrix3f getGlobalOrientation () const
 
virtual Eigen::Matrix4f getGlobalPose (const Eigen::Matrix4f &localPose) const
 
virtual Eigen::Vector3f getGlobalPosition (const Eigen::Vector3f &localPosition) const
 
virtual Eigen::Vector3f getGlobalDirection (const Eigen::Vector3f &localDircetion) const
 
virtual Eigen::Matrix3f getGlobalOrientation (const Eigen::Matrix3f &localOrientation) const
 
virtual void setGlobalPoseNoChecks (const Eigen::Matrix4f &pose)
 
virtual void setGlobalPose (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 bool initialize (SceneObjectPtr parent=SceneObjectPtr(), const std::vector< SceneObjectPtr > &children=std::vector< SceneObjectPtr >())
 
virtual void setUpdateVisualization (bool enable)
 
bool getUpdateVisualizationStatus ()
 
virtual void setUpdateCollisionModel (bool enable)
 
bool getUpdateCollisionModelStatus ()
 
virtual void setupVisualization (bool showVisualization, bool showAttachedVisualizations)
 
virtual void showCoordinateSystem (bool enable, float scaling=1.0f, std::string *text=NULL, const std::string &visualizationType="")
 
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) const
 
Eigen::Matrix4f getTransformationFrom (const SceneObjectPtr otherObject) const
 
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 ()
 
void setCoMLocal (const Eigen::Vector3f &comLocal)
 Set a new position for the CoM of this bode. More...
 
virtual Eigen::Vector3f getCoMGlobal ()
 
float getMass () const
 
void setMass (float m)
 
Physics::SimulationType getSimulationType () const
 
void setSimulationType (Physics::SimulationType s)
 
Eigen::Matrix3f getInertiaMatrix ()
 
Eigen::Matrix3f getInertiaMatrix (const Eigen::Vector3f &shift)
 If the Inertia Matrix is given at the CoM, this function returns the Inertia Matrix at the parallel shifted coordinate system. The shift is done using the parallel axis theorem (https://en.wikipedia.org/wiki/Parallel_axis_theorem) More...
 
Eigen::Matrix3f getInertiaMatrix (const Eigen::Vector3f &shift, const Eigen::Matrix3f &rotation)
 
Eigen::Matrix3f getInertiaMatrix (const Eigen::Matrix4f &transform)
 
void setInertiaMatrix (const Eigen::Matrix3f &im)
 
float getFriction ()
 
void setFriction (float friction)
 
SceneObject::Physics getPhysics ()
 
std::vector< std::string > getIgnoredCollisionModels ()
 
virtual void print (bool printChildren=false, bool printDecoration=true) const
 
template<typename T >
std::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
 
SceneObjectPtr clone (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 () const
 
virtual SceneObjectPtr getParent () const
 
virtual std::vector< SceneObjectPtrgetChildren () const
 
virtual void updatePose (bool updateChildren=true)
 Compute the global pose of this object. More...
 
virtual void copyPoseFrom (const SceneObjectPtr &other)
 
virtual bool saveModelFiles (const std::string &modelPath, bool replaceFilenames)
 
void setScaling (float scaling)
 
float getScaling ()
 
bool reloadVisualizationFromXML (bool useVisAsColModelIfMissing=true)
 
const std::string & getVisualizationModelXML () const
 

Static Public Member Functions

static Eigen::Matrix3f shiftInertia (const Eigen::Matrix3f inertiaMatrix, const Eigen::Vector3f &shift, float mass)
 The shift is done using the parallel axis theorem (https://en.wikipedia.org/wiki/Parallel_axis_theorem) More...
 

Protected Member Functions

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, const std::string &modelPathRelative="")
 basic data, used by Obstacle and ManipulationObject More...
 
virtual bool initializePhysics ()
 

Protected Attributes

std::string name
 
bool initialized
 
Eigen::Matrix4f globalPose
 
std::vector< SceneObjectPtrchildren
 
SceneObjectWeakPtr parent
 
CollisionModelPtr collisionModel
 
std::string collisionModelXML
 
VisualizationNodePtr visualizationModel
 
std::string visualizationModelXML
 
std::filesystem::path basePath
 
bool updateVisualization
 
bool updateCollisionModel
 
Physics physics
 
CollisionCheckerPtr collisionChecker
 
float scaling = 1.0f
 

Friends

class RobotFactory
 

Member Enumeration Documentation

◆ VisualizationType

Enumerator
Full 

the full model

Collision 

the collision model

CollisionData 

a visualization of the collision model data that is internally used (this mode is only for debug purposes, the model is static, i.e. updates/movements/rotations are not visualized!)

Constructor & Destructor Documentation

◆ SceneObject() [1/2]

VirtualRobot::SceneObject::SceneObject ( const std::string &  name,
VisualizationNodePtr  visualization = VisualizationNodePtr(),
CollisionModelPtr  collisionModel = CollisionModelPtr(),
const Physics p = Physics(),
CollisionCheckerPtr  colChecker = CollisionCheckerPtr() 
)

◆ ~SceneObject()

VirtualRobot::SceneObject::~SceneObject ( )
virtual

◆ SceneObject() [2/2]

VirtualRobot::SceneObject::SceneObject ( )
inlineprotected

Member Function Documentation

◆ _clone()

SceneObject * VirtualRobot::SceneObject::_clone ( const std::string &  name,
CollisionCheckerPtr  colChecker = CollisionCheckerPtr(),
float  scaling = 1.0f 
) const
protectedvirtual

◆ attachChild()

bool VirtualRobot::SceneObject::attachChild ( SceneObjectPtr  child)
virtual

Attach a connected object. The connected object is linked to this SceneObject and moves accordingly. Any call to the child's setGlobalPose is forbidden and will fail.

Parameters
childThe child to attach

◆ attached()

void VirtualRobot::SceneObject::attached ( SceneObjectPtr  parent)
protectedvirtual

Parent attached this object.

◆ clone() [1/2]

SceneObjectPtr VirtualRobot::SceneObject::clone ( const std::string &  name,
CollisionCheckerPtr  colChecker = CollisionCheckerPtr(),
float  scaling = 1.0f 
) const

Clones this object. If no col checker is given, the one of the original object is used.

◆ clone() [2/2]

SceneObjectPtr VirtualRobot::SceneObject::clone ( CollisionCheckerPtr  colChecker = CollisionCheckerPtr(),
float  scaling = 1.0f 
) const

◆ copyPoseFrom()

void VirtualRobot::SceneObject::copyPoseFrom ( const SceneObjectPtr other)
virtual

Reimplemented in VirtualRobot::RobotNode.

◆ detachChild()

void VirtualRobot::SceneObject::detachChild ( SceneObjectPtr  child)
virtual

Removes the child from children list.

◆ detachedFromParent()

void VirtualRobot::SceneObject::detachedFromParent ( )
protectedvirtual

Parent detached this object.

◆ ensureVisualization()

bool VirtualRobot::SceneObject::ensureVisualization ( const std::string &  visualizationType = "")
virtual

Builds a dummy visualization if necessary.

Parameters
visualizationTypeIf given the visualization is forced to be this type. If not set, the first registered visualization from VisualizationFactory is used.

◆ getChildren()

std::vector< SceneObjectPtr > VirtualRobot::SceneObject::getChildren ( ) const
virtual

◆ getCollisionChecker()

VirtualRobot::CollisionCheckerPtr VirtualRobot::SceneObject::getCollisionChecker ( )
virtual

Reimplemented in VirtualRobot::Robot.

◆ getCollisionModel()

VirtualRobot::CollisionModelPtr VirtualRobot::SceneObject::getCollisionModel ( )
virtual

◆ getCoMGlobal()

Eigen::Vector3f VirtualRobot::SceneObject::getCoMGlobal ( )
virtual

Return Center of Mass in global coordinates. This method does not consider children.

Reimplemented in VirtualRobot::Robot.

◆ getCoMLocal()

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

Return Center of Mass in local coordinate frame. This method does not consider children.

Reimplemented in VirtualRobot::Robot.

◆ getFilenameReplacementColModel()

std::string VirtualRobot::SceneObject::getFilenameReplacementColModel ( const std::string  standardExtension = ".wrl")
protected

◆ getFilenameReplacementVisuModel()

std::string VirtualRobot::SceneObject::getFilenameReplacementVisuModel ( const std::string  standardExtension = ".wrl")
protected

◆ getFriction()

float VirtualRobot::SceneObject::getFriction ( )

◆ getGlobalDirection()

Eigen::Vector3f VirtualRobot::SceneObject::getGlobalDirection ( const Eigen::Vector3f &  localDircetion) const
virtual

◆ getGlobalOrientation() [1/2]

Eigen::Matrix3f VirtualRobot::SceneObject::getGlobalOrientation ( ) const
virtual

◆ getGlobalOrientation() [2/2]

Eigen::Matrix3f VirtualRobot::SceneObject::getGlobalOrientation ( const Eigen::Matrix3f &  localOrientation) const
virtual

◆ getGlobalPose() [1/2]

Eigen::Matrix4f VirtualRobot::SceneObject::getGlobalPose ( ) const
virtual

The global pose defines the position of the object in the world. For non-joint objects it is identical with the visualization frame.

Reimplemented in VirtualRobot::LocalRobot, and VirtualRobot::RobotNode.

◆ getGlobalPose() [2/2]

Eigen::Matrix4f VirtualRobot::SceneObject::getGlobalPose ( const Eigen::Matrix4f &  localPose) const
virtual

◆ getGlobalPosition() [1/2]

Eigen::Vector3f VirtualRobot::SceneObject::getGlobalPosition ( ) const
virtual

◆ getGlobalPosition() [2/2]

Eigen::Vector3f VirtualRobot::SceneObject::getGlobalPosition ( const Eigen::Vector3f &  localPosition) const
virtual

◆ getIgnoredCollisionModels()

std::vector< std::string > VirtualRobot::SceneObject::getIgnoredCollisionModels ( )

Collisions with these models are ignored by physics engine (only considered within the SimDynamics package!).

◆ getInertiaMatrix() [1/4]

Eigen::Matrix3f VirtualRobot::SceneObject::getInertiaMatrix ( )

◆ getInertiaMatrix() [2/4]

Eigen::Matrix3f VirtualRobot::SceneObject::getInertiaMatrix ( const Eigen::Vector3f &  shift)

If the Inertia Matrix is given at the CoM, this function returns the Inertia Matrix at the parallel shifted coordinate system. The shift is done using the parallel axis theorem (https://en.wikipedia.org/wiki/Parallel_axis_theorem)

Parameters
shiftHow the system should be shifted.
Returns
The Inertia Matrix at the shifted system

◆ getInertiaMatrix() [3/4]

Eigen::Matrix3f VirtualRobot::SceneObject::getInertiaMatrix ( const Eigen::Vector3f &  shift,
const Eigen::Matrix3f &  rotation 
)

◆ getInertiaMatrix() [4/4]

Eigen::Matrix3f VirtualRobot::SceneObject::getInertiaMatrix ( const Eigen::Matrix4f &  transform)

◆ getMass()

float VirtualRobot::SceneObject::getMass ( ) const

Mass in Kg

◆ getName()

std::string VirtualRobot::SceneObject::getName ( ) const

◆ getNumFaces()

int VirtualRobot::SceneObject::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 in VirtualRobot::Robot.

◆ getParent()

VirtualRobot::SceneObjectPtr VirtualRobot::SceneObject::getParent ( ) const
virtual
Returns
If this object is attached, the parent is returned. Otherwise an empty object is returned.

◆ getPhysics()

SceneObject::Physics VirtualRobot::SceneObject::getPhysics ( )

◆ getScaling()

float VirtualRobot::SceneObject::getScaling ( )

◆ getSceneObjectXMLString()

std::string VirtualRobot::SceneObject::getSceneObjectXMLString ( const std::string &  basePath,
int  tabs,
const std::string &  modelPathRelative = "" 
)
protected

basic data, used by Obstacle and ManipulationObject

◆ getSimulationType()

SceneObject::Physics::SimulationType VirtualRobot::SceneObject::getSimulationType ( ) const

The simulation type is of interest in SimDynamics.

◆ getTransformationFrom()

Eigen::Matrix4f VirtualRobot::SceneObject::getTransformationFrom ( const SceneObjectPtr  otherObject) const

Returns the transformation matrix from otherObject to this object

◆ getTransformationTo()

Eigen::Matrix4f VirtualRobot::SceneObject::getTransformationTo ( const SceneObjectPtr  otherObject) const

Returns the transformation matrix from this object to otherObject

◆ getUpdateCollisionModelStatus()

bool VirtualRobot::SceneObject::getUpdateCollisionModelStatus ( )

◆ getUpdateVisualizationStatus()

bool VirtualRobot::SceneObject::getUpdateVisualizationStatus ( )

◆ getVisualization() [1/2]

VirtualRobot::VisualizationNodePtr VirtualRobot::SceneObject::getVisualization ( SceneObject::VisualizationType  visuType = SceneObject::Full)
virtual

Return visualization object.

Parameters
visuTypeSet the type of visualization.

◆ getVisualization() [2/2]

template<typename T >
std::shared_ptr< T > VirtualRobot::SceneObject::getVisualization ( SceneObject::VisualizationType  visuType = SceneObject::Full)

Retrieve a visualization in the given format. Example usage: std::shared_ptr<VirtualRobot::CoinVisualization> visualization = robot->getVisualization<CoinVisualization>(); SoNode* visualisationNode = NULL; if (visualization) visualisationNode = visualization->getCoinVisualization();

See also
CoinVisualizationFactory::getCoinVisualization() for convenient access!

This method 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.

◆ getVisualizationModelXML()

const std::string & VirtualRobot::SceneObject::getVisualizationModelXML ( ) const

◆ hasChild() [1/2]

bool VirtualRobot::SceneObject::hasChild ( SceneObjectPtr  child,
bool  recursive = false 
) const
virtual
Returns
true, if child is attached

◆ hasChild() [2/2]

bool VirtualRobot::SceneObject::hasChild ( const std::string &  childName,
bool  recursive = false 
) const
virtual
Returns
true, if child is attached

◆ hasParent()

bool VirtualRobot::SceneObject::hasParent ( ) const
virtual
Returns
true, if this object is attached to another object.

◆ highlight()

VisualizationNode VirtualRobot::SceneObject::highlight ( VisualizationPtr  visualization,
bool  enable 
)

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

See also
Parameters
visualizationThe visualization for which the highlighting should be performed.
enableSet or unset highlighting.

◆ initialize()

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

◆ initializePhysics()

bool VirtualRobot::SceneObject::initializePhysics ( )
protectedvirtual

◆ print()

◆ reloadVisualizationFromXML()

bool VirtualRobot::SceneObject::reloadVisualizationFromXML ( bool  useVisAsColModelIfMissing = true)

◆ saveModelFiles()

bool VirtualRobot::SceneObject::saveModelFiles ( const std::string &  modelPath,
bool  replaceFilenames 
)
virtual

Saves model files (visu and col model, if present) to model path.

Parameters
modelPathThe path where the model files should be stored.
replsceFilenamesIf set, the filenames will be replaced with 'name_visu' and 'name_col'. Otherwise the original filename is used without any preceding paths.

◆ setCollisionModel()

void VirtualRobot::SceneObject::setCollisionModel ( CollisionModelPtr  colModel)

◆ setCoMLocal()

void VirtualRobot::SceneObject::setCoMLocal ( const Eigen::Vector3f &  comLocal)

Set a new position for the CoM of this bode.

Note
Use with caution! Some algorithm/systems checks this value only on start up, e.g. the physics simulation.
Parameters
comLocalCenter of Mass in local frame.
See also
getComLocal()

◆ setFriction()

void VirtualRobot::SceneObject::setFriction ( float  friction)

◆ setGlobalPose()

void VirtualRobot::SceneObject::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 in VirtualRobot::LocalRobot, VirtualRobot::Robot, VirtualRobot::RobotNode, and VirtualRobot::Sensor.

◆ setGlobalPoseNoChecks()

void VirtualRobot::SceneObject::setGlobalPoseNoChecks ( const Eigen::Matrix4f &  pose)
virtual

Usually it is checked weather the object is linked to a parent. This check can be omitted (be careful, just do this if you know the effects)

Parameters
poseThe new pose of this object

◆ setInertiaMatrix()

void VirtualRobot::SceneObject::setInertiaMatrix ( const Eigen::Matrix3f &  im)

◆ setMass()

void VirtualRobot::SceneObject::setMass ( float  m)

◆ setName()

void VirtualRobot::SceneObject::setName ( const std::string &  name)

Rename this object

◆ setScaling()

void VirtualRobot::SceneObject::setScaling ( float  scaling)

◆ setSimulationType()

void VirtualRobot::SceneObject::setSimulationType ( Physics::SimulationType  s)

◆ setUpdateCollisionModel()

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

Reimplemented in VirtualRobot::Robot.

◆ setUpdateVisualization()

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

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

Reimplemented in VirtualRobot::Robot.

◆ setupVisualization()

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

Setup the visualization of this object.

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

Reimplemented in VirtualRobot::Robot.

◆ setVisualization()

void VirtualRobot::SceneObject::setVisualization ( VisualizationNodePtr  visualization)

Sets the main visualization of this object.

◆ shiftInertia()

Eigen::Matrix3f VirtualRobot::SceneObject::shiftInertia ( const Eigen::Matrix3f  inertiaMatrix,
const Eigen::Vector3f &  shift,
float  mass 
)
static

The shift is done using the parallel axis theorem (https://en.wikipedia.org/wiki/Parallel_axis_theorem)

Parameters
inertiaMatrix
shift
mass
Returns

◆ showBoundingBox()

void VirtualRobot::SceneObject::showBoundingBox ( bool  enable,
bool  wireframe = false 
)
virtual

Display the bounding box of this object's collisionModel. The bbox is not updated when you move the object, so you have to call this method again after touching the scene in order to ensure a correct visualization. If the object does not own a visualization yet, the VisualizationFactory is queried to get the first registered VisualizationType in order to build a valid visualization. enable Show or hide bounding box wireframe Wireframe or solid visualization.

◆ showCoordinateSystem()

void VirtualRobot::SceneObject::showCoordinateSystem ( bool  enable,
float  scaling = 1.0f,
std::string *  text = NULL,
const std::string &  visualizationType = "" 
)
virtual

Display the coordinate system of this object. If the object does not own a visualization yet, the VisualizationFactory is queried to get the first registered VisualizationType in order to build a valid visualization. enable Show or hide coordinate system scaling Size of coordinate system text Text to display at coordinate system. If not given, the name of this robot node will be displayed.

Reimplemented in VirtualRobot::RobotNode.

◆ showCoordinateSystemState()

bool VirtualRobot::SceneObject::showCoordinateSystemState ( )
virtual

Returns true when the coordinate system is currently shown.

◆ showPhysicsInformation()

void VirtualRobot::SceneObject::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 in VirtualRobot::Robot.

◆ toGlobalCoordinateSystem()

Eigen::Matrix4f VirtualRobot::SceneObject::toGlobalCoordinateSystem ( const Eigen::Matrix4f &  poseLocal) const

Transforms the pose, given in local coordinate system, to the global coordinate system.

Parameters
poseLocalThe pose, given in local coordinate system of this joint, that should be transformed to the global coordinate system.
Returns
The transformed pose.

◆ toGlobalCoordinateSystemVec()

Eigen::Vector3f VirtualRobot::SceneObject::toGlobalCoordinateSystemVec ( const Eigen::Vector3f &  positionLocal) const

◆ toLocalCoordinateSystem()

Eigen::Matrix4f VirtualRobot::SceneObject::toLocalCoordinateSystem ( const Eigen::Matrix4f &  poseGlobal) const

Transforms the pose, given in global coordinate system, to the local coordinate system of this object.

Parameters
poseGlobalThe pose, given in global coordinate system, that should be transformed to the local coordinate system of this joint.
Returns
The transformed pose.

◆ toLocalCoordinateSystemVec()

Eigen::Vector3f VirtualRobot::SceneObject::toLocalCoordinateSystemVec ( const Eigen::Vector3f &  positionGlobal) const

◆ transformTo() [1/2]

Eigen::Matrix4f VirtualRobot::SceneObject::transformTo ( const SceneObjectPtr  otherObject,
const Eigen::Matrix4f &  poseInOtherCoordSystem 
)

Transform pose to local coordinate system of this object

◆ transformTo() [2/2]

Eigen::Vector3f VirtualRobot::SceneObject::transformTo ( const SceneObjectPtr  otherObject,
const Eigen::Vector3f &  positionInOtherCoordSystem 
)

Transform position to local coordinate system of this object

◆ updatePose() [1/2]

void VirtualRobot::SceneObject::updatePose ( bool  updateChildren = true)
virtual

Compute the global pose of this object.

Reimplemented in VirtualRobot::RobotNode, and VirtualRobot::Sensor.

◆ updatePose() [2/2]

void VirtualRobot::SceneObject::updatePose ( const Eigen::Matrix4f &  parentPose,
bool  updateChildren = true 
)
protectedvirtual

Friends And Related Function Documentation

◆ RobotFactory

friend class RobotFactory
friend

Field Documentation

◆ basePath

std::filesystem::path VirtualRobot::SceneObject::basePath
protected

◆ children

std::vector<SceneObjectPtr> VirtualRobot::SceneObject::children
protected

◆ collisionChecker

CollisionCheckerPtr VirtualRobot::SceneObject::collisionChecker
protected

◆ collisionModel

CollisionModelPtr VirtualRobot::SceneObject::collisionModel
protected

◆ collisionModelXML

std::string VirtualRobot::SceneObject::collisionModelXML
protected

◆ globalPose

Eigen::Matrix4f VirtualRobot::SceneObject::globalPose
protected

◆ initialized

bool VirtualRobot::SceneObject::initialized
protected

◆ name

std::string VirtualRobot::SceneObject::name
protected

◆ parent

SceneObjectWeakPtr VirtualRobot::SceneObject::parent
protected

◆ physics

Physics VirtualRobot::SceneObject::physics
protected

◆ scaling

float VirtualRobot::SceneObject::scaling = 1.0f
protected

◆ updateCollisionModel

bool VirtualRobot::SceneObject::updateCollisionModel
protected

◆ updateVisualization

bool VirtualRobot::SceneObject::updateVisualization
protected

◆ visualizationModel

VisualizationNodePtr VirtualRobot::SceneObject::visualizationModel
protected

◆ visualizationModelXML

std::string VirtualRobot::SceneObject::visualizationModelXML
protected