ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

Position Only Inverse Kinematics in Moveit

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:

(Pose 2) 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.
edit retag close merge delete

Sort by ยป oldest newest most voted

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.

more

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.

( 2017-02-17 21:04:47 -0500 )edit

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.

( 2017-02-18 04:11:41 -0500 )edit

So from pose 1 to pose 2 you want to keep the same orientation, but just move the end effector position?

( 2017-02-18 08:48:29 -0500 )edit

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.

( 2017-02-18 09:01:00 -0500 )edit

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?

( 2017-02-18 10:51:47 -0500 )edit

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.

( 2017-02-18 21:45:05 -0500 )edit

@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

( 2017-02-21 19:13:34 -0500 )edit
1

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.

( 2017-02-22 15:09:07 -0500 )edit