RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
311 stars 70 forks source link

Leverage rcl functions to get topic of publisher/subscription #951

Closed minggangw closed 5 months ago

minggangw commented 5 months ago

This patch implements:

  1. Return the result of rcl_publisher_get_topic_name() directly, instead of splitting it by "/" and returns the last part.
  2. Use rcl_subscription_get_topic_name() to get the topic of a subscription.

Meanwhile, this patch updates the following tests:

Fix: #949, #950