A REPL session
A worked session with the starter project: load it, get oriented, run a skill, try a move, look at the result, run the workflow, release the instance.
This session uses the starter project from Your first project. Run the commands in your terminal, inside the project folder. Ids, times and links in the output are examples.
1. Load the project
cd my-project
zeon upproject: my-project (<project id>)
setup: <setup name>
world: shaker_deck
viewer: <link to the 3D viewer>
Open the viewer link in a browser and keep it beside your terminal.
2. Get oriented
zeon briefproject:
id: <project id>
name: my-project
...
setup: <setup name>
mode: sim
...
world:
id: shaker_deck
loaded: True
objects (6):
...
- wellplate type=wellplate_96_flatbottom seat=wellplate_stand_1.top_center
- wellplate_shaker type=wellplate_shaker
...
arms (2):
- side=left at_start=True joints=[...]
- side=right at_start=True joints=[...]
active_workflow: plate_transfer
skills (2):
- move_plate inputs=[...] description=Right arm: pick a plate up by its grasp_short anchor ...
- shaker_lid inputs=[...] description=...
workflows (2):
- Plate Through Shaker id=plate_through_shaker inputs=[...]
- Plate Transfer id=plate_transfer inputs=[...]
runs (0):
The brief names the objects you can use, where each one sits, what each arm holds and whether it is at its start position, and the inputs each skill and workflow takes.
3. Read the world
zeon py 'get_articulation("wellplate_shaker")'{'lid_joint': 0.0}
The shaker's lid is closed.
4. Run a skill
zeon py 'skills.shaker_lid(lid="open")'
zeon py 'get_articulation("wellplate_shaker")'{'lid_joint': 1.666}
The first command prints nothing: the skill returns nothing. In the viewer, the left arm opened the lid.
5. Look at the result
zeon look shaker
zeon snap lid-open.pnglooking at shaker
saved lid-open.png (184213 bytes)
shaker is a preset in the starter's viewer.yaml. The picture is on your computer.
6. Try a move
Keep the plate's grasp anchor in a variable, then move the right arm 10 cm above it:
zeon py 'grasp = anchor("wellplate", "grasp_short")'
zeon py 'r = move_arm("right", grasp.preapproach(0.10)); r.duration_s'2.41
The move was planned, checked for collisions and made. grasp and r stay defined for the next entries. Try another height, another speed, or a straight line down (straight_line=True, tcp_speed=0.03) the same way. When a move cannot be made, the error names the move and the reason, and the arm does not move.
7. Put the world back
The lid is open and the arm is above the plate. Put both arms back at their start position, then reload the world before a full run:
zeon reset-arms
zeon upA world reload puts the objects back but does not move the arms; zeon reset-arms does.
8. Run the workflow
zeon py 'run_workflow("plate_through_shaker")["execution_id"]''<execution id>'
Follow the run from the terminal:
zeon logs <execution id> -f --timeout 600[10:42:07] > open lid starting
[10:42:19] done (12.1s)
[10:42:19] > plate into shaker starting
...
[10:44:51] COMPLETED
zeon run "Plate Through Shaker" --timeout 600 does the same in one command and always runs the workflow file you last pushed.
9. Release the instance
zeon downreleased instance <id>
Do not rely on the variables you defined after this. The project in the cloud is unchanged: nothing in this session edited a file. To keep a move you found, write it into a skill and zeon sync; see The development loop.
Updated 1 day ago