README.md 1.23 KB
Newer Older
1
# Twins Planner
2

3
Software for planning the motion of the twin printers robot.
4 5

The twins are 2 UR5e arms which 3D print in a shared workspace.
Jayant Khatkar's avatar
Jayant Khatkar committed
6

Jayant Khatkar's avatar
Jayant Khatkar committed
7 8
Given a valid gcode file, this repo constructs a collision free plan for two arms
to print the object maximising concurrency.
Jayant Khatkar's avatar
Jayant Khatkar committed
9

Jayant Khatkar's avatar
Jayant Khatkar committed
10
## Building/Installing
Jayant Khatkar's avatar
Jayant Khatkar committed
11 12 13 14

#### Install

```bash
15
# clone
16 17
git clone https://code.research.uts.edu.au/bigprint/twins-planner.git
cd twins-planner
Jayant Khatkar's avatar
Jayant Khatkar committed
18 19

# create conda environment containing python packages needed for ros
20
conda create -n planner python=3.8
21 22
conda activate planner
pip install -r requirements.txt
Jayant Khatkar's avatar
Jayant Khatkar committed
23

24 25
# build ikfastpy
cd src/utils/ikfastpy
26 27
python setup.py build_ext --inplace
pip install .
Jayant Khatkar's avatar
Jayant Khatkar committed
28
```
29 30 31 32 33

#### Running

Create the plan, and enter an interactive shell for viewing it:
```bash
Jayant Khatkar's avatar
Jayant Khatkar committed
34
cd src # from repo root
35 36 37 38 39 40
ipython -i greedy.py # quicker plan
```

To inspect the plan in the interactive shell:
```python
# watch the plan created, sped up to complete in 30s
Jayant Khatkar's avatar
Jayant Khatkar committed
41
plan.watch(30) #use plan.watch(10,0.5,1) to only watch the last half of the plan in 10 seconds
42 43 44 45 46 47 48 49 50 51

# plot showing when each arm is printing, when waiting/travelling
plan.visualise()

#plot the contours planned, coloured by the arm they are assigned to
tu.plot_plan_contours(plan, contours)

# save the plan
plan.save("myprint.plan")
```