feat: add headlight node#174
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new ROS 2 node in the gpio_controller package to control left/right headlights via Linux PWM sysfs, and updates development container runtime permissions to support the needed hardware access.
Changes:
- Register a new
headlightsconsole script entry point for the gpio controller package. - Introduce
HeadlightNodeto export/configure PWM and subscribe to left/right headlight duty-cycle topics. - Add an extra group to the Jetson devcontainer run args to match the host’s GPIO/PWM access model.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/HW-Devices/gpio_controller/setup.py | Adds the new headlights console script entry point. |
| src/HW-Devices/gpio_controller/gpio_controller/headlights.py | New ROS 2 node implementing PWM sysfs setup and topic-driven headlight control. |
| .devcontainer/jetson/devcontainer.json | Adds an additional --group-add for hardware access in the dev container. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
codeflight1
approved these changes
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I haven't added it to any launch file yet - not sure where you want it since it is only used in 1 task.
gpio group outside the container maps to that number so that's why we need to add it to the dev container config.