Open frankymacster opened 2 years ago
@frankymacster If you specify ikreturn=True to FindIKSolutions(), special class instance is returned and extra info can be accessed via GetMapDataDict(). Please see solutionindices field.
Thanks @cielavenir!
Will I be able to select a specific configuration from the IK solutions list? For example if I only want the IK solution with the following configuration:
can I access the value returned by GetMapDataDict()
some way like mapDataDict["FUN"]
?
(I'm asking because I don't see any mention of should-elbow-wrist configurations in the code in plugins/ikfastsolvers/ikfastsolver.cpp
)
GetMapDataDict()['solutionindices']
, mentioned as _mapdata["solutionindices"]
in plugins/ikfastsolvers/ikfastsolver.cpp
ok yes I see it here
but what do the solutionindices
consist of?
from that code it seems to be a std::vector
of dReal
(double
).
How can I know which index corresponds to the following configuration?
the type is double but it actually represents 0-7 integers (for 6dof robots). that is the index for each solution. you have to figure out which one corresponds to shoulder-front_elbow-up_wrist-non-flip on your own.
Ok I see, so solutionindices
holds a list of 8 integers (for 6dof robots), one for each solution. Will the order of the solutions always be the same every time the IK solver is run on a different input?
For example, will the index corresponding to "shoulder-front_elbow-up_wrist-non-flip" always be the same in the solutionindices
for a given robot on any rotation, position input?
Sorry I'm not sure for this matter, https://github.com/rdiankov/openrave/pull/809 might be helpful...
Thanks a lot @cielavenir! I will verify if the index corresponding to "shoulder-front_elbow-up_wrist-non-flip" always be the same in the solutionindices for a given robot on any rotation, position input and take a look #809.
Hi, I'm wondering if it's possible from the set of solutions of an IKFast generated IK solver to extract a specific solution with a given shoulder-elbow-wrist configuration.
For example, some robot simulation applications allow to choose a specific shoulder-elbow-wrist configuration:
corresponding to one of the joint configurations here
Thanks!