Home | Tutorials | Wiki | Issues
Ask Your Question

Can the optical frame orientation be set via pose in sensor

asked 2013-11-15 11:03:07 -0600

rnunziata gravatar image

updated 2013-11-19 03:30:44 -0600

I can rotate the physical frame using the pose element. I do not want to move the camera as its image is correct it is the orientation of the optical that is not oriented in rviz correctly. Do I have to manually (in code) translate or is there a way to normalize these coordinate system to each other. Hopefully I asked the question correctly this time.

This following statement is incorrect as the pose does not rotate the optical frame. XY pose work fine.

I was trying to rotate my depth camera by doing the following: The z rotation takes effect but the XY rotation are ignored. I understand it is normal to create a joint for this but I was wonder why I can not do it here.

   <sensor name="camera1" type="depth">
           <pose>-0.1 0 0.2 -1.57 0 -1.57</pose>
           <camera name='head'>
               <save enabled="false"> 

<plugin name="head_camera_controller" filename="libgazebo_ros_openni_kinect.so">



edit retag flag offensive close merge delete


XY rotation should work. How are you determining that the rotation is not working?

nkoenig gravatar imagenkoenig ( 2013-11-18 16:10:30 -0600 )edit

It did rotate for Z but not Y. I will try again to double check and post image. I am verifying in RVIZ.

rnunziata gravatar imagernunziata ( 2013-11-18 16:31:52 -0600 )edit

if you are working on gazebo 2.0 or later, watchout for this bug https://bitbucket.org/osrf/gazebo/issue/920/camera-rotation-error. This should have been fixed in the latest 2.1.0 release (https://bitbucket.org/osrf/gazebo/src/eed181a68859e55176b134230a910764d86f87c3/Changelog.md?at=default)

hsu gravatar imagehsu ( 2013-11-18 17:56:44 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-11-21 06:46:05 -0600

rnunziata gravatar image

I was able to use the static transform publisher in ros to map the camera optical frame to the base_link.

edit flag offensive delete link more

answered 2013-11-18 17:53:32 -0600

hsu gravatar image

Per testing in gazebo 1.9 with this world, the rotation in x-axis seems to have made a difference.

edit flag offensive delete link more


updated question for clearity

rnunziata gravatar imagernunziata ( 2013-11-19 02:49:00 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2013-11-15 11:03:07 -0600

Seen: 1,411 times

Last updated: Nov 21 '13