-
Notifications
You must be signed in to change notification settings - Fork 169
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
Bug in ros2node for showing action servers #954
Comments
Can you please tell us what version of ROS 2 you are using, and the steps you took to get the error? It looks to me like this exists on Rolling, but it is possible that we missed a backport or something. |
I'm using the current LTS, ROS2 Jazzy. Where do you find the function in the rclpy.node module? |
https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/action/__init__.py#L18 Which is implemented in https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/action/graph.py#L41 . |
Ah I see, thanks for the references! But still, in https://github.com/ros2/ros2cli/blob/acefd9c0d773e7a067a6c458455eebaa2fbc6751/ros2node/ros2node/api/__init__.py#L128C28-L128C69 the function is called as a method of the |
In theory, both should work, given that it is exported from the Node class. I think at this point it would be helpful to know what commands you are running and what is not working for you. |
I called: get_action_client_info(node=ros2_node, remote_node_name=node_name, include_hidden=True) with
This supports my previous claim, that the Node class does not have the method My suggested fix would be: def get_action_server_info(*, node, remote_node_name, include_hidden=False):
remote_node = parse_node_name(remote_node_name)
names_and_types = get_action_server_names_and_types_by_node(
node, remote_node.name, remote_node.namespace)
return [
TopicInfo(
name=n,
types=t)
for n, t in names_and_types if include_hidden or not _is_hidden_name(n)] and same for the |
How are you building or running ROS 2? Which distro are you using? If you're building ROS 2 from source, which branches are you using? |
of course not, there is no such method in
No it does not. but but i understand your claim here, the following implementation generates the confusion... ros2cli/ros2cli/ros2cli/node/direct.py Lines 67 to 79 in acefd9c
it would be appreciated if you could consider the contribution to address above TODO. |
Thanks @fujitatomoya ! |
Yep, that would be great. We've been (slowly) adding type annotations to the entire ROS 2 codebase, but as there is a lot of code it has taken quite a while. If you'd like to contribute to this effort, we'd be happy to review it. I just ask that you do small PRs adding docs or annotations, rather than one giant PR. Small PRs are easier to review and run CI for. |
Hi,
the following line causes an error for me:
https://github.com/ros2/ros2cli/blob/acefd9c0d773e7a067a6c458455eebaa2fbc6751/ros2node/ros2node/api/__init__.py#L128C28-L128C69
The called function
get_action_server_names_and_types_by_node()
does not actually exist here inrclpy.node
, see: https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/node.pyThe text was updated successfully, but these errors were encountered: