# VISO2 pitch angle

Hello,

I have managed to get ros_viso2 package to work, I am just wondering where is the pitch angle measured from? for example, I would like to point the camera upwards looking at the ceiling, what should my pitch angle be? and is it in degrees or radians?

I am viewing the outcome of the visual odometry on rviz where I set the fixed frame: /odom and target frame: base_link. Is this the best way to visualize the camera/robot path?

Thanks alot for your help.

Khalid

Originally posted by K_Yousif on ROS Answers with karma: 735 on 2013-01-21

Post score: 3

## 1 Answer

The pitch angle is the angle measured clockwise about the Y-axis. In your case the camera looks upwards and the Y-axis goes towards your left. So if you look towards the left from the camera the angle is pi/2 anti-clockwise. So pitch in your case is -pi/2. The roll,pitch and yaw are measured in radians. Hope this helps!

Originally posted by Karan with karma: 263 on 2013-01-21

This answer was ACCEPTED on the original site

Post score: 1

### Original comments

Comment by K_Yousif on 2013-01-21:
Sorry I'm not sure I understood you, so your saying that the x-axis is the axis that the camera is pointing to, the y-axis is to the left of the camera and I guess the z-axis is upwards? So from what I understand, if the camera was pointing to the floor the pitch angle would be pi/2?

Comment by Stephan on 2013-01-21:
That is correct. Please not that this coordinate system you are talking about is different from the camera's optical frame (see REP 103).

Comment by Stephan on 2013-01-21:
Note: The mono_odometer estimates the ground plane and uses ~camera_height and ~camera_pitch to scale the motion. If the camera looks to the ceiling I'm not sure what happens. It could be that it works just fine or that the output is twisted. I would always recommend to use stereo_odometer instead.

Comment by Karan on 2013-01-21:
X axis goes forward, Y-axis goes to the left and so Z upwards which is exactly what you said.. And yes if you point the camera downwards the pitch increases..(atleast i got the same results with visual odometry using fovis with Kinect)

Comment by Stephan on 2013-01-21:
2nd Note: For mono_odometer features must not be coplanar. Else the linear system to calculate transformations degenerates (see 6th stanza of The Fundamental Matrix Song). Apart from features on the ground (or ceiling) you need features on walls or other objects.

Comment by K_Yousif on 2013-01-21:
I see, so I do not thing pointing to the ceiling will work. I do not have a stereo camera but I have a Kinect, would that work?

Comment by Stephan on 2013-01-21:
See http://answers.ros.org/question/52280/use-of-kinect-as-a-stereo-camera-for-visual-odometry/

Comment by Karan on 2013-01-22:
Kinect wont work with viso2_ros as of now but Lib Fovis is very good for visual odometry which uses the rgb and depth incoming images..

Comment by K_Yousif on 2013-01-22:
@Karan, did you manage to to get Fovis to work with ROS?

Comment by Karan on 2013-01-22:
Yes,As a matter of fact quite recently..

Comment by K_Yousif on 2013-01-22:
Did you post the ROS wrapper on the ros wiki?

Comment by Karan on 2013-01-22:
No i did not..What is the way?

Comment by Stephan on 2013-01-22:
Please read http://answers.ros.org/question/10349/whats-the-best-way-to-contribute-back-stacks-and-packages/

Comment by sgr_98 on 2019-06-24:
I'm still a bit confused If the angle with X-axis is 30 degrees downwards what would be the pitch angle in that case?