Skip to content

Add pose trajectory script for manual PID tuning - #517

Open
AlexZhonn wants to merge 5 commits into
mainfrom
zhuen/auto-pid-tuner
Open

Add pose trajectory script for manual PID tuning#517
AlexZhonn wants to merge 5 commits into
mainfrom
zhuen/auto-pid-tuner

Conversation

@AlexZhonn

@AlexZhonn AlexZhonn commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

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):

[1/3] Goal → x=0.00  y=0.00  z=-1.00   Reached in 0.0s  (dist=0.000m)
[2/3] Goal → x=2.00  y=0.00  z=-1.00   Reached in 5.7s  (dist=0.290m)
[3/3] Goal → x=2.00  y=2.00  z=-1.00   Reached in 5.7s  (dist=0.296m)

Run 2 (mock_odom not restarted, started from previous position):

[1/3] Goal → x=0.00  y=0.00  z=-1.00   Reached in 8.4s  (dist=0.293m)
[2/3] Goal → x=2.00  y=0.00  z=-1.00   Reached in 5.0s  (dist=0.289m)
[3/3] Goal → x=2.00  y=5.00  z=-1.00   Reached in 15.6s (dist=0.295m)

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

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.

1 participant