0
$\begingroup$

Rosanswers logo

I want to perform inverse kinematics in Moveit of Baxter arm. Below are the requirements:

  1. Joint configuration for one pose is known
  2. For target state, only end-effector position (but not orientation) is known

(Pose 1) For this pose, the joint angles are known: For this pose, the joint angles are known

(Pose 2) This is target pose. only end-effector position but not orientation is known: This is target pose. only end-effector position but not orientation is known

My questions are:

  1. Based on the known joint configuration, is it possible to perform inverse kinematics, when only end-effector position is known?
  2. In other words, I want to know the joint angles for Pose 2, knowing the joint angles for Pose 1.

Originally posted by ravijoshi on ROS Answers with karma: 1744 on 2017-02-17

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you are using MoveIt, you can just set group.setPositionTarget(eef_position_#2). When solving IK for this, there will be an infinite set of possible joint angles to reach that position, without constraining the orientation. This means the orientation reached will be completely random.

Going from pose 1 to pose 2 from an IK solver standpoint does not matter what the joint angles are for pose 1. It could come into play if you are trying to minimize the motion from pose 1 to pose 2 though.

Edit: For keeping the orientation similar to the current orientation, it might be best to create an orientation constraint and then plan to a new position target. The orientation constraint can be used to keep the goal pose within a range of the current orientation.


Originally posted by JoshMarino with karma: 592 on 2017-02-17

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ravijoshi on 2017-02-17:
I already tried group.setPositionTarget but it didn't work as expected, I also tried to set the start state by using group.set_start_state but still, I see that it is taking random orientation. Orientation at pose 1 and 2 is not exactly same. I would like to keep it vertically downward inclined.

Comment by v4hn on 2017-02-18:
If you want to keep the same orientation, that's more easy.

You could compute the eef-pose (position&orientation) and use this orientation together with your new position instead of the position-only target.

Comment by JoshMarino on 2017-02-18:
So from pose 1 to pose 2 you want to keep the same orientation, but just move the end effector position?

Comment by ravijoshi on 2017-02-18:
Keeping the orientation same throughout the trajectory is limiting the workspace. I really don't have much control over orientation. I want the IK solver to keep the orientation as close as possible to pose 1 but it can change slightly in order to reach the target point.

Comment by JoshMarino on 2017-02-18:
Updated my original answer with a suggestion. What we have been talking about so far is only for pose 1 and pose 2. When you mention trajectory though that means the path it follows from pose 1 to pose 2. Which one do you mean?

Comment by ravijoshi on 2017-02-18:
I don't need trajectory. I just need the joint angles for pose 2 (keeping in mind pose 1). Hence "we have been talking about so far is only for pose 1 and pose 2." is correct.

Comment by ravijoshi on 2017-02-21:
@JoshMarino: Setting orientation constraint using group.set_path_constraints and then setting position using group.set_position_target is seems not working. Please have a look here

Comment by JoshMarino on 2017-02-22:
My only suggestion is to mess around with the orientation constraint tolerances and weight. You might also want to try using the quaternion values point B instead of the mean values along the trajectory. Once you get something working, can try making it more robust.

Comment by ravijoshi on 2017-02-23:
Something is fishy. IK is not working at all when positioning data with constraints is provided as input. I asked the similar question at here. Even just moving 4 cm up, keeping the same quaternion with 30 degrees of tolerance and 0.5 as weight parameter is not working.

Comment by JoshMarino on 2017-02-24:
Might want to try a different planner instead of LBK, I have had luck with Baxter using rtkconnect.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.