Skip to content

Name rosbag2 node uniquely #425

@dawonn-haval

Description

@dawonn-haval

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. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions