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

 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)
 Constructor. More...
 
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::Vector3 & getPositionCovarianceScale ()
 
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...
 
void setOrientation (const Ogre::Quaternion &orientation) override
 Sets orientation of the frame this covariance is attached. More...
 
void setOrientationColor (const Ogre::ColourValue &color)
 
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 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...
 
void setPosition (const Ogre::Vector3 &position) override
 Sets position of the frame this covariance is attached. More...
 
void setPositionColor (const Ogre::ColourValue &color)
 
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 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...
 
void setUserData (const Ogre::Any &data) override
 Sets user data on all ogre objects we own. More...
 
virtual void setVisible (bool visible)
 Sets visibility of this covariance. More...
 
 ~CovarianceVisual () override
 
- Public Member Functions inherited from rviz::Object
 Object (Ogre::SceneManager *scene_manager)
 
virtual ~Object ()
 

Private Member Functions

const Ogre::Quaternion & getOrientation () override
 Get the local orientation of this object. More...
 
const Ogre::Vector3 & getPosition () override
 Get the local position of this object. More...
 
void setColor (float, float, float, float) override
 Set the color of the object. Values are in the range [0, 1]. More...
 
void setScale (const Ogre::Vector3 &) override
 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

const static 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

◆ ShapeIndex

Enumerator
kRoll 
kPitch 
kYaw 
kYaw2D 
kNumOriShapes 

Definition at line 71 of file covariance_visual.h.

Constructor & Destructor Documentation

◆ CovarianceVisual()

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 
)

Constructor.

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 224 of file covariance_visual.cpp.

◆ ~CovarianceVisual()

rviz::CovarianceVisual::~CovarianceVisual ( )
override

Definition at line 310 of file covariance_visual.cpp.

Member Function Documentation

◆ getOrientation()

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

Get the local orientation of this object.

Returns
The orientation

Implements rviz::Object.

Definition at line 609 of file covariance_visual.cpp.

◆ getOrientationSceneNode()

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 155 of file covariance_visual.h.

◆ getOrientationShape()

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 637 of file covariance_visual.cpp.

◆ getPosition()

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

Get the local position of this object.

Returns
The position

Implements rviz::Object.

Definition at line 604 of file covariance_visual.cpp.

◆ getPositionCovarianceOrientation()

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

Definition at line 564 of file covariance_visual.cpp.

◆ getPositionCovarianceScale()

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

Definition at line 559 of file covariance_visual.cpp.

◆ getPositionSceneNode()

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 146 of file covariance_visual.h.

◆ getPositionShape()

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 164 of file covariance_visual.h.

◆ setColor()

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

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 245 of file covariance_visual.h.

◆ setCovariance()

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 326 of file covariance_visual.cpp.

◆ setOrientation()

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

Sets orientation of the frame this covariance is attached.

Implements rviz::Object.

Definition at line 619 of file covariance_visual.cpp.

◆ setOrientationColor() [1/2]

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

Definition at line 533 of file covariance_visual.cpp.

◆ setOrientationColor() [2/2]

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 554 of file covariance_visual.cpp.

◆ setOrientationColorToRGB()

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

Definition at line 541 of file covariance_visual.cpp.

◆ setOrientationOffset()

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

Definition at line 471 of file covariance_visual.cpp.

◆ setOrientationScale()

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

Definition at line 495 of file covariance_visual.cpp.

◆ setOrientationVisible()

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

Sets visibility of the orientation part of this covariance.

Definition at line 589 of file covariance_visual.cpp.

◆ setPosition()

void rviz::CovarianceVisual::setPosition ( const Ogre::Vector3 &  position)
overridevirtual

Sets position of the frame this covariance is attached.

Implements rviz::Object.

Definition at line 614 of file covariance_visual.cpp.

◆ setPositionColor() [1/2]

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

Definition at line 528 of file covariance_visual.cpp.

◆ setPositionColor() [2/2]

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 549 of file covariance_visual.cpp.

◆ setPositionScale()

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

Definition at line 463 of file covariance_visual.cpp.

◆ setPositionVisible()

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

Sets visibility of the position part of this covariance.

Definition at line 584 of file covariance_visual.cpp.

◆ setRotatingFrame()

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

Sets which frame to attach the covariance of the orientation.

Definition at line 624 of file covariance_visual.cpp.

◆ setScale()

void rviz::CovarianceVisual::setScale ( const Ogre::Vector3 &  scale)
inlineoverrideprivatevirtual

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 242 of file covariance_visual.h.

◆ setScales()

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 457 of file covariance_visual.cpp.

◆ setUserData()

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

Sets user data on all ogre objects we own.

Implements rviz::Object.

Definition at line 569 of file covariance_visual.cpp.

◆ setVisible()

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 578 of file covariance_visual.cpp.

◆ updateOrientation()

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

Definition at line 390 of file covariance_visual.cpp.

◆ updateOrientationVisibility()

void rviz::CovarianceVisual::updateOrientationVisibility ( )
private

Definition at line 595 of file covariance_visual.cpp.

◆ updatePosition()

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

Definition at line 366 of file covariance_visual.cpp.

Friends And Related Function Documentation

◆ CovarianceProperty

friend class CovarianceProperty
friend

Definition at line 252 of file covariance_visual.h.

Member Data Documentation

◆ current_ori_scale_

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

Definition at line 234 of file covariance_visual.h.

◆ current_ori_scale_factor_

float rviz::CovarianceVisual::current_ori_scale_factor_
private

Definition at line 235 of file covariance_visual.h.

◆ fixed_orientation_node_

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

Definition at line 218 of file covariance_visual.h.

◆ local_rotation_

bool rviz::CovarianceVisual::local_rotation_
private

Definition at line 228 of file covariance_visual.h.

◆ max_degrees

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

Definition at line 237 of file covariance_visual.h.

◆ orientation_offset_node_

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

Definition at line 223 of file covariance_visual.h.

◆ orientation_root_node_

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

Definition at line 222 of file covariance_visual.h.

◆ orientation_shape_

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

Cylinders used for the orientation covariance.

Definition at line 226 of file covariance_visual.h.

◆ orientation_visible_

bool rviz::CovarianceVisual::orientation_visible_
private

If the orientation component is visible.

Definition at line 232 of file covariance_visual.h.

◆ pose_2d_

bool rviz::CovarianceVisual::pose_2d_
private

Definition at line 230 of file covariance_visual.h.

◆ position_node_

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

Definition at line 220 of file covariance_visual.h.

◆ position_scale_node_

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

Definition at line 219 of file covariance_visual.h.

◆ position_shape_

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

Ellipse used for the position covariance.

Definition at line 225 of file covariance_visual.h.

◆ root_node_

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

Definition at line 217 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, William Woodall
autogenerated on Fri Aug 2 2024 08:43:10