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

Revision history [back]

click to hide/show revision 1
initial version

A workaround was already proposed in the comments, but for context:

  • In C++, you should be able to obtain multiple IK solutions from the Kinematics API, and then sort through them yourself, although I haven't done it myself and can't find where I thought I had read it. You can see how RobotState uses Kinematics methods here. The need for a function to get the "closest" IK solution from the KinematicsBase API has been brought up in a Github issue.

  • The Python interface is quite limited, especially for moveit_core (the C++-native internals like this). There are quite a lot for the move_group_interface(MoveGroupCommander in Python), and a few for the RobotState and planning_scene_interface. There have been long discussions about this on Github. There is no obstacle to adding Python bindings yourself as needed - except that it is a bit confusing that they are defined in two places (here and here for the move_group_interface).

  • Another option to access C++ functionality in Python is to add a MoveGroupCapability and then call that in your Python code. You can go all the way and add a convenience function to the MoveGroupInterface and expose that to Python as well.

I hope that is a little helpful. As always, if you implement something that might be useful or fix a problem, do consider contributing it upstream. Cheers

A workaround was already proposed in the comments, but for context:

  • In C++, you should be able to obtain multiple IK solutions from the Kinematics API, and then sort through them yourself, although I haven't done it myself and can't find where I thought I had read it. as described in this question. You can also see how RobotState uses Kinematics methods here. The need for a function to get the "closest" IK solution from the KinematicsBase API has been brought up in a Github issue.

  • The Python interface is quite limited, especially for moveit_core (the C++-native internals like this). There are quite a lot for the move_group_interface(MoveGroupCommander in Python), and a few for the RobotState and planning_scene_interface. There have been long discussions about this on Github. There is no obstacle to adding Python bindings yourself as needed - except that it is a bit confusing that they are defined in two places (here and here for the move_group_interface).

  • Another option to access C++ functionality in Python is to add a MoveGroupCapability and then call that in your Python code. You can go all the way and add a convenience function to the MoveGroupInterface and expose that to Python as well.

I hope that is a little helpful. As always, if you implement something that might be useful or fix a problem, do consider contributing it upstream. Cheers