Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camera rotation error #920

Closed
osrf-migration opened this issue Oct 24, 2013 · 14 comments
Closed

camera rotation error #920

osrf-migration opened this issue Oct 24, 2013 · 14 comments
Labels
all blocker bug Something isn't working rendering

Comments

@osrf-migration
Copy link

Original report (archived issue) by John Hsu (Bitbucket: hsu, GitHub: hsu).

The original report had attachments: after.png, before.png, Screenshot from 2014-01-20 16:28:53.png


seems to be a regression in gazebo 2.0, that any finite camera sensor rotation along X-axis is inverted in simulation.

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


this patch seems to fix it:

diff -r dea35ec881a2ec602e3a54042f3e50ed35976ba8 gazebo/rendering/Camera.cc
--- a/gazebo/rendering/Camera.cc	Thu Oct 24 12:18:03 2013 -0700
+++ b/gazebo/rendering/Camera.cc	Thu Oct 24 16:50:39 2013 -0700
@@ -548,7 +548,7 @@
   // the global coordinate frame is right-handed with +Y up, +X right, and +Z
   // out of the screen.
   // This -1.0 multiplication is a hack to get back the correct orientation.
-  sRot.x *= -1.0;
+  // sRot.x *= -1.0;
 
   pRot = Conversions::Convert(this->pitchNode->getOrientation()).GetAsEuler();
 
@@ -589,7 +589,7 @@
   // the global coordinate frame is right-handed with +Y up, +X right, and +Z
   // out of the screen.
   // The -1.0 to Roll is a hack to set the correct orientation.
-  s.SetFromEuler(math::Vector3(-rpy.x, 0, rpy.z));
+  s.SetFromEuler(math::Vector3(rpy.x, 0, rpy.z));
 
   this->sceneNode->setOrientation(
       Ogre::Quaternion(s.w, s.x, s.y, s.z));

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


added test world, attaching camera view before and after patch.

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


  • set attachment to "after.png"

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


  • set attachment to "before.png"

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


pull request #789

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


  • changed state from "new" to "resolved"

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


  • changed state from "resolved" to "open"

camera translation is broken as demonstrated by test world, where the left camera view should show the green block:

camera translation broken

See commit c5f8131 (077ebae) for test that exposes this issue.

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


  • set attachment to "Screenshot from 2014-01-20 16:28:53.png"

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


  • changed state from "open" to "resolved"

pull request #916 fixes this issue.

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


  • changed state from "resolved" to "open"

will close when pr is merged

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


I just tested and can confirm that 2.2 is broken also. I added the test from pull request #916 to branch issue_920_2.2 in 7e33c61. The test currently fails.

The multicamera_sensor.cc test does not exist in 1.9, but I just tested the camera_rotation_test.world in 1.9 and can confirm that 1.9 is broken too.

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


  • changed state from "open" to "resolved"

pr is merged.

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • set version to "all"

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • changed state from "resolved" to "closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all blocker bug Something isn't working rendering
Projects
None yet
Development

No branches or pull requests

1 participant