Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
rviz::CovarianceVisual Class Reference

CovarianceVisual consisting in a ellipse for position and 2D ellipses along the axis for orientation. More...

#include <covariance_visual.h>

Inheritance diagram for rviz::CovarianceVisual:
Inheritance graph
[legend]

Public Types

enum  ShapeIndex {
  kRoll =0, kPitch =1, kYaw =2, kYaw2D =3,
  kNumOriShapes
}
 

Public Member Functions

Ogre::SceneNode * getOrientationSceneNode ()
 Get the root scene node of the orientation part of this covariance. More...
 
rviz::ShapegetOrientationShape (ShapeIndex index)
 Get the shape used to display orientation covariance in an especific axis. More...
 
virtual const Ogre::Quaternion & getPositionCovarianceOrientation ()
 
virtual const Ogre::Vector3getPositionCovarianceScale ()
 
Ogre::SceneNode * getPositionSceneNode ()
 Get the root scene node of the position part of this covariance. More...
 
rviz::ShapegetPositionShape ()
 Get the shape used to display position covariance. More...
 
virtual void setCovariance (const geometry_msgs::PoseWithCovariance &pose)
 Set the covariance. More...
 
virtual void setOrientation (const Ogre::Quaternion &orientation)
 Sets orientation of the frame this covariance is attached. More...
 
virtual void setOrientationColor (float r, float g, float b, float a)
 Set the color of the orientation covariance. Values are in the range [0, 1]. More...
 
void setOrientationColor (const Ogre::ColourValue &color)
 
void setOrientationColorToRGB (float a)
 
void setOrientationOffset (float ori_offset)
 
void setOrientationScale (float ori_scale)
 
virtual void setOrientationVisible (bool visible)
 Sets visibility of the orientation part of this covariance. More...
 
virtual void setPosition (const Ogre::Vector3 &position)
 Sets position of the frame this covariance is attached. More...
 
virtual void setPositionColor (float r, float g, float b, float a)
 Set the color of the position covariance. Values are in the range [0, 1]. More...
 
void setPositionColor (const Ogre::ColourValue &color)
 
void setPositionScale (float pos_scale)
 
virtual void setPositionVisible (bool visible)
 Sets visibility of the position part of this covariance. More...
 
virtual void setRotatingFrame (bool use_rotating_frame)
 Sets which frame to attach the covariance of the orientation. More...
 
void setScales (float pos_scale, float ori_scale)
 Set the position and orientation scales for this covariance. More...
 
virtual void setUserData (const Ogre::Any &data)
 Sets user data on all ogre objects we own. More...
 
virtual void setVisible (bool visible)
 Sets visibility of this covariance. More...
 
virtual ~CovarianceVisual ()
 
- Public Member Functions inherited from rviz::Object
 Object (Ogre::SceneManager *scene_manager)
 
virtual ~Object ()
 

Private Member Functions

 CovarianceVisual (Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node, bool is_local_rotation, bool is_visible=true, float pos_scale=1.0f, float ori_scale=0.1f, float ori_offset=0.1f)
 Private Constructor. More...
 
virtual const Ogre::Quaternion & getOrientation ()
 Get the local orientation of this object. More...
 
virtual const Ogre::Vector3getPosition ()
 Get the local position of this object. More...
 
virtual void setColor (float r, float g, float b, float a)
 Set the color of the object. Values are in the range [0, 1]. More...
 
virtual void setScale (const Ogre::Vector3 &scale)
 Set the scale of the object. Always relative to the identity orientation of the object. More...
 
void updateOrientation (const Eigen::Matrix6d &covariance, ShapeIndex index)
 
void updateOrientationVisibility ()
 
void updatePosition (const Eigen::Matrix6d &covariance)
 

Private Attributes

Ogre::Vector3 current_ori_scale_ [kNumOriShapes]
 
float current_ori_scale_factor_
 
Ogre::SceneNode * fixed_orientation_node_
 
bool local_rotation_
 
Ogre::SceneNode * orientation_offset_node_ [kNumOriShapes]
 
Ogre::SceneNode * orientation_root_node_
 
rviz::Shapeorientation_shape_ [kNumOriShapes]
 Cylinders used for the orientation covariance. More...
 
bool orientation_visible_
 If the orientation component is visible. More...
 
bool pose_2d_
 
Ogre::SceneNode * position_node_
 
Ogre::SceneNode * position_scale_node_
 
rviz::Shapeposition_shape_
 Ellipse used for the position covariance. More...
 
Ogre::SceneNode * root_node_
 

Static Private Attributes

static const float max_degrees = 89.0
 

Friends

class CovarianceProperty
 

Additional Inherited Members

- Protected Attributes inherited from rviz::Object
Ogre::SceneManager * scene_manager_
 Ogre scene manager this object is part of. More...
 

Detailed Description

CovarianceVisual consisting in a ellipse for position and 2D ellipses along the axis for orientation.

Definition at line 68 of file covariance_visual.h.

Member Enumeration Documentation

Enumerator
kRoll 
kPitch 
kYaw 
kYaw2D 
kNumOriShapes 

Definition at line 71 of file covariance_visual.h.

Constructor & Destructor Documentation

rviz::CovarianceVisual::CovarianceVisual ( Ogre::SceneManager *  scene_manager,
Ogre::SceneNode *  parent_node,
bool  is_local_rotation,
bool  is_visible = true,
float  pos_scale = 1.0f,
float  ori_scale = 0.1f,
float  ori_offset = 0.1f 
)
private

Private Constructor.

CovarianceVisual can only be constructed by friend class CovarianceProperty.

Parameters
scene_managerThe scene manager to use to construct any necessary objects
parent_objectA rviz object that this covariance will be attached.
is_local_rotationInitial attachment of the rotation part
is_visibleInitial visibility
pos_scaleScale of the position covariance
ori_scaleScale of the orientation covariance

Definition at line 200 of file covariance_visual.cpp.

rviz::CovarianceVisual::~CovarianceVisual ( )
virtual

Definition at line 267 of file covariance_visual.cpp.

Member Function Documentation

const Ogre::Quaternion & rviz::CovarianceVisual::getOrientation ( )
privatevirtual

Get the local orientation of this object.

Returns
The orientation

Implements rviz::Object.

Definition at line 567 of file covariance_visual.cpp.

Ogre::SceneNode* rviz::CovarianceVisual::getOrientationSceneNode ( )
inline

Get the root scene node of the orientation part of this covariance.

Returns
the root scene node of the orientation part of this covariance

Definition at line 149 of file covariance_visual.h.

rviz::Shape * rviz::CovarianceVisual::getOrientationShape ( ShapeIndex  index)

Get the shape used to display orientation covariance in an especific axis.

Returns
the shape used to display orientation covariance in an especific axis

Definition at line 596 of file covariance_visual.cpp.

const Ogre::Vector3 & rviz::CovarianceVisual::getPosition ( )
privatevirtual

Get the local position of this object.

Returns
The position

Implements rviz::Object.

Definition at line 562 of file covariance_visual.cpp.

const Ogre::Quaternion & rviz::CovarianceVisual::getPositionCovarianceOrientation ( )
virtual

Definition at line 522 of file covariance_visual.cpp.

const Ogre::Vector3 & rviz::CovarianceVisual::getPositionCovarianceScale ( )
virtual

Definition at line 517 of file covariance_visual.cpp.

Ogre::SceneNode* rviz::CovarianceVisual::getPositionSceneNode ( )
inline

Get the root scene node of the position part of this covariance.

Returns
the root scene node of the position part of this covariance

Definition at line 143 of file covariance_visual.h.

rviz::Shape* rviz::CovarianceVisual::getPositionShape ( )
inline

Get the shape used to display position covariance.

Returns
the shape used to display position covariance

Definition at line 155 of file covariance_visual.h.

virtual void rviz::CovarianceVisual::setColor ( float  r,
float  g,
float  b,
float  a 
)
inlineprivatevirtual

Set the color of the object. Values are in the range [0, 1].

Parameters
rRed component
gGreen component
bBlue component

Implements rviz::Object.

Definition at line 231 of file covariance_visual.h.

void rviz::CovarianceVisual::setCovariance ( const geometry_msgs::PoseWithCovariance &  pose)
virtual

Set the covariance.

This effectively changes the orientation and scale of position and orientation covariance shapes

Definition at line 283 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setOrientation ( const Ogre::Quaternion &  orientation)
virtual

Sets orientation of the frame this covariance is attached.

Implements rviz::Object.

Definition at line 577 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setOrientationColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the orientation covariance. Values are in the range [0, 1].

Parameters
rRed component
gGreen component
bBlue component

Definition at line 512 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setOrientationColor ( const Ogre::ColourValue &  color)

Definition at line 491 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setOrientationColorToRGB ( float  a)

Definition at line 499 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setOrientationOffset ( float  ori_offset)

Definition at line 430 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setOrientationScale ( float  ori_scale)

Definition at line 453 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setOrientationVisible ( bool  visible)
virtual

Sets visibility of the orientation part of this covariance.

Definition at line 547 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setPosition ( const Ogre::Vector3 position)
virtual

Sets position of the frame this covariance is attached.

Implements rviz::Object.

Definition at line 572 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setPositionColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the position covariance. Values are in the range [0, 1].

Parameters
rRed component
gGreen component
bBlue component

Definition at line 507 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setPositionColor ( const Ogre::ColourValue &  color)

Definition at line 486 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setPositionScale ( float  pos_scale)

Definition at line 422 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setPositionVisible ( bool  visible)
virtual

Sets visibility of the position part of this covariance.

Definition at line 542 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setRotatingFrame ( bool  use_rotating_frame)
virtual

Sets which frame to attach the covariance of the orientation.

Definition at line 582 of file covariance_visual.cpp.

virtual void rviz::CovarianceVisual::setScale ( const Ogre::Vector3 scale)
inlineprivatevirtual

Set the scale of the object. Always relative to the identity orientation of the object.

Parameters
Scalevector scale to set to.

Implements rviz::Object.

Definition at line 230 of file covariance_visual.h.

void rviz::CovarianceVisual::setScales ( float  pos_scale,
float  ori_scale 
)

Set the position and orientation scales for this covariance.

Parameters
pos_scaleScale of the position covariance
ori_scaleScale of the orientation covariance

Definition at line 416 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setUserData ( const Ogre::Any &  data)
virtual

Sets user data on all ogre objects we own.

Implements rviz::Object.

Definition at line 527 of file covariance_visual.cpp.

void rviz::CovarianceVisual::setVisible ( bool  visible)
virtual

Sets visibility of this covariance.

Convenience method that sets visibility of both position and orientation parts.

Definition at line 536 of file covariance_visual.cpp.

void rviz::CovarianceVisual::updateOrientation ( const Eigen::Matrix6d covariance,
ShapeIndex  index 
)
private

Definition at line 349 of file covariance_visual.cpp.

void rviz::CovarianceVisual::updateOrientationVisibility ( )
private

Definition at line 553 of file covariance_visual.cpp.

void rviz::CovarianceVisual::updatePosition ( const Eigen::Matrix6d covariance)
private

Definition at line 326 of file covariance_visual.cpp.

Friends And Related Function Documentation

friend class CovarianceProperty
friend

Definition at line 236 of file covariance_visual.h.

Member Data Documentation

Ogre::Vector3 rviz::CovarianceVisual::current_ori_scale_[kNumOriShapes]
private

Definition at line 222 of file covariance_visual.h.

float rviz::CovarianceVisual::current_ori_scale_factor_
private

Definition at line 223 of file covariance_visual.h.

Ogre::SceneNode* rviz::CovarianceVisual::fixed_orientation_node_
private

Definition at line 206 of file covariance_visual.h.

bool rviz::CovarianceVisual::local_rotation_
private

Definition at line 216 of file covariance_visual.h.

const float rviz::CovarianceVisual::max_degrees = 89.0
staticprivate

Definition at line 225 of file covariance_visual.h.

Ogre::SceneNode* rviz::CovarianceVisual::orientation_offset_node_[kNumOriShapes]
private

Definition at line 211 of file covariance_visual.h.

Ogre::SceneNode* rviz::CovarianceVisual::orientation_root_node_
private

Definition at line 210 of file covariance_visual.h.

rviz::Shape* rviz::CovarianceVisual::orientation_shape_[kNumOriShapes]
private

Cylinders used for the orientation covariance.

Definition at line 214 of file covariance_visual.h.

bool rviz::CovarianceVisual::orientation_visible_
private

If the orientation component is visible.

Definition at line 220 of file covariance_visual.h.

bool rviz::CovarianceVisual::pose_2d_
private

Definition at line 218 of file covariance_visual.h.

Ogre::SceneNode* rviz::CovarianceVisual::position_node_
private

Definition at line 208 of file covariance_visual.h.

Ogre::SceneNode* rviz::CovarianceVisual::position_scale_node_
private

Definition at line 207 of file covariance_visual.h.

rviz::Shape* rviz::CovarianceVisual::position_shape_
private

Ellipse used for the position covariance.

Definition at line 213 of file covariance_visual.h.

Ogre::SceneNode* rviz::CovarianceVisual::root_node_
private

Definition at line 205 of file covariance_visual.h.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Wed Aug 28 2019 04:01:52