Quick start
These procedures play the 100 mm circle demo. Read Safety first.
Before you start
Section titled “Before you start”- Clone the repository and install the Julia dependencies:
Terminal window julia --project=. -e 'import Pkg; Pkg.instantiate()' - For the plots, make a Python environment in
tools/python/withpip install -r requirements.txt matplotlib numpy. - Make sure that the space around the arm is clear.
Plan the circle
Section titled “Plan the circle”- Run the planner:
Terminal window julia --project=. scripts/plan_circle.jl - Make sure that the output shows
plan: 15.0 sand no assertion errors. The plan goes totools/python/plans/circle.csv.
The plan starts and ends at the zero pose (arm upright).
Play the circle on the ATOM (WiFi)
Section titled “Play the circle on the ATOM (WiFi)”The ATOM must run the controller firmware.
- Connect the 12 V supply. The LED matrix shows blue, then green. Green means that the arm holds its pose.
- Find the ATOM’s address in its status log (UDP broadcast, port 5005), or use
the last known address
192.168.1.107. - Move the arm to the zero pose:
import MyCobotlink = MyCobot.AtomLink("192.168.1.107")MyCobot.atom_move_to(link, zeros(6); duration=6.0)close(link)
- Play the circle:
Terminal window julia --project=. scripts/play_plan.jl tools/python/plans/circle.csv --atom=192.168.1.107 - Make sure that the output shows
result = "done"andlate_cycles = 0.
Play the circle from the laptop (FT232)
Section titled “Play the circle from the laptop (FT232)”The ATOM must be idle (the controller firmware is idle when it does not play a plan).
- Connect the FT232R to the base: GND, and the base pins 13 and 14. See Robot and wiring.
- Connect the 12 V supply.
- Play the circle. The script sets the FT232R latency timer to 1 ms:
Terminal window julia --project=. scripts/play_plan.jl tools/python/plans/circle.csv
To move the arm to zero from the laptop, use MyCobot.move_to(sp, zeros(6)) on an
open serial port.
Examine the result
Section titled “Examine the result”- Calculate the flange path from the recording:
Terminal window julia --project=. scripts/trace_recording.jl tools/python/recordings/<recording>.csv - Plot it:
Terminal window cd tools/python && python plot_circle.py recordings/<recording>_path.csv
Improve the result with learning control
Section titled “Improve the result with learning control”- Make the next plan from the last plan and its recording:
Terminal window julia --project=. scripts/ilc_step.jl tools/python/plans/circle.csv tools/python/recordings/<recording>.csv - Play the new plan (
circle_ilc1.csv) as above. - Do the two steps again with the new plan and its recording. Three iterations reduce the error from 5 mm to about 1 mm RMS.