2026sp Teensy and Jetson Integration#137
Open
nizhnerk wants to merge 65 commits into
Open
Conversation
…eason. BIGGEST CHANGES: 1) different PWM values for rudder and sail, 2) using law of cosines for sail instead of linear mapping. Added some constants to constants.hpp accordingly.
…sailbot into teensy_2026sp
…n all relevant files.
…eady to flesh out with jib servo information.
…dge while still leaving placeholders in for jib control behavior still. - Teensy code is updated to include jib port/starboard bytes, expand the serial buffers, add jib servo attach/init plus mapping helpers, and pass jib telemetry through teensy.py/teensy_node.py so jib values are visible in ROS. - We still need to finalize jib hardware constants and calibration (constants.hpp), implement actual jib actuation/linked-side logic in ServoControlTask::execute(), and define the final jib protocol conventions (bounds/sign/offset + command topic wiring) before enabling full closed-loop jib control.
This reverts commit ae18d03.
Drop stale partial packets between loop iterations and while processing incoming bytes so malformed or delayed frames recover cleanly. Made-with: Cursor
- Reorganized SerialMonitor.cpp for clarity and removed immediate writing into sfr fields (this is handled in ServoControlTask). Added a helper method. - Removed redundant send_telemetry flag from sfr and added a buffer_length field.
…iles respectively.
…osines stuff accordingly.
…e functions static.
Mux subscribes to per-source jib_angle and jib_side_flag, forwards both topics only when values are present for the active mode. Teensy node subscribes to jib_angle and jib_side_flag, merges them with sail and rudder in _send_command_to_teensy for a single serial packet. Remove unused SailTail import; clarify rx_period comment.
…or the law of cosines mapping method.
…ion logic, added functionality for jib, standardize convention wrt "mainsail".
…e do bounds check on the serial values; rudder angle updated to 2025-2026 season; documentation updates.
…" when talking specifically about the mainsail instead of just "sail".
…ions to use "mainsail" when talking specifically about the mainsail instead of just "sail".
…onding files. Reviewed ROS side algo codebase; now ready for PR.
…l switch back to jetson if radio disconnects
… left TODO for actuation issue.
…ll that's left is to nail down constants.
… min pulses don't need to correspond with SERVO_MIN_PULSE
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.
Handling sailing with a jib this season required some new logic, both for physical servo actuation on the Teensy and for higher-level sailing decisions and ROS plumbing on the Jetson. We also took this as an opportunity to debug and better modularize existing code on both sides, and generally bring the codebase up to date (documentation, terminology conventions, style, etc). Here is a summary of the most important additions:
Teensy side
TODOflags where appropriate).Jetson/ROS side
trim_sail.pyROS node logic in order to consistently map the jib similarly to the mainsail.constants.pyfile in the same way that we have aconstants.hppfile on the Teensy side.We naturally had to update the Serial protocols globally so that both sides were prepared to receive and send the same information back and forth.