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

force lower case for ros package name #12

Merged
merged 12 commits into from
Mar 26, 2020
Merged

Conversation

jeising
Copy link
Contributor

@jeising jeising commented Feb 28, 2020

To be able to use iceoryxs native applications with ros 2 based applications the package name defined from service and event name must be valid for ros 2 as package name. Forcing lowercase in the package name only partially fixes this issue. As far as I know there are changes planned regarding types in iceoryx, so I would propose this fix, till we can focus on the new type handling.

@Karsten1987
Copy link
Collaborator

Can you please rebase this PR?

@jeising jeising force-pushed the patch-1 branch 3 times, most recently from 345c192 to 4a0437d Compare March 6, 2020 19:59
@jeising
Copy link
Contributor Author

jeising commented Mar 6, 2020

@Karsten1987: Should be fine now

@jeising
Copy link
Contributor Author

jeising commented Mar 10, 2020

@Karsten1987: Is there anything missing and keeps us from merging this PR?

@jeising
Copy link
Contributor Author

jeising commented Mar 17, 2020

@michael-poehnl & @Karsten1987: Please review this change :)

Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

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

Thanks @jeising for the patch and please apologize for the late response.

I do request changes mainly for the get_service_description_elements function, as I think that change can be re-written in a more readable way.

Also, I know I am asking a lot here, but I would highly appreciate if you would go the extra mile and actually add unit tests for this logic. I think that stuff should definitely be tested. It's fine if you don't want to do that. I'd open a follow-up ticket for it then.

rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved
rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved
rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved
@Karsten1987 Karsten1987 self-assigned this Mar 17, 2020
@Karsten1987 Karsten1987 added the enhancement New feature or request label Mar 17, 2020
@Karsten1987
Copy link
Collaborator

As far as I know there are changes planned regarding types in iceoryx, so I would propose this fix, till we can focus on the new type handling.

@michael-poehnl What's the status on this? Is there something new coming to iceoryx?

rmw_iceoryx_cpp/package.xml Outdated Show resolved Hide resolved
rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved
rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved
rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved
rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved
rmw_iceoryx_cpp/test/iceoryx_name_conversion_test.cpp Outdated Show resolved Hide resolved
@jeising
Copy link
Contributor Author

jeising commented Mar 23, 2020

@Karsten1987: Thanks for your comments! As you can see e.g. in the tests I am not done with the changes yet. I'll ping you once the PR is ready again. I feel "push early" is good to avoid code loss.

@Karsten1987 Karsten1987 requested a review from budrus March 24, 2020 19:02
@jsqu4re
Copy link

jsqu4re commented Mar 25, 2020

@Karsten1987 & @michael-poehnl: Feel free to review the code, thx!

@budrus
Copy link
Collaborator

budrus commented Mar 26, 2020

.

As far as I know there are changes planned regarding types in iceoryx, so I would propose this fix, till we can focus on the new type handling.

@michael-poehnl What's the status on this? Is there something new coming to iceoryx?

I'm not sure what @jeising has in mind. There is no type support topic in the near future planned. Frameworks like ROS2 or eCAL solve this on top of iceoryx. So far iceoryx is data agnostic

@jeising
Copy link
Contributor Author

jeising commented Mar 26, 2020

I'm not sure what @jeising has in mind. There is no type support topic in the near future planned. Frameworks like ROS2 or eCAL solve this on top of iceoryx. So far iceoryx is data agnostic

Hm .. I thought I read it somewhere
Sorry for the confusion

@budrus
Copy link
Collaborator

budrus commented Mar 26, 2020

We have to rebase because of #14
The passing of std::string to iceoryx methods which expect our fixed string changed. (Explicit truncate must be stated). See here
https://github.com/ros2/rmw_iceoryx/pull/14/files

Maybe this also affects your test.

Johannes Jeising added 7 commits March 26, 2020 18:57
To be able to use `iceoryx`s native applications with `ros 2` based applications the package name defined from service and event name must be valid for `ros 2` as package name. Forcing lowercase in the package name only partially fixes this issue. As far as I know there are changes planned regarding types in `iceoryx`, so I would propose this fix, till we can focus on the new type handling.

Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Johannes Jeising added 3 commits March 26, 2020 18:57
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
rmw_iceoryx_cpp/src/internal/iceoryx_name_conversion.cpp Outdated Show resolved Hide resolved

TEST(NameConverisonTests, get_service_description_elements_revers)
{
auto service_description = rmw_iceoryx_cpp::get_service_description_elements(
Copy link
Collaborator

Choose a reason for hiding this comment

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

why does this API have to be public? Can't we just test get_name_n_type_from_iceoryx_service_description and validate the string with std::get<0>?

Copy link
Contributor Author

@jeising jeising Mar 26, 2020

Choose a reason for hiding this comment

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

I guess you mean get_iceoryx_service_description. The issue is that there is a type support required and I had no idea, where to get it from. I also did not want to start mocking it.
And mocking extract_type(,,) in the same cpp file seems impossible.

@Karsten1987 Karsten1987 mentioned this pull request Mar 26, 2020
Johannes Jeising added 2 commits March 26, 2020 20:34
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Signed-off-by: Johannes Jeising <Johannes.Jeising@de.bosch.com>
Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

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

Thanks @jeising. It took me quite a bit to see what's actually happening here, but essentially your last commit and renaming the functions made the deal :)

@Karsten1987 Karsten1987 merged commit 5632b3f into ros2:master Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants