ROS2 Messages not generated for 3rd party clients
I am working on developing a swift client library for ROS2, building off of the work from @esteve on rcldotnet. I modified the generation appropriately to adapt it to swift, but messages are not being generated. It appears that it is not being properly registered with cmake. My procedure consists of cloning my repo along with common_interfaces, and building. Digging through build and install, generation occurs for c++ and python, but not swift. I would think the relevant section of the CMakeLists would be ament_index_register_resource("rosidl_generator_packages") but clearly that isn't working. If anyone has a few minutes to attempt to reproduce, I'd greatly appreciate some assistance! Clone https://github.com/atyshka/rclswift.git and build with colcon build --cmake-args " -GNinja" --event-handlers console_direct+ Note that you'll need ninja, installable via apt, and swift for linux installed via debs here: https://swift.org/download/#releases
The package
rosidl_generator_swift
declares dependencies onrmw_implementation
which isn't feasible since it introduced a circular dependency. For mecolcon
errors out right away.Assuming tests are enables it then fails since in the
package.xml
the test dependencies onament_lint_auto
andament_lint_common
are commented out even though they are used in the CMake file.Next the CMake logic fails to install the not existing executable:
bin/rosidl_generator_swift
.Then it fails to find a valid typesupport for Swift when trying to build the first message package. The macro
rosidl_generator_swift_get_typesupports
probably needs a similar fix than this one: https://github.com/ros2/rosidl_python...At this point I couldn't see where a Swift specific typesupport was supposed to come from...
I figured out the issue, I needed to build some more packages from source like rosidl and rosidl_defaults repos. Yes there are many errors still to be resolved as this is still very much an incomplete work in progress. Thanks for the tips though!
@Dirk Thomas, the package.xml works fine for me with colcon, and was copied from ros2_dotnet. Maybe file an issue there?