Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8924f47
Dumb -> Greedy
apockill Jul 21, 2022
93ce1bc
Add bokeh to dependencies
apockill Jul 21, 2022
f654323
Add assertions
apockill Jul 21, 2022
a0f83ef
Add bugfixes and tests for wood
apockill Jul 21, 2022
1d9b6d9
Add some fixes for floating point weirdnesses in the runtime
apockill Jul 21, 2022
07f556b
Be more explicit in the greedy conveyor
apockill Jul 21, 2022
6def964
Fix bug that occurs when fasteners of a certain type don't exist in t…
apockill Jul 21, 2022
4c80b3b
Render the configuration along with the report
apockill Jul 21, 2022
ee3ff38
Add coloring to the wood when it's active
apockill Jul 21, 2022
ca46117
Track total work time for the wood
apockill Jul 21, 2022
5775afa
Add tracking of missed fastener counts
apockill Jul 21, 2022
ef5bf83
Update the default configuration to have corrected fastener densities
apockill Jul 22, 2022
358d9df
Add titles to the chrome tab
apockill Jul 22, 2022
f85829d
Update tests
apockill Jul 22, 2022
8e2e598
Update tests
apockill Jul 22, 2022
1944d64
Configure rolling rake
apockill Jul 22, 2022
5520586
Add stats to the visualizer
apockill Jul 22, 2022
0549fe7
Add stats to the visualizer
apockill Jul 22, 2022
f621027
Add RollingRake
apockill Jul 22, 2022
2036342
Restructure parent class to make it easier to draw the rolling rake
apockill Jul 22, 2022
50261b7
Linting
apockill Jul 22, 2022
04180de
Split greedy wood class into two
apockill Jul 22, 2022
14a9204
Use the rolling rake in configuration
apockill Jul 22, 2022
abec9d9
Add `tdqm` progress bar
apockill Jul 25, 2022
00b5722
Add assertion for pick probabilities
apockill Jul 25, 2022
af1c9ec
Add a conveyor utils module
apockill Jul 25, 2022
24d75dd
Make `BaseWoodConveyor` a generic base class for parameters
apockill Jul 25, 2022
95d9914
Fix a critical bug in wood generation that was under-representing woo…
apockill Jul 25, 2022
48f3e2e
Fix a critical bug in wood generation that was under-representing woo…
apockill Jul 25, 2022
1d04f25
Lower screw pick seconds
apockill Jul 26, 2022
4846b99
Add `busyness.py`
apockill Jul 26, 2022
c210a39
Name and parameter updates
apockill Jul 26, 2022
8526698
Rename baseline file
apockill Jul 26, 2022
a2433cd
Make a note that the rake cycle is actually faster than it is written
apockill Jul 26, 2022
6c55d41
Fix how the standard rake is being modeled to correctly do a pass on …
apockill Jul 26, 2022
709c856
Add some comments to base configuration
apockill Jul 27, 2022
ecebd00
Calculate throughput in 8 hour basis
apockill Jul 27, 2022
891e7b6
Add CC lite configuration
apockill Aug 31, 2022
02d4f71
Add a command for running multiple experiments
apockill Sep 2, 2022
8dd8ba4
Minor optimization
apockill Sep 2, 2022
255d7f0
Minor improvement to have visualization steps only run when there's b…
apockill Sep 8, 2022
fa3cf35
Add a more complicated picker
apockill Nov 20, 2024
008fc4c
Update template and do vast type hinting and linting fixes
apockill Nov 20, 2024
20abbbe
Re-add `run_sim` command that got accidentally removed
apockill Nov 20, 2024
557bbf9
Use python 3.10 for tests
apockill Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "git@github.com:UrbanMachine/cookiecutter-python-template.git",
"commit": "70cadbc801169e644deda8214639128d9959584e",
"commit": "63905dc6f0a7d8bbf926da47b0e59b400cf81eac",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
13 changes: 13 additions & 0 deletions .github/check_lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# This script runs the full check suite, without any automatic fixes
set -euxo pipefail

poetry run ruff check --no-fix
poetry run ruff format --check
poetry run mypy --ignore-missing-imports roboregress/ tests/
poetry run darglint \
--strictness short \
--docstring-style sphinx \
--ignore-regex '^test_.*'
poetry run cruft check
echo "Lint successful!"
11 changes: 0 additions & 11 deletions .github/check_lint.sh

This file was deleted.

6 changes: 6 additions & 0 deletions .github/format
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
# This script runs only autofixable formatters
set -euxo pipefail

poetry run ruff format
poetry run ruff check --fix
5 changes: 0 additions & 5 deletions .github/format.sh

This file was deleted.

6 changes: 6 additions & 0 deletions .github/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
# This script fixes what can be automatically fixed, then runs the full check suite
set -euxo pipefail

.github/format
.github/check_lint
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.8]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -36,4 +36,4 @@ jobs:
ssh-private-key: ${{ secrets.SSH_KEY }}

- name: Lint
run: .github/check_lint.sh
run: .github/check_lint
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: ['3.10']
os: [ubuntu-latest, ubuntu-20.04]

steps:
Expand All @@ -26,7 +26,7 @@ jobs:
${{ matrix.os }}-${{ matrix.python-version }}-

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -41,7 +41,7 @@ jobs:
poetry run pytest tests/ -s --cov=roboregress/ --cov-report=term-missing ${@-}
poetry run coverage xml
- name: Report Coverage
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.10'
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,25 @@ pytest .

### Formatting Code
```shell
bash .github/format.sh
bash .github/format
```

### Linting
```shell
bash .github/check_lint.sh
bash .github/check_lint
```

## Running the Sim
After running `poetry install`, the script can be run via:

```
run_sim --visualize --config experiments/basic.yml
```

### Running many experiments
Sometimes it's desirable to run the simulation many times over, simultaneously.

The following command will find all *.yml files recursively from the current directory
and run the sim on all of them, in parallel:
```bash
find . -name '*.yml' -print0 | parallel -0 --progress 'run_sim -c {}'
```
42 changes: 0 additions & 42 deletions docs/contributing/1.-contributing-guide.md

This file was deleted.

47 changes: 0 additions & 47 deletions docs/contributing/2.-coding-standard.md

This file was deleted.

47 changes: 47 additions & 0 deletions experiments/basic_example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
default_cell_distance: 0.254
default_cell_width: 0.65

wood:
fastener_densities:
# Guesses
staple: 0.1
screw: 0.6
# Based on real data
flush_nail: 6.45
offset_nail: 12.9

conveyor:
move_speed: 0.5
optimization_increment: 0.015
# move_increment: 0.25

common_rake_params: &common_rake_params
rake_cycle_seconds: 4.0
working_width: 0.1
pick_probabilities:
offset_nail: 0.9

common_rolling_rake_params: &common_rolling_rake_params
rolling_rake_cycle_seconds: 0.000001
pick_probabilities:
offset_nail: 0.9

common_big_bird_params: &common_big_bird_params
big_bird_pick_seconds: 4
pick_probabilities:
offset_nail: 0.9
staple: 0.8
flush_nail: 0.7

common_screw_manipulator_params: &common_screw_manipulator_params
screw_pick_seconds: 11
pick_probabilities:
screw: 0.6

pickers:
- <<: *common_rolling_rake_params
- <<: *common_big_bird_params
- <<: *common_big_bird_params
- <<: *common_big_bird_params
- <<: *common_screw_manipulator_params

26 changes: 17 additions & 9 deletions experiments/basic.yml → experiments/greedy_conveyor_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,29 @@ default_cell_width: 0.5

wood:
fastener_densities:
staple: 3
flush_nail: 5
offset_nail: 10
screw: 1
# Guesses
staple: 0.1
screw: 0.6
# Based on real data
flush_nail: 6.45
offset_nail: 12.9

conveyor:
move_speed: 0.1
move_increment: 0.25
move_speed: 0.5
optimization_increment: 0.03
# move_increment: 0.25

common_rake_params: &common_rake_params
rake_cycle_seconds: 6.5
rake_cycle_seconds: 4.0 # Actually 6.5
working_width: 0.1
pick_probabilities:
offset_nail: 0.9

common_rolling_rake_params: &common_rolling_rake_params
rolling_rake_cycle_seconds: 0.000001
pick_probabilities:
offset_nail: 0.9

common_big_bird_params: &common_big_bird_params
big_bird_pick_seconds: 4
working_width: 0.345
Expand All @@ -27,13 +35,13 @@ common_big_bird_params: &common_big_bird_params
flush_nail: 0.7

common_screw_manipulator_params: &common_screw_manipulator_params
screw_pick_seconds: 25
screw_pick_seconds: 11
working_width: .505
pick_probabilities:
screw: 0.6

pickers:
- <<: *common_rake_params
- <<: *common_rolling_rake_params
- <<: *common_big_bird_params
- <<: *common_big_bird_params
- <<: *common_big_bird_params
Expand Down
Loading
Loading