Skip to content

Commit

Permalink
Fix errors while orientation covariance visualization in CovarianceVi…
Browse files Browse the repository at this point in the history
…sual
  • Loading branch information
AndreasR30 committed Aug 24, 2020
1 parent 26c52b6 commit e30f993
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rviz/default_plugin/covariance_visual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ CovarianceVisual::CovarianceVisual(Ogre::SceneManager* scene_manager,
// x-axis (roll)
orientation_offset_node_[kRoll]->setPosition(Ogre::Vector3::UNIT_X);
orientation_offset_node_[kRoll]->setOrientation(
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_X) *
Ogre::Quaternion(Ogre::Degree(-90), Ogre::Vector3::UNIT_X) *
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_Z));
// y-axis (pitch)
orientation_offset_node_[kPitch]->setPosition(Ogre::Vector3(Ogre::Vector3::UNIT_Y));
Expand All @@ -282,7 +282,8 @@ CovarianceVisual::CovarianceVisual(Ogre::SceneManager* scene_manager,
// z-axis (yaw)
orientation_offset_node_[kYaw]->setPosition(Ogre::Vector3(Ogre::Vector3::UNIT_Z));
orientation_offset_node_[kYaw]->setOrientation(
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_X));
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_Z) *
Ogre::Quaternion(Ogre::Degree(-90), Ogre::Vector3::UNIT_X));
// z-axis (yaw 2D)
// NOTE: rviz use a cone defined by the file rviz/ogre_media/models/rviz_cone.mesh, and it's
// origin is not at the top of the cone. Since we want the top to be at the origin of
Expand Down

0 comments on commit e30f993

Please sign in to comment.