Skip to content

Added ActionType service and related functionality #1046

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

Merged
merged 7 commits into from
Jun 20, 2025

Conversation

chaitanya-mandala
Copy link
Contributor

  • Introduced ActionType service to retrieve the type of a specified ROS action.
  • Updated proxy to include logic for determining action types based on existing action servers.
  • Modified rosapi_node to create the new ActionType service endpoint.
  • Added ActionType message definition in rosapi_msgs.

- Introduced ActionType service to retrieve the type of a specified ROS action.
- Updated proxy to include logic for determining action types based on existing action servers.
- Modified rosapi_node to create the new ActionType service endpoint.
- Added ActionType message definition in rosapi_msgs.
@bjsowa
Copy link
Collaborator

bjsowa commented Jun 19, 2025

@chaitanya-mandala Why not use _node.get_action_names_and_types() instead of identifying actions by hidden topics?

…ed action type retrieval. Removed outdated logic for action server filtering and topic name extraction.
@chaitanya-mandala
Copy link
Contributor Author

@chaitanya-mandala Why not use _node.get_action_names_and_types() instead of identifying actions by hidden topics?

@bjsowa Thank you for the insightful suggestion! I've updated the get_action_type() function to utilize the official graph call from the ros2action library and the functionality remains consistent.

Here is test Result

chaitu@chaitu:~$ ros2 service call /rosapi/action_type rosapi_msgs/srv/ActionType '{action: "/fibonacci"}'
requester: making request: rosapi_msgs.srv.ActionType_Request(action='/fibonacci')

response:
rosapi_msgs.srv.ActionType_Response(type='action_tutorials_interfaces/action/Fibonacci')

…lt to False for consistency with other functions.
Copy link
Collaborator

@bjsowa bjsowa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much simpler this way. Personally, I would rather use the method from rclpy directly instead of wrappers from ros2cli packages but since other proxy methods are also implemented this way, we can leave this and change in future code refactor.

The only change request I have is to add ros2action to package dependencies

@chaitanya-mandala
Copy link
Contributor Author

Looks much simpler this way. Personally, I would rather use the method from rclpy directly instead of wrappers from ros2cli packages but since other proxy methods are also implemented this way, we can leave this and change in future code refactor.

The only change request I have is to add ros2action to package dependencies

Thank you for your feedback! I've added ros2action dependency in the package.xml.

@bjsowa bjsowa enabled auto-merge (squash) June 20, 2025 10:07
@bjsowa bjsowa merged commit 2ed864b into RobotWebTools:ros2 Jun 20, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants