pyros-dev / pyros-msgs

ROS messages and service definitions for use with pyros
MIT License
0 stars 3 forks source link

Improve how we generate messages #7

Closed asmodehn closed 7 years ago

asmodehn commented 7 years ago

To generate python messages classes, catkin uses genpy.

To manage our package as a pure python package, the message generation must be left to the last moment (the Third Party Release patch), but we also need to be able to use messages in pure python (for development, testing, etc.), to interface with ROS systems, without having a ROS catkin package.

I currently implemented a hacky way from python setup.py generatemsg : https://github.com/asmodehn/pyros-msgs/blob/nested_implement/setup.py#L54 but we need to improve that.

The goal is to have a message generation pipeline in pure python that is the same as the message generation pipeline that is happening with catkin, for python generated classes.

This way we could have a pure python package, using predefined ROS messages.

This is also related to https://github.com/ros/genpy/issues/81, which will make that workflow much simpler.

asmodehn commented 7 years ago

I implemented for now a simple couple of .pth to a git submodule, to be able to get genpy and genmsg code from pure python. We should be fine with this for a while.

Also implemented a module, wrapping around genpy + genmsg, to generate messages dynamically.

It is also possible to import them, but the API is not clean. We should still implement a custom importer, in order to follow the "official" python way to import custom python code originating from another kind of file...

asmodehn commented 7 years ago

Custom importer has been done in https://github.com/asmodehn/rosimport. Closing