AcutronicRobotics / HRIM

An information model for robot hardware. Facilitates interoperability across modules from different robot manufacturers. Built around ROS 2.0
https://acutronicrobotics.com/technology/hrim/
Apache License 2.0
66 stars 22 forks source link

Cleanup #49

Closed ibaiape closed 5 years ago

ibaiape commented 5 years ago

Code changes have been applied to hrim.py (for the generation shorthands and their inclusion in the generate all command) and a couple of small changes to scripts/compiling.py for proper checks on the package origin.

ahcorde commented 5 years ago

I know that we can generate sensors and actuators independently. Can we add this to the help message?

ibaiape commented 5 years ago

True, on it.

Will review I'm not missing anything else.

ahcorde commented 5 years ago

I don't fully understand this

                        compose:
                            generate a composition of modules.
                        compile:
                            generate the platform-specific implementation of the passed composition.

Why we don't make it in one step?

why we want to modify a model? doing so, we are breaking the compatibility right?

ibaiape commented 5 years ago

Process is explained step-by-step in our docs.

As a sum-up:

So you wouldn't be modifying a model as much as you'd be picking the parts you'd need. It is true that your resulting packages (apart of possibly having duplicated package definitions in your HRIM folder structure if you either have multiple compositions or the results of running generate all) aren't the same as the full models (contain less interfaces).

I do feel, however, that this process could be of a lot more value later on if it the process didn't only imply interfaces & parameters. I could see this same process making much more sense if the tooling, for example, also generated some basic drivers. The best example I can get off the top of my head would be some basic "getter"/"setter" functions (taking care of the publisher&subscribers / some basic ROS plumbing).

I still can't see any way of model composition without modifying package definition, be it modifying the interfaces themselves (which completely breaks compatibility) or the current way (which could easily result in missing some interfaces).

Your thoughts on this @vmayoral?