Skip to content

Use namespaces#137

Merged
wjwwood merged 6 commits intomasterfrom
use_namespaces
May 31, 2017
Merged

Use namespaces#137
wjwwood merged 6 commits intomasterfrom
use_namespaces

Conversation

@wjwwood
Copy link
Copy Markdown
Member

@wjwwood wjwwood commented May 19, 2017

This pr is part of the final set of changes needed to support namespaces. It actually change the rcl_create_* functions which take a topic or service name to expand those names and validate them before passing the fully qualified version down to rmw functions.

I still need to expose this stuff into rclcpp and rclpy, as well as implement the "avoid ros prefix option".

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented May 27, 2017

I was going to add the option to disable the ROS specific prefix in this pull request, but it makes it harder to review in my opinion (I've been applying those changes locally) because it touches a lot of otherwise unrelated stuff like how options are propagated for the publishers and subscribers. So I'd rather merge this set of pr's and open new ones for the new option.

I'm putting these in review, here's a first set of CI:

  • Linux:
    • Build Status
  • Linux-aarch64:
    • Build Status
  • macOS:
    • Build Status
  • Windows:
    • Build Status

@wjwwood wjwwood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels May 27, 2017
@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented May 30, 2017

Another set of CI with some small test related fixes:

  • Linux:
    • Build Status
  • Linux-aarch64:
    • Build Status
  • macOS:
    • Build Status
  • Windows:
    • Build Status

The remaining macOS failure is a test timeout. I think that timeout is just too close to a normal runtime. Each Connext test takes like 3-6 seconds to shutdown before then next can run. On my machine it is flaky I am going to up the timeout from 30 to 60 seconds and rerun the macOS CI, but I don't consider that a regression atm.

Please review these if you have time. Thanks.

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented May 30, 2017

See ros2/system_tests@ba60562 for the updated timeout.

Copy link
Copy Markdown
Contributor

@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.

I do +1 this, but I believe this expansion could be excluded in a separate function called get_fully_expanded_topic_name or similar as the changes in publisher, subscriber, .. are all pretty much the same given a topic/service name and a node namespace

// Expand the given service name.
rcutils_allocator_t rcutils_allocator = rcutils_get_default_allocator();
rcutils_string_map_t substitutions_map = rcutils_get_zero_initialized_string_map();
rcutils_ret_t rcutils_ret = rcutils_string_map_init(&substitutions_map, 0, rcutils_allocator);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not using the allocator from above?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, my original reasoning was that the rcutils allocator and rcl allocator might be different in the future, but I think that's not as important as using the given allocator as much as possible. I'll change this (and look for other places where I made this choice).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Have a look at 3284737.

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented May 30, 2017

Updated macOS CI is green (with updated timeout):

Build Status

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented May 30, 2017

I believe this expansion could be excluded in a separate function called get_fully_expanded_topic_name or similar as the changes in publisher, subscriber, .. are all pretty much the same given a topic/service name and a node namespace

That's true, but they are repeated because they return different errors based on some things (especially between pub/sub and client/service).

In the interest of moving this forward I'll ticket this and do it after we merge this.

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented May 31, 2017

CI after addressing comments and getting approval from @Karsten1987:

  • Linux:
    • Build Status
  • Linux-aarch64:
    • Build Status
  • macOS:
    • Build Status
  • Windows:
    • Build Status

@wjwwood wjwwood merged commit e1bfa26 into master May 31, 2017
@wjwwood wjwwood deleted the use_namespaces branch May 31, 2017 01:24
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label May 31, 2017
emersonknapp pushed a commit to aws-ros-dev/rcl that referenced this pull request Jun 3, 2019
Using ament_target_dependencies where possible
ivanpauno pushed a commit that referenced this pull request Jan 2, 2020
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