Skip to content

Add GPIO Tool controller - Controller that can manage different tools (grippers, lifts, forks) and states (automatic/manual) that can be set and determined using IOs (analog or digital)#1439

Open
sachinkum0009 wants to merge 103 commits intoros-controls:masterfrom
b-robotized-forks:io_gripper_controller
Open

Conversation

@sachinkum0009
Copy link
Copy Markdown

@sachinkum0009 sachinkum0009 commented Dec 21, 2024

This Pull Request introduces the IO Gripper Controller, an implementation for controlling a gripper using IOs. The controller supports functionalities such as open, close, and reconfigure, which can be triggered either through an Action Server or a Service Server. Additionally, the controller publishes the gripper’s state via joint_states and provides dynamic_interfaces to expose all command and state interfaces.

Features

  • Action and Service Integration: Offers flexible control of gripper operations through action or service calls.
  • State Publishing: Continuously publishes the gripper's joint states and dynamic interface values for real-time monitoring.

Interfaces

Published Topics

  1. joint_states [sensor_msgs::msg::JointState]:

    • Publishes the state of the gripper joint and its configuration joint.
  2. dynamic_interfaces [control_msgs::msg::DynamicInterfaceValues]:

    • Publishes all command and state interfaces related to the gripper's IOs and sensors.

This addition enables better modular control of robotic grippers, paving the way for seamless integration in complex robotic systems.

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

  1. Limited scope. Your PR should do one thing or one set of things. Avoid adding “random fixes” to PRs. Put those on separate PRs.
  2. Give your PR a descriptive title. Add a short summary, if required.
  3. Make sure the pipeline is green.
  4. Don’t be afraid to request reviews from maintainers.
  5. New code = new tests. If you are adding new functionality, always make sure to add some tests exercising the code and serving as live documentation of your original intention.

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

Tests finalized by @destogl

The tests are written with the friendly help of Claude Code using the patterns from other controllers.

@sachinkum0009
Copy link
Copy Markdown
Author

This PR depends on this PR

Copy link
Copy Markdown
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

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

First set of comments. The second one comes tomorrow.

@sachinkum0009 sachinkum0009 marked this pull request as draft January 2, 2025 14:55
@destogl destogl force-pushed the io_gripper_controller branch from 2b01517 to 311a37d Compare March 28, 2026 11:15
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 93.40855% with 111 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.54%. Comparing base (fafccb5) to head (5a69333).

Files with missing lines Patch % Lines
gpio_controllers/src/gpio_tool_controller.cpp 88.88% 51 Missing and 26 partials ⚠️
..._controller/test_gpio_tool_controller_executor.cpp 92.08% 9 Missing and 13 partials ⚠️
...gpio_tool_controller/test_gpio_tool_controller.hpp 93.71% 7 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1439      +/-   ##
==========================================
+ Coverage   84.68%   85.54%   +0.86%     
==========================================
  Files         153      166      +13     
  Lines       15318    17002    +1684     
  Branches     1332     1431      +99     
==========================================
+ Hits        12972    14545    +1573     
- Misses       1858     1925      +67     
- Partials      488      532      +44     
Flag Coverage Δ
unittests 85.54% <93.40%> (+0.86%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...gpio_tool_controller/test_gpio_tool_controller.cpp 100.00% <100.00%> (ø)
...roller/test_gpio_tool_controller_all_param_set.cpp 100.00% <100.00%> (ø)
...ool_controller/test_gpio_tool_controller_close.cpp 100.00% <100.00%> (ø)
...controller/test_gpio_tool_controller_lifecycle.cpp 100.00% <100.00%> (ø)
...tool_controller/test_gpio_tool_controller_open.cpp 100.00% <100.00%> (ø)
...er/test_gpio_tool_controller_open_close_action.cpp 100.00% <100.00%> (ø)
...ntroller/test_gpio_tool_controller_reconfigure.cpp 100.00% <100.00%> (ø)
...r/test_gpio_tool_controller_reconfigure_action.cpp 100.00% <100.00%> (ø)
...troller/test_gpio_tool_controller_service_mode.cpp 100.00% <100.00%> (ø)
...ontrollers/test/test_load_gpio_tool_controller.cpp 100.00% <100.00%> (ø)
... and 3 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@destogl destogl marked this pull request as ready for review April 8, 2026 17:14
@destogl destogl requested review from bmagyar and destogl April 8, 2026 17:19
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.

5 participants