-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interop with DDS application using existing .idl files #86
Comments
Hi @maspe36, The problem comes from your use of keys, which is not supported by ROS 2. Even though the ROS 2 code generator is able to parse your IDL, I suspect that the
The solution implemented by Now, coming to possible solutions to your problem, there aren't any available if you need to use keys and want to rely only on the ROS 2 API. If you want to continue to use keys, you could extend your ROS 2 application to access the underlying DDS DomainParticipant using Connext's "modern" C++ API, assuming you are running with I have personally been experimenting with creating some helper APIs to simplify this use case of "hybrid" ROS 2/Connext applications by extending the Node class with some helper methods to create readers and writers in a more ROS-like fashion. The APIs also automatically apply ROS naming conventions for the topic name and support resolving topic name remappings. If using Connext's native APIs is not an option for some reason, you will need to further modify the data model used by your ROS 2 components to drop the key annotations. This of course will also mean changing the data types on your "native" Connext endpoints in order to make them match, and, maybe most importantly, losing all the advantages provided by topic instances. If you want to go down this road, and try to limit the scope of "data model changes" in your system, you might want to consider introducing a "bridge component" to mediate between the types, possibly implemented by using the SDK provided by RTI Routing Service. |
Hey thanks for the detailed response! I will say upfront I am no expert but here goes nothing.
Yeah I did some reading on this before I started working on this and I stumbled across a couple, of discussions that seem to imply that it is up to the rmw implementation to use the keyed field. The generated "rosidl" file actually does have the
I can understand re-using code, but in this case you can't even parse the same idl files as a native application. For example in the top post, you can see I had to explicitly add the module namespace to my included type (
Was this caused by
Wow this looks great. This is exactly what my mind jumped to as I was reading your top comments. I'll take a look at this and maybe experiment myself with a python version. |
I'm trying to create a ROS2 node that can listen to messages being published from an existing DDS application. I think I've checked most of the regular interop checkboxes, however still no luck with the interop
rt/
I created a message package where I try to pass my existing .idl files into the
rosidl_generate_interfaces
cmake function. However it seems like we depend on rosidl_typesupport_fastrtps_cpp to parse the idl files. This means I cannot use the exact same .idl files as I do in my existing DDS application. Even when I strip the .idl down (No constants, nousing
s, etc..) to something that is parseable by fastrtps, the generated type doesn't seem to lineup with the type used by my DDS application. Verified this assumption inrtiadminconsole
.idl's as they are defined in my ROS2 package
my_msgs/msg/header.idl
my_msgs/msg/telemetry.idl
CMakeLists.txt
package.xml
Defined in my DDS application
header.idl
telemetry.idl
It seems like I should be using rosidl_typesupport_connext as it uses rtiddsgen. But its not supported for galactic and up under the guise that this is the new rmw implementation ros2/rosidl_typesupport_connext#70.
Am I missing something?
The text was updated successfully, but these errors were encountered: