Add pose trajectory script for manual PID tuning - #517
Open
AlexZhonn wants to merge 5 commits 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.
Add two scripts to support manual PID tuning without needing to run
the full mission planner:
move_poses.py: moves the sub through a sequence of poses by publishing
directly to /goal/trajectory, waiting for each pose to be reached
(within tolerance) before advancing to the next. Accepts poses as CLI
arguments (x,y,z,yaw_deg) or a YAML file.
mock_odom.py: simulates sub odometry for testing move_poses.py on a
laptop without hardware. Listens to /goal/trajectory and publishes a
fake /odometry/filtered that gradually moves toward the goal.
Included as a testing utility for when hardware is unavailable.
the reason I pushed mock_odom is that it allows anyone to validate pose trajectory logic on a laptop at any time.
Testing using mock_odom.py
terminal 1
python3 src/subjugator/scripts/mock_odom.py --start 0,0,-1,0
terminal 2
python3 src/subjugator/scripts/move_poses.py --poses 0,0,-1,0 2,0,-1,0 2,2,-1,90
Run 1 (fresh start):
Run 2 (mock_odom not restarted, started from previous position):
All poses reached within tolerance (0.3m), no timeouts.
Note: remember to restart mock_odom.py between runs, otherwise it
continues from the last position.
#505