motion¶
Overview¶
The motion application controlls the robot’s motion, including rotation and translation.
Execution¶
The application can be executed with the following command:
python3 motion/ --auto-run
Inputs¶
–auto-run: Automatically runs the application and initiates the motion commands.
Outputs¶
Logs the start and completion of various motion commands (e.g., rotating, moving forward/backward).
Logs the motion’s parameters, such as speed, distance, and duration.
Behavior¶
- The robot follows this motion commands:
Rotate 90 degrees to the left at a speed of 20 degrees per second.
Rotate 1.5708 radians (equivalent to 90 degrees) to the left.
Move forward by 0.5 meters at a speed of 0.2 meters per second.
Move backward by 0.5 meters at a speed of 0.3 meters per second.
Move forward at a speed of 0.3 meters per second for a duration of 2 seconds and rotate at a speed of 10 degrees per second for 10 seconds.
After 5 seconds of the combined motion (moving backward and rotating), the motion is canceled.
The app finishes once all commands have been executed.
Example Output¶
# python3 motion/ --auto-run
[INFO] [timestamp] [pyraya.motion]: Auto running the app
[INFO] [timestamp] [pyraya.motion]: Setup
[INFO] [timestamp] [pyraya.motion]: Rotating 90 degrees left at 20 deg/secs
[INFO] [timestamp] [pyraya.motion]: Motion command finished
[INFO] [timestamp] [pyraya.motion]:
[INFO] [timestamp] [pyraya.motion]: Rotating 1.5708 radians left (90 degrees) at 0.349 rads/sec
[INFO] [timestamp] [pyraya.motion]: Motion command finished
[INFO] [timestamp] [pyraya.motion]: Moving forward 0.5 meters at 0.2 m/s
[INFO] [timestamp] [pyraya.motion]: Motion command finished
[INFO] [timestamp] [pyraya.motion]:
[INFO] [timestamp] [pyraya.motion]: Moving backward 0.5 meters at 0.3 m/s
[INFO] [timestamp] [pyraya.motion]: Motion command finished
[INFO] [timestamp] [pyraya.motion]:
[INFO] [timestamp] [pyraya.motion]: Moving forward at 0.3 m/s for 2.0 seconds
[INFO] [timestamp] [pyraya.motion]: Motion command finished
[INFO] [timestamp] [pyraya.motion]:
[INFO] [timestamp] [pyraya.motion]: Moving backward at 0.3 m/s and rotate at 10 deg/sec for 10 seconds
[INFO] [timestamp] [pyraya.motion]: Motion command finished
[INFO] [timestamp] [pyraya.motion]: Canceling motion after 5.0 seconds
[INFO] [timestamp] [pyraya.motion]: Motion command finished
[INFO] [timestamp] [pyraya.motion]: Finish app called