RoboDK post processors

Hey there,

So we have these nice open source RoboDK post-processors that were made available just for us.
I’ve been using my Fanuc post processor for a while and now I need a Motoman post-processor.

We already had a discussion on how we should implement these post-processors in ROS:

Here is my first working attempt:

How it works

The RoboDK are python scripts that are included in the repository as a submodule (don’t forget to initialize the submodules otherwise it won’t work). I have added a __init__.py to make sure Python treats the directory as a package.

The RoboDK post processors have a common interface for every robot and also specialized functions/members.
I have described ROS services that exposes the common interface.

If the services are called with the right arguments and in the right order it is possible to generate programs for different robots. (at the moment only Motoman and Fanuc R30ia are in my test package)

Caveats

There are many with this approach:

  • How to add custom commands for each post processor? (eg: GO[1]=6 on Fanuc, which may not have an equivalent on other robots)
  • How to handle external axes? groups?
  • How to add an option on a pose? (I use it a lot on Fanuc, not sure if it is useful for other robots)
  • How to handle multi-program generation? (when generating a lot of poses, it is common to split the program into multiple programs)

How would you approach the problem?

Some news:

I fail to run tests on the python scripts, help would be appreciated: https://gitlab.com/InstitutMaupertuis/ros_robodk_post_processors/merge_requests/5

I have found an easy way to add custom commands for each post processor, specific services are defined in the corresponding srv sub directory, then a separate python script defines the services servers motoman.py. This way the common services and specific services are nicely separated. Service returns with an error if the current post processor does not correspond to the service called (eg: using a Fanuc post processor and calling a motoman specific service).

This approach seems to be working fine but I have not yet looked at the other items in the bullet list of the first post.

I don’t have a gitlab account, so replying here: what sort of help are you looking for @VictorLamoine?

Someone to look at the code and help me find out why the tests are not passing;

It could be a merge request or just a hint about what’s wrong in my package!