Skip to content

Antenna encoder fix - #178

Open
Landwhich wants to merge 7 commits into
mainfrom
antenna-encoder-fix
Open

Antenna encoder fix#178
Landwhich wants to merge 7 commits into
mainfrom
antenna-encoder-fix

Conversation

@Landwhich

Copy link
Copy Markdown
Contributor

node now publishes both the target and actual encoder values

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.py remappings 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.

Comment thread src/HW-Devices/ros_roboclaw/ros_roboclaw/antenna_roboclaw_node.py Outdated
Comment thread src/HW-Devices/ros_roboclaw/ros_roboclaw/antenna_roboclaw_node.py
Comment thread src/Bringup/launch/antenna.launch.py Outdated
Landwhich and others added 3 commits July 24, 2026 22:26
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>
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# self.get_logger().info(f"target= {norm * 360:.2f}°, {self.target_encoder}")

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.

3 participants