ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
173 stars 159 forks source link

`get_action_names_and_types` is not implemented by the rclpy node class #748

Open alsora opened 2 years ago

alsora commented 2 years ago

Bug report

The get_action_names_and_types API defined here https://github.com/ros2/ros2cli/blob/rolling/ros2action/ros2action/api/__init__.py calls an homonym method on the Node rclpy class. It looks like this function is not implemented.

This problem applies to both Galactic and Humble.

Is there a reason for that? Which of the two libraries (ros2cli or rclpy) should be updated?

fujitatomoya commented 2 years ago

I may be mistaken...

https://github.com/ros2/ros2cli/blob/fc02ffe4c9b242da9b50e4c9c8a8c94fdd58f0c7/ros2action/ros2action/api/__init__.py#L60-L61

will call either of the following?

https://github.com/ros2/rclpy/blob/6c0847a70df2a359c28ffae7e49ece2e62c1794d/rclpy/src/rclpy/node.cpp#L567-L569

https://github.com/ros2/ros2cli/blob/fc02ffe4c9b242da9b50e4c9c8a8c94fdd58f0c7/ros2cli/ros2cli/daemon/__init__.py#L87

alsora commented 2 years ago

Interesting, I didn't see that cpp/python binding, however the rclpy node python class does not expose that function. We have the similar functions for topics and services, but not the one for actions.

https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/node.py#L1878

fujitatomoya commented 2 years ago

rclpy node python class does not expose that function.

(rclpy.action does) but agree, this seems to be inconsistent for me.