Skip to content

GoPiGo3 Runtime: convert URML LFU frame to GoPiGo3 RFD frame in orbit() and turn_degrees()#602

Open
slowrunner wants to merge 2 commits into
URML-MARS:mainfrom
slowrunner:main
Open

GoPiGo3 Runtime: convert URML LFU frame to GoPiGo3 RFD frame in orbit() and turn_degrees()#602
slowrunner wants to merge 2 commits into
URML-MARS:mainfrom
slowrunner:main

Conversation

@slowrunner

@slowrunner slowrunner commented Jul 7, 2026

Copy link
Copy Markdown

Per Issue #598
and Issue #591

What changed and why

gopigo3_adapter.py - the GoPiGo3 Runtime must convert the URML Left-Front-Up frame
to the GoPiGo3 Right-Front-Down frame

Calls to easygopigo3.orbit(arc,radius_cm) and .turn_degrees(angle) have negated arc and angle

Linked RFC

  • Not required — this is implementation only, no spec change.

How it was tested

Using test_orbit_turn.urml.yaml containing:

(gopigo3) ubuntu@U26LDave:~/Fork_URML_For_GoPiGo3/examples/gopigo3$ more test_orbit_turn.urml.yaml 
profile: educational
behavior:
  type: sequence
  on_error: abort_and_report
  steps:
  - drive:
      distance: 0.25
      speed: 0.15
  - turn:
      angle: 360
  - drive:
      radius: 0.1
      arc: 180

Dry Run:

(gopigo3) ubuntu@U26LDave:~/Fork_URML_For_GoPiGo3/examples/gopigo3$ python3 run_gopigo3.py -f test_orbit_turn.urml.yaml 
[gopigo3 example] gopigo3 example, running on urml-validator 0.2.0, urml-ros2-runtime 0.2.0
[gopigo3 example] backend: fake (dry run, no movement)
URML on a basic GoPiGo3 - running test_orbit_turn.urml.yaml (Discussion #523).
gopigo3 example, running on urml-validator 0.2.0, urml-ros2-runtime 0.2.0
robot: gopigo3_basic   drive_type: differential   max drive: 2.0 m

[VALID] program file: test_orbit_turn.urml.yaml
   executed 3 steps, success=True
   wheel + speech calls, in order:
     drive_by     -> easygopigo3.drive_cm(25.0)
     turn_by      -> easygopigo3.turn_degrees(-360.0)
     drive_by     -> easygopigo3.orbit(-180.0, 10.0)

Dry run: validated and planned, not actuated. Pass --execute (without -m) to drive the robot.

And with --execute:

(gopigo3) ubuntu@U26LDave:~/Fork_URML_For_GoPiGo3/examples/gopigo3$ python3 run_gopigo3.py -f test_orbit_turn.urml.yaml --execute
[gopigo3 example] gopigo3 example, running on urml-validator 0.2.0, urml-ros2-runtime 0.2.0
[gopigo3 example] --execute: this WILL move a connected GoPiGo3. Clear space around the robot.
[gopigo3 example] backend: real (executing on hardware)
URML on a basic GoPiGo3 - running test_orbit_turn.urml.yaml (Discussion #523).
gopigo3 example, running on urml-validator 0.2.0, urml-ros2-runtime 0.2.0
robot: gopigo3_basic   drive_type: differential   max drive: 2.0 m

[VALID] program file: test_orbit_turn.urml.yaml
   executed 3 steps, success=True
   wheel + speech calls, in order:
     drive_by     -> easygopigo3.drive_cm(25.0)
     turn_by      -> easygopigo3.turn_degrees(-360.0)
     drive_by     -> easygopigo3.orbit(-180.0, 10.0)

Turned and orbited in a ccw direction per the URML specification

(Albeit the turn_by spin default speed is uncomfortably fast...)

Rollback plan

revert gopigo3_adapter.py

Checklist

  • Commits are DCO-signed (git commit -s). See DCO and CONTRIBUTING.md.
  • Linked RFC is Accepted (or this PR does not change specification semantics).
  • Tests added or updated for the change; existing tests pass.
  • Conformance impact considered. If a primitive's contract changed, conformance tests are updated.
  • Docs / READMEs / CHANGELOG.md updated.
  • Substrate-neutrality acid test passes: anything touching Layer 2 can be cleanly implemented on a runtime with zero ROS dependencies.
  • No content from outside the URML organization's canonical scope (civilian, consumer, educational, industrial, research) has been introduced.

…r orbit() and turn_degrees()

Per Issue URML-MARS#598
and Issue URML-MARS#591

Signed-off-by: slowrunner <slowrunner@users.noreply.github.com>
Signed-off-by: slowrunner <slowrunner@users.noreply.github.com>
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