Skip to content

Commit e30f993

Browse files
committed
Fix errors while orientation covariance visualization in CovarianceVisual
1 parent 26c52b6 commit e30f993

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rviz/default_plugin/covariance_visual.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ CovarianceVisual::CovarianceVisual(Ogre::SceneManager* scene_manager,
273273
// x-axis (roll)
274274
orientation_offset_node_[kRoll]->setPosition(Ogre::Vector3::UNIT_X);
275275
orientation_offset_node_[kRoll]->setOrientation(
276-
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_X) *
276+
Ogre::Quaternion(Ogre::Degree(-90), Ogre::Vector3::UNIT_X) *
277277
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_Z));
278278
// y-axis (pitch)
279279
orientation_offset_node_[kPitch]->setPosition(Ogre::Vector3(Ogre::Vector3::UNIT_Y));
@@ -282,7 +282,8 @@ CovarianceVisual::CovarianceVisual(Ogre::SceneManager* scene_manager,
282282
// z-axis (yaw)
283283
orientation_offset_node_[kYaw]->setPosition(Ogre::Vector3(Ogre::Vector3::UNIT_Z));
284284
orientation_offset_node_[kYaw]->setOrientation(
285-
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_X));
285+
Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::UNIT_Z) *
286+
Ogre::Quaternion(Ogre::Degree(-90), Ogre::Vector3::UNIT_X));
286287
// z-axis (yaw 2D)
287288
// NOTE: rviz use a cone defined by the file rviz/ogre_media/models/rviz_cone.mesh, and it's
288289
// origin is not at the top of the cone. Since we want the top to be at the origin of

0 commit comments

Comments
 (0)