Skip to content

feat: dynamic services #496

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 11 commits into from
Apr 1, 2025
Merged

feat: dynamic services #496

merged 11 commits into from
Apr 1, 2025

Conversation

rachwalk
Copy link
Contributor

Purpose

To restore ability to create ROS2 actions and services through a connector

Proposed Changes

Adds creation of ROS2 actions and services to Connector API

Issues

#471

Testing

Unit tests were added, passing

@rachwalk rachwalk requested a review from maciejmajek March 31, 2025 14:00
self.T_class = get_args(self.__orig_bases__[0])[0]
self.T_class = get_args(self.__orig_bases__[-1])[0]
Copy link
Member

Choose a reason for hiding this comment

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

alt

Comment on lines 243 to 262
def test_ros2ari_connector_action_call(ros_setup: None, request: pytest.FixtureRequest):
action_name = "navigate_to_pose"
connector = ROS2ARIConnector()
mock_callback = MagicMock()
mock_callback.return_value = NavigateToPose.Result()

try:
action_server_handle = connector.create_action(
action_name,
generate_feedback_callback=mock_callback,
action_type="nav2_msgs/action/NavigateToPose",
)
assert action_server_handle is not None
except Exception as e:
raise e

try:
action_client = TestActionClient()
executors, threads = multi_threaded_spinner([action_client])
action_client.send_goal()
time.sleep(0.01)
finally:
shutdown_executors_and_threads(executors, threads)
assert mock_callback.called
Copy link
Member

Choose a reason for hiding this comment

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

Please extend the action tests to include sending feedback and cancelling action.

Copy link
Member

@maciejmajek maciejmajek left a comment

Choose a reason for hiding this comment

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

LGTM, minimal changes to tests requested

@maciejmajek maciejmajek self-requested a review March 31, 2025 15:25
@rachwalk rachwalk self-assigned this Mar 31, 2025
@rachwalk rachwalk force-pushed the feat/dynamic-services branch from b026c45 to 0bc5be1 Compare April 1, 2025 10:19
@maciejmajek maciejmajek merged commit a1f03ee into development Apr 1, 2025
5 checks passed
@maciejmajek maciejmajek deleted the feat/dynamic-services branch April 1, 2025 10:28
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