Antenna encoder fix - #178
Open
Landwhich wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the antenna pointing + RoboClaw integration so the system publishes a target bearing and an actual bearing (derived from encoder counts), with updated topic names/remappings in the bringup launch file.
Changes:
- Renames the antenna pointing output topic and publishes the target bearing in radians (no RoboClaw-specific normalization).
- Updates the RoboClaw antenna node to subscribe to a “desired position” topic and publish the measured position.
- Adjusts
antenna.launch.pyremappings for the new desired/actual topics (and currently comments out the base-station GPS node).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/Nav/gps/gps/antenna_pointing_node.py |
Publishes target bearing in radians on /antenna/target_bearing. |
src/HW-Devices/ros_roboclaw/ros_roboclaw/antenna_roboclaw_node.py |
Consumes desired bearing topic and publishes an angle derived from the encoder reading. |
src/Bringup/launch/antenna.launch.py |
Updates remappings for desired vs actual antenna topics; base-station node block is commented out. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
codeflight1
requested changes
Jul 30, 2026
| msg.data = float(bearing) / ( | ||
| math.pi * 2 | ||
| ) # normalize the output for the roboclaw | ||
| msg.data = float(bearing) # radians follow the ros standard, don't normalize |
Contributor
There was a problem hiding this comment.
Suggested change
| msg.data = float(bearing) # radians follow the ros standard, don't normalize | |
| msg.data = float(bearing) |
| error = self.wrap_error(self.target_encoder - self.current_encoder) | ||
|
|
||
| self.get_logger().info(f"target= {norm * 360:.2f}°, {self.target_encoder}") | ||
| # self.get_logger().info(f"target= {norm * 360:.2f}°, {self.target_encoder}") |
Contributor
There was a problem hiding this comment.
Suggested change
| # self.get_logger().info(f"target= {norm * 360:.2f}°, {self.target_encoder}") |
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.
node now publishes both the target and actual encoder values