moveit / moveit_ikfast

THIS REPO HAS MOVED TO https://github.com/ros-planning/moveit
12 stars 20 forks source link

IKFast is not easily used as a library #46

Open shaun-edwards opened 9 years ago

shaun-edwards commented 9 years ago

The current package generated by moveit_ikfast is not easily used as a library. Some ikfast functionality, such as returning multiple IK results, may be useful. Because such functionality is outside the IK plugin definition, it is not generally available. The following is a list of issues that prevent a generated package from being included as a library:

shaun-edwards commented 9 years ago

I'd like to address this, but I wanted to pose the issue for discussion first.

davetcoleman commented 9 years ago

These are all good changes to make - I agree this package needs a lot of cleanup!

shaun-edwards commented 9 years ago

I've done a little more research into this. One big problem I ran into is if a plugin and library are loaded in the same application, then not only do they have to be from different packages, but the namespaces must be different (normally this is ensured by using the package name as a namespace). In our particular application, where we load moveit and the ik as a library, we ran into this problem.

The "best" solution I have been able to come up with is to make ikfast a header only library and use macros to ensure the namespaces are unique. This approach results in 3 ikfast packages, one header only library, one plugin, and one library. I'll be able to show an example of this soon, but if anybody has any comments, please share.

mikeferguson commented 9 years ago

@shaun-edwards I'm sure there is a way around that -- we regularly create ROS-agnostic libraries and load them inside ROS-bound plugins (MoveIt itself does a lot of this). The class names certainly need to be different, but I highly doubt one needs to create different packages.

shaun-edwards commented 9 years ago

@mikeferguson, thanks for the help. If I understand correctly, you are proposing that we have 2 packages; one that creates a library and a second that wraps it in a plugin. This does make more sense.