# Capturing pose with a button, questions and troubles

**URL:** <https://forum.universal-robots.com/t/capturing-pose-with-a-button-questions-and-troubles/4678>\
**Category:** URCaps SDK\
**Created:** [July 4, 2019, 9:38pm UTC](https://forum.universal-robots.com/t/capturing-pose-with-a-button-questions-and-troubles/4678 "2019-07-04T21:38:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dmartin](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@dmartin](https://forum.universal-robots.com/u/dmartin)\
**Post date:** [July 9, 2019, 12:01pm UTC](https://forum.universal-robots.com/t/capturing-pose-with-a-button-questions-and-troubles/4678/2 "2019-07-09T12:01:19Z")

</div>

Hi there!

I’ve found out _createJointPositions_ acquires well the joint angles you pass, at least in the range -2Pi to +2PI.

```auto
jointPositions[0] = valueFactoryProvider.getJointPositionFactory().createJointPositions(tcp_jointPositions[0], tcp_jointPositions[1], tcp_jointPositions[2], tcp_jointPositions[3], tcp_jointPositions[4], tcp_jointPositions[5], Angle.Unit.RAD);

```

**But** when you read back the angles from it, if they where negative, you get them with 2PI added. So it only gives you back angles in the range 0 to +2PI, which can lead (and leads) to errors.

It gives the same result no matter if you use these two ways to get the angles back.

```auto
jointPositionsArray1[i] = jointPosition[i].getAngle(Angle.Unit.RAD);
jointPositionsArray2[i] = jointPositions[0].getAllJointPositions()[i].getAngle(Angle.Unit.RAD);

```

I think of this as a bug, can you confirm that or put some light in the matter, UR team?

---

_[View the full topic](https://forum.universal-robots.com/t/capturing-pose-with-a-button-questions-and-troubles/4678)._
