Hi everyone,
I’m working on an alignment application for the G1 using unitree_sdk2py and have a question about sequential motion control.
Background:
My app needs to execute multi-stage alignment motions:
- Move sideways to center on table
- Rotate to face table straight-on
- Move forward to target distance
- Stop and verify alignment
The Problem:
I’m relying on time.sleep(duration) to wait for each motion to complete, but this feels fragile. What if the robot takes longer to stabilize? What if I want to interrupt early based on sensor feedback?
My Questions:
- Is there an API to check if the previous API e.g
SetVelocity()command has finished executing? - Can I poll robot state (velocity, acceleration, etc.) to detect when motion has actually stopped?
- What’s the best practice for sequential motion commands - is time-based waiting the intended approach?
Any insights from Unitree engineers would be really helpful!
Thanks in advance!
Arshad