Skip to content
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

Start porting rosidl_typesupport_fastrtps_cpp to new IDL pipeline #15

Closed
wants to merge 1 commit into from

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Nov 26, 2018

FYI @dirk-thomas I spent a little time looking at how much work it was to convert a generator by starting to convert rosidl_typesupport_fastrtps_cpp. The cmake portion and python code changes seem like they're at a reasonable state, but the templates themselves have not been updated.

The remaining work looks like the templates will need to use the new rosidl_parser.definition types, and some functions __cdr_deserialize as well as some static structs (handle, callbacks) will need the message name prefix.

In the olde pipeline the generator would generated files

msg/dds_fastrtps/<msg>__type_support.cpp
msg/<msg>__rosidl_typesupport_fastrtps_cpp.hpp

and

srv/dds_fastrtps/<srv>__request__type_support.cpp
srv/dds_fastrtps/<srv>__response__type_support.cpp
srv/dds_fastrtps/<srv>__type_support.cpp
srv/<srv>__request__rosidl_typesupport_fastrtps_cpp.hpp
srv/<srv>__response__rosidl_typesupport_fastrtps_cpp.hpp
srv/<srv>__rosidl_typesupport_fastrtps_cpp.hpp

If I understand correctly, after conversion to the new IDL pipeline it should generate just two files for any .idl file

<parent_folder>/dds_fastrtps/<name>__type_support.cpp
<parent_folder>/<name>__rosidl_typesupport_cpp.hpp

@sloretz sloretz requested a review from dirk-thomas November 26, 2018 21:51
@sloretz sloretz added the in progress Actively being worked on (Kanban column) label Nov 26, 2018
@dirk-thomas
Copy link
Member

The approach looks fine on a first look. (I haven't looked at the details yet though.) Are you planning to continue and update the templates?

@sloretz
Copy link
Contributor Author

sloretz commented Nov 27, 2018

Are you planning to continue and update the templates?

I am not planning on continuing. I opened this in the hope that someone might find it useful.

ament_target_dependencies(${rosidl_generate_interfaces_TARGET}${_target_suffix}
"fastcdr"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding fastcdr here instead of the target_link_libraries below doesn't work since it changes the library link order. fastcdr must be linked after all the other libraries.

@dirk-thomas
Copy link
Member

I cherry-picked this commit into #14 and completed the transformation of rosidl_typesupport_fastrtps_cpp. Closing this one.

@dirk-thomas dirk-thomas removed the in progress Actively being worked on (Kanban column) label Nov 30, 2018
@dirk-thomas dirk-thomas deleted the sloretz/idl-stage-7 branch November 30, 2018 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants