How to automate inclusion of custom message types into MicroROS Agent build?
While adding my own custom message type, I'd like to automate the creation of the custom agent package within my existing source tree, without having to invoke the create_agent_ws.sh
, build_agent_ws.sh
etc files as an out-of-band task.
I can't seem to find any integration (or example) of this in the colcon-cmake mixin. Based on the micro_ros_setup
repository, to add a custom message type to the agent, one must update the agent_uros_package.repos file to add a link to the new message package. However, that requires maintaining a forked micro_ros_setup
repository for just that one .repos file, which I definitely don't want to do (for numerous reasons).
I'd like to be able to inject these additional message types into the agent build, using a similar approach as is exposed by the micro_ros_arduino
and micro_ros_platformio
packages (i.e, to add an extra_packages.repos
file, and/or extra package folders). Presumably, this would require a wrapper
package -- let's call it my_agent_builder
-- and a custom cmake function that would associate those steps with the build
target, and would have the following layout:
my_agent_builder\
extra_packages\
<package1>\
<package2>\
...
extra_repos.repos
CMakeLists.txt <== Some custom function to integrate extra packages into the agent build?
Questions:
- Is there any existing example or implementation of this that I could use? Github link would be awesome.
- If not, could someone be so kind as to post such an example?
- If not, is such a colcon mix-in being planned for development?
- Am I overlooking a simpler way of including all this into a colcon build task/target?