Closed RalphCodesTheInternet closed 3 years ago
See the Node#getTopicNamesAndTypes() method http://robotwebtools.org/rclnodejs/docs/0.20.0/Node.html
I believe this is equivalent to using ros2 cli:
ros2 topic list
ros2 topic info <topic>
ros2 topic type <typename>
//edited Also check out this example for exposure to additional useful api: https://github.com/RobotWebTools/rclnodejs/blob/develop/example/ros-graph-example.js I confirmed that while this example includes it's own publishers, subscribers and services, the api provides access to the full ros graph.
This is exactly what I was looking for. Thank you so much!
With rclpy and rclcpp there are ways you can get a list of all the topics and their types. I could not find a way of doing it with rclnodejs. It would be a great feature to add