Skip to content
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

Gpio command controller #1251

Merged
merged 68 commits into from
Nov 18, 2024

Conversation

Wiktor-99
Copy link
Contributor

@Wiktor-99 Wiktor-99 commented Aug 17, 2024

As I discussed with @christophfroehlich I've opened new pr with gpio controller.

This PR is a follow-up to the thread and implements a controller to send commands to GPIO interfaces, allowing specific command interfaces for each GPIO.

I have made the following changes compared to the original PR:

  • I utilized the 'DynamicJointState' message for both the command and state interfaces (this allows sending commands with specific GPIO values without having to worry about the order of ports in the command message).
  • I added a parameters file, and the new input parameters file will look something like this:
gpios:
  - gpio1
  - gpio2
command_interfaces:
  - gpio1:
    - ports:
      - dig1
      - dig2
  - gpio2:
    - ports:
      - ana1
  • I've done significant refactoring and have added many new UTs.

mcbed and others added 30 commits July 26, 2024 09:25
…rams struct instead.

Use default member initializer.
@christophfroehlich
Copy link
Contributor

One last comment @saikishor brought up: Using DynamicJointStates for the commands feels semantically more than wrong here. Should we add a copy and name it more appropriate? DynamicResourceValuesor something better. Even for the broadcaster it is questionable.

@Wiktor-99
Copy link
Contributor Author

Yes, I totally agree with you. Speaking of naming I would propose to add new message DynamicComponentValues, resource sounds like it could be acquired.

I've posted pr in the control_msgs repo ros-controls/control_msgs#155. When it merges, I'll align this pr.

@saikishor
Copy link
Member

@Wiktor-99 @christophfroehlich may be this PR is also missing dependency in the ros2_controllers metapkg

@christophfroehlich
Copy link
Contributor

@Wiktor-99 @christophfroehlich may be this PR is also missing dependency in the ros2_controllers metapkg

you are right!

@Wiktor-99
Copy link
Contributor Author

Yep, it had been missing. I've aligned it to use DynamicInterfaceGroupValues and fixed dependency in the meta pkg.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

I once again tested it successfully with the demo PR. One last request from my side: please add a new section to the release notes.

gpio_controllers/doc/userdoc.rst Outdated Show resolved Hide resolved
gpio_controllers/doc/userdoc.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for addressing all the comments @Wiktor-99 and @christophfroehlich

Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com>
@christophfroehlich christophfroehlich merged commit 0590c6a into ros-controls:master Nov 18, 2024
15 of 22 checks passed
mergify bot pushed a commit that referenced this pull request Nov 18, 2024
---------

Co-authored-by: m.bednarczyk <m.bednarczyk@unistra.fr>
Co-authored-by: Maciej Bednarczyk <macbednarczyk@gmail.com>
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com>
(cherry picked from commit 0590c6a)

# Conflicts:
#	doc/release_notes.rst
@christophfroehlich
Copy link
Contributor

@Wiktor-99 could you please review ros-controls/ros2_control_demos#627 ?

@Wiktor-99
Copy link
Contributor Author

@christophfroehlich Yep I'll do it, can't promise I'll do it today but tomorrow seems feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS2 humble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants