modify stage 1 and add stage 3#7
Open
minigithubo wants to merge 1 commit into
Open
Conversation
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.
Summary
This PR adds Stage 2 integration and Stage 3 GPS output to the existing Stage 1 physics simulator running on the Router Arduino Due.
Changes
Stage 2 (PC → Router): ASCII command input
readScriptCommand()to receive ASCII drive commands from PC simulator over USB Serial"CANID,nbytes,speed_cmPs,brake,mode,angle_tenths""350,6,1500,0,1,-21"= 1.5 m/s, no brake, mode 1, -2.1° left turn#"1000,350,6,1500,0,1,-21"CMD: speed=X brake=X mode=X angle=XuseScriptCommandflag is set and speed/angle are applied directly instead of using the fixed throttle modelStage 3 (Router → PC): Binary GPS output
sendOrigin()- sends binary 0x251 packet once at startup with UW Bothell GPS origin (47.760934, -122.189963)sendPosition()- sends binary 0x4C0 packet every 100ms with east_cm and north_cmBug fix: heading update in
updatePosition()heading += angle / 100toheading += angle / 10Tested
Reference
https://www.elcanoproject.org/wiki/Communication