ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Position ONLY IK with seed value using MoveIt

asked 2017-02-01 07:43:10 -0500

ravijoshi gravatar image


I am using moveit for IK calculation of my Baxter Robot. I want to calculate the joint angles for a given position (excluding orientation) of End-Effector.

Following is code snippet:

import moveit_commander
group = moveit_commander.MoveGroupCommander("left_arm")
group.set_position_target([x, y, z])
plan = group.plan()

The variable plan contains complete trajectory for moving the robot arm from current position to target position. BUT I just want the joint angles for target position, so I select the last element of this trajectory to get the joint angle. There can be many solutions for a given position for Baxter arm, hence I want to provide an initial estimate of the joint angles as a seed value. So that moveit can search for IK solution nearest to the seed value.

Below are my questions:

  1. How to set seed value in moveit for IK calculation?
  2. How to perform IK for position only input (better suggestion compared to my approach) ?


edit retag flag offensive close merge delete


any suggestion, please?

ravijoshi gravatar image ravijoshi  ( 2017-02-02 20:07:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-02-18 09:24:31 -0500

Rufus gravatar image

You can prolly use getPositonIK or searchPositionIK to provide a seed pose. As for doing position only IK, some solvers allow specifying a position_only_ik parameter, but I've not gotten it to work. (See here and here)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-02-01 07:43:10 -0500

Seen: 901 times

Last updated: Feb 18 '21