Skip to content

Commit 4affaad

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rviz/default_plugin/covariance_visual.cpp

Lines changed: 2 additions & 1 deletion
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,6 +282,7 @@ 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_Z) *
285286
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

0 commit comments

Comments
 (0)