How to use IKFast for new robot type? #777
Replies: 21 comments 3 replies
-
Take a look here at the following files.
Also there is iiwa7 example in the same directory. |
Beta Was this translation helpful? Give feedback.
-
After you create the kinematics object you will need to create the factory which is the plugin to tesseract. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Levi-Armstrong. I might be misunderstanding here, but that factory you linked is for KDL. I see in here that you list all the plugins. The iiwa seems to point to KDL--not IKFast and abb points to OPW, which I think is defined here. Is the OPW IK library your preferred standard? I'm used to using IKFast, but I'd be happy to set up something else if it's better. Or, do you have an example of an IKFast factory? |
Beta Was this translation helpful? Give feedback.
-
If possible, try to use OPW. The 'only' thing you'd need is the parameters. The plugin code is already written, and it's both faster and much more compact than IKFast. Whether the Panda can be modelled as an OPW-type robot I don't know. |
Beta Was this translation helpful? Give feedback.
-
It looks pretty similar to the OPW model, but I don't know how to get all the parameters. Maybe I can load it in sim and figure out how to take the measurements. |
Beta Was this translation helpful? Give feedback.
-
@fishbotics Here are the ikfast examples for the iiwa https://github.com/tesseract-robotics/tesseract/blob/master/tesseract_kinematics/test/iiwa7_ikfast_kinematics.h Generated from ikfast |
Beta Was this translation helpful? Give feedback.
-
OPW kinematics can only be used with a very specific robot configuration, and I don't think this particular robot meets the criteria. A few general requirements are that the robot must be 6 DOF and have a spherical wrist (i.e. the last three axes all intersect at a single point). Here is a picture of a valid OPW configuration with the dimensions denoted. If your robot doesn't have an exact correlation to this diagram, then OPW can't be used |
Beta Was this translation helpful? Give feedback.
-
I'm coincidentally also trying to implement a custom IKFast plugin currently, and it seems like the functionality for loading a custom plugin is fairly limited in one case and broken in another. Case 1: YAML config file (limited capability)You can specify the names and locations of plugins in the plugin config file, such as this example. However, I believe these names have to be hard-coded, so they wouldn't transfer between machines unless the plugins were installed to a universal directory (which is not the case for most ROS users building in a workspace in their home directory). Case 2: Environment variables (broken)You can also specify the names and locations of plugins using two (fairly hidden) environment variables. A user could use a script or ROS launch file to populate these environment variables in a generic way that is machine independent. However, the plugin loader does not attempt to load plugins that it finds from environment variables. Instead it only loads libraries from its internal cache (see below that tesseract/tesseract_common/include/tesseract_common/plugin_loader.hpp Lines 133 to 162 in eebe3fd Are there other ways of loading custom plugins, or do we need to fix these methods? Also the kinematic plugin unit tests don't test this loading capability because the plugin loader already knows about the plugins built by |
Beta Was this translation helpful? Give feedback.
-
I guess there is a third case which is to use some combination of both other methods, specifically setting the search path in the environment variable and adding the plugin library name to the YAML config file. We still should address the shortcomings of the other approaches too though |
Beta Was this translation helpful? Give feedback.
-
I don't think that is the case. It first searches the directories but then reverts to system location and what is in your environment variables. I usually don't add anything here and as long as the terminal is sourced it will find them. Update: |
Beta Was this translation helpful? Give feedback.
-
The environment variable was added to support containerization like using snap. Other than that it should really never need to be used because it searches the system location for the library. |
Beta Was this translation helpful? Give feedback.
-
This piece may very well be broke and will need to look at it more closely. |
Beta Was this translation helpful? Give feedback.
-
@marip8 Did you run into a case where it was unable to find the plugin? |
Beta Was this translation helpful? Give feedback.
-
For some reason this doesn't seem to work on a ROS2 system after I have sourced my workspace and added the name of the library to the config file. It shows a search path in my tools workspace where
|
Beta Was this translation helpful? Give feedback.
-
Is |
Beta Was this translation helpful? Give feedback.
-
I also think it would be good to update the parsing of the search path to use the resource locator if possible so you may use a package url. |
Beta Was this translation helpful? Give feedback.
-
Here is the documentation for what dlopen searches. |
Beta Was this translation helpful? Give feedback.
-
@marip8 Is this library by chance in a pure cmake package? |
Beta Was this translation helpful? Give feedback.
-
No, it's in a ROS2 package.
Actually no. Turns out it was a few ROS2 errors. I forgot to add an |
Beta Was this translation helpful? Give feedback.
-
@fishbotics Were you able to integrate your ikfast? |
Beta Was this translation helpful? Give feedback.
-
@Levi-Armstrong would you be interested in adding this IKFast factory as a boilerplate file in #include <tesseract_kinematics/ikfast/ikfast_factory_boilerplate.hpp> // proposed addition to tesseract_kinematics
#include "custom_ikfast_generated_code.hpp"
TESSERACT_ADD_PLUGIN(tesseract_kinematics::IKFastInvKinFactory, MyCustomIKFastInvKinFactory) |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I'm just getting started using Tesseract and I'd like to be able to use it for the Franka Panda. In the past, I've used IKFast (because, well, it's fast), but I had to generate a new C++ file using OpenRave. In the ikfast directory, I don't see any robot-specific info. Can someone point me to how I might be able to integrate a new robot type into the IK solver?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions