petercorke / petercorke/robotics-toolbox-python

fkine and ik_lm work wrong for fetch robot?

Open
#465 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.5k
Forks
624
Avg merge
2d 4h
Merged PRs (30d)
53

Description

I want to calculate param of fetch robot using rt party.
My test code is below,it is very simple and the same method work right on panda robot:

import roboticstoolbox as rtb
import numpy as np

robot = rtb.models.Fetch()

init_q=np.array([0,0,0,0, -0.3, 0, -2.2, 0, 2, 0.7854])
start_pos = robot.fkine(init_q)
print("start_pos:\n",start_pos)

q_ik=robot.ik_LM(start_pos,q0=init_q)

print("q_ik:\n",q_ik)

end_pos = robot.fkine(q_ik[0])

print("end_pos:\n",end_pos)``

The picture of result like this
Screenshot from 2024-11-09 15-20-41

Obviously,the result is wrong.
I dont find the reason. Can anyone help me?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the supplied Fetch example and compare the printed start_pos and end_pos transforms. Read the Fetch model entry point and the fkine and ik_LM implementations, then inspect how the 10-element init_q is interpreted. Done means inverse kinematics returns a configuration whose fkine result matches start_pos, as it does for the Panda example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
robotics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.