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

Name rosbag2 node uniquely #425

Open
dawonn-haval opened this issue Jun 1, 2020 · 4 comments · May be fixed by #1432
Open

Name rosbag2 node uniquely #425

dawonn-haval opened this issue Jun 1, 2020 · 4 comments · May be fixed by #1432
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@dawonn-haval
Copy link

dawonn-haval commented Jun 1, 2020

Description

The Node Name is always _ros2cli_rosbag2. This doesn't affect the functionality in any harmful way currently, but it is not very clean, and if we ever do expose Services or Actions for rosbag2 interaction then it will become a problem.

Add some unique suffix/prefix to the node name.

Expected Behavior

Unique Node Names.

Actual Behavior

$ ros2 topic info -v /str1
Type: std_msgs/msg/String

Publisher count: 1

Node name: _ros2cli_554
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 01.0f.1b.26.2a.02.00.00.01.00.00.00.00.00.05.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 1

Node name: _ros2cli_rosbag2
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: SUBSCRIPTION
GID: 01.0f.bd.21.d9.50.00.00.01.00.00.00.00.00.12.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

To Reproduce

run multiple instances of ros bag. I have one that records 'vital' information for reports, and another that records sensor data for post-mortem debugging.

System (please complete the following information)

  • OS: Ubuntu 20.04
  • ROS 2 Distro: Foxy
  • Version: bfa6319

Additional context

Again, I'm not sure if this is a real bug. I just happened to notice it and wasn't sure of a better forum to ask. :)

@dawonn-haval dawonn-haval added the bug Something isn't working label Jun 1, 2020
@emersonknapp
Copy link
Collaborator

I'm inclined to close this as "not an issue" - DDS doesn't require unique node names, and ROS 2 has no mechanism for it either (yet) - conversation around it in ros2/design#187

@emersonknapp
Copy link
Collaborator

However... suffixing the process ID might be a fine idea, so maybe we can keep this open as an enhancement. These node names for cli tools are all very "under the hood" anyways, so users don't really interact with them. Since DDS is anonymous pub-sub, the only place where this really comes into play is if we expose Services or Actions from the rosbag2 node, because the node name then becomes part of a topic names, which does affect behavior.

@emersonknapp emersonknapp changed the title DDS Node Name not unique Name rosbag2 node uniquely Jul 17, 2020
@emersonknapp emersonknapp added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers and removed bug Something isn't working labels Jul 17, 2020
@iwasinnam
Copy link

Now that ~/snapshot interface exists, this has become an issue...

@emersonknapp
Copy link
Collaborator

emersonknapp commented Jul 25, 2023

Yes, there are now a variety of exposed services for both Recorder and Player, and they all are unusable with non-unique names. I'll note that since #1180, users can now specify --node-name to Recorder manually choose a unique name for their nodes (one could even use e.g. uuid to generate them in python launchfiles). So at least there is a way to accomplish this.

However, the solution is (I think) so simple, that I'm going to put up a draft PR momentarily to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
3 participants