# How do I get the joint angles?

**URL:** <https://forum.universal-robots.com/t/how-do-i-get-the-joint-angles/38121>\
**Category:** Technical Questions\
**Created:** [January 20, 2025, 3:42pm UTC](https://forum.universal-robots.com/t/how-do-i-get-the-joint-angles/38121 "2025-01-20T15:42:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![claire.pottier](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@claire.pottier](https://forum.universal-robots.com/u/claire.pottier)\
**Post date:** [January 20, 2025, 3:42pm UTC](https://forum.universal-robots.com/t/how-do-i-get-the-joint-angles/38121/1 "2025-01-20T15:42:44Z")

</div>

Good afternoon,

I would like to find the transformation between a camera mounted on a UR5 and the TCP of this robot.

I’m using the code from the MATLAB example “Estimate Pose of Moving Camera Mounted on a Robot” ([https://www.mathworks.com/help/vision/ug/estimate-pose-of-moving-camera-mounted-on-a-robot.html](https://www.mathworks.com/help/vision/ug/estimate-pose-of-moving-camera-mounted-on-a-robot.html)) but I’m having a problem with the values for the robot’s joint angles. I used the values I obtained from the UR5 register ‘actual\_q’. I read this register via an RTDE connection, in MATLAB.

When I used the information found in this register with the images taken by my camera, I obtained the following result:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/0/07caa65da32e806a57aa20fd6b8f414d52935b1f.png)

When the camera (in red) is on the TCP of the robot.

I did some research and discovered that the error was due to the joint robot’s joint angles values I had been given in the code.

In the ‘Real-Time Data Exchange (RTDE) Guide’ for UR5 ([Real-Time Data Exchange (RTDE) Guide - 22229](https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/)), it says that ‘actual\_q’ is the actual joint position in radians.

I guess I missed a transformation or got the wrong data.

Can someone explain to me what exactly the ‘actual\_q’ register is, and how I can get the robot’s joint angles?

Thank you for your time.
