# How to pre-define Robot Joint Angles

**URL:** <https://forum.universal-robots.com/t/how-to-pre-define-robot-joint-angles/6512>\
**Category:** Technical Questions\
**Created:** [March 1, 2020, 3:37pm UTC](https://forum.universal-robots.com/t/how-to-pre-define-robot-joint-angles/6512 "2020-03-01T15:37:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tulio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tulio/32/1690_2.png) [@tulio](https://forum.universal-robots.com/u/tulio)\
**Post date:** [March 1, 2020, 3:37pm UTC](https://forum.universal-robots.com/t/how-to-pre-define-robot-joint-angles/6512/1 "2020-03-01T15:37:50Z")

</div>

Hi, I’m trying to make a robot reach a position with a given shoulder and elbow limitations, is there a way of guarantee just this 2 joints and let the rest do the inverse kin by themselves?

[Screenshot from 2020-03-01 12-20-11|690x447](https://forum.universal-robots.com/uploads/short-url/cEMzzbBvDYcCN5YLmZiYHqxrs1t.png)  
[Screenshot from 2020-03-01 12-17-35|690x436](https://forum.universal-robots.com/uploads/short-url/hfcUbJz1gBu0PLq8sce5ej5Qfqr.png)

So far I tried the following things:

1. **Pre-positioned the robot** in an intermediate position; But is not the best solution since in this case I have a huge variation in Z.  
2 Tried to use **get\_inverse\_kin** and set the joints in qnear to something close to the joint angles. But I didn’t manage to see any difference. Any hints about it?  
3- NEXT STEP. Try to implement an **algebraic solver** of inverse kin working from bottom-up direction and set my conditions.!

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [March 2, 2020, 1:14am UTC](https://forum.universal-robots.com/t/how-to-pre-define-robot-joint-angles/6512/2 "2020-03-02T01:14:08Z")

</div>

Are you using a moveJ or moveL command to get to the position? MoveJ you can ensure the robot goes to the requested joint positions, moveL you cannot gaurantee the joint position as it takes the shortest linear path in tool space regardless of joint positions.
