Skip to content

Commit 090574a

Browse files
authored
Merge pull request #445 from bark-simulator/many_linux_tests
Many linux tests
2 parents 93f28e6 + 5edd404 commit 090574a

33 files changed

+183
-84
lines changed

.github/workflows/manylinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Getting into venv
1616
run: . ./bark/python_wrapper/venv/bin/activate
1717
- name: Installing Requirements
18-
run: ./bark/python_wrapper/venv/bin/pip3 install -r ./tools/installers/requirements.txt
18+
run: ./bark/python_wrapper/venv/bin/pip3 install --upgrade pip && ./bark/python_wrapper/venv/bin/pip3 install -r ./tools/installers/requirements.txt
1919
- name: Building ManyLinux
2020
env:
2121
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
</p>
44

55
![Ubtuntu-CI Build](https://github.com/bark-simulator/bark/workflows/CI/badge.svg)
6+
![Ubtuntu-ManyLinux Build](https://github.com/bark-simulator/bark/workflows/ManyLinux/badge.svg)
67
![NIGHTLY LTL Build](https://github.com/bark-simulator/bark/workflows/NIGHTLY_LTL/badge.svg)
78
![NIGHTLY RSS Build](https://github.com/bark-simulator/bark/workflows/NIGHTLY_RSS/badge.svg)
89
![NIGHTLY Rules MCTS Build](https://github.com/bark-simulator/bark/workflows/NIGHTLY_RULES_MCTS/badge.svg)
@@ -31,17 +32,17 @@ Use `git clone https://github.com/bark-simulator/bark.git` or download the repos
3132
Then follow the instructions at [How to Install BARK](https://github.com/bark-simulator/bark/blob/master/docs/source/installation.md).
3233
Once you activated the virtual environment (`source dev_into.sh`), you can explore some examples of BARK.
3334

34-
Highway: `bazel run //examples:highway`:
35+
Highway: `bazel run //bark/examples:highway`:
3536
<p align="center">
3637
<img src="https://github.com/bark-simulator/bark/raw/master/docs/source/gifs/bark_highway.gif" alt="BARK" />
3738
</p>
3839

39-
Merging: `bazel run //examples:merging`:
40+
Merging: `bazel run //bark/examples:merging`:
4041
<p align="center">
4142
<img src="https://github.com/bark-simulator/bark/raw/master/docs/source/gifs/bark_merging.gif" alt="BARK" />
4243
</p>
4344

44-
Intersection: `bazel run //examples:intersection`:
45+
Intersection: `bazel run //bark/examples:intersection`:
4546
<p align="center">
4647
<img src="https://github.com/bark-simulator/bark/raw/master/docs/source/gifs/bark_intersection.gif" alt="BARK" />
4748
</p>

bark/BUILD

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ py_test (
3333
"//bark/runtime/tests:py_importer_tests",
3434
"//bark/runtime/tests:py_evaluation_tests",
3535
"//bark/python_wrapper/tests:py_pickle_tests",
36+
"//bark/python_wrapper/tests:py_glog_init",
3637
"//bark/models/tests:py_behavior_model_test",
3738
"//bark/geometry/tests:py_geometry_tests",
3839
"//bark/commons/tests:py_commons_tests",
3940
"//bark/benchmark/tests:py_benchmark_runner_tests",
40-
# "//bark/benchmark/tests:py_benchmark_process_tests",
41+
"//bark/benchmark/tests:py_benchmark_result_tests",
42+
"//bark/benchmark/tests:py_benchmark_process_tests",
4143
"//bark/benchmark/tests:py_benchmark_analyzer_tests"
4244
],
4345
)
@@ -55,10 +57,13 @@ py_test(
5557
"//bark/runtime/viewer:model_data",
5658
"//bark/runtime/tests:xodr_data",
5759
"//bark/runtime/tests:track_data",
60+
"//bark/examples:scenarios",
61+
"//bark/examples:params"
5862
],
5963
deps = [":tests",
6064
"//bark/runtime/viewer:threaded_viewer",
6165
"//bark/runtime/viewer:panda3d_easy",
66+
"//bark/runtime/tests:test_config_reader_module",
6267
"//bark/runtime/scenario/scenario_generation:scenario_generation",
6368
"//bark/runtime/scenario/scenario_generation/config_readers:config_readers",
6469
"//bark/runtime/scenario/interaction_dataset_processing:interaction_dataset_processing",
@@ -68,6 +73,8 @@ py_test(
6873
"//bark/models/behavior/plan:py_planners",
6974
"//bark/benchmark:benchmark_runner_mp",
7075
"//bark/benchmark:benchmark_runner",
76+
"//bark/benchmark:benchmark_analyzer",
77+
"//bark/benchmark:benchmark_result",
7178
"//bark/runtime:runtime",
7279
"//bark/runtime/viewer:video_renderer",
7380
"//bark/runtime/viewer:pygame_viewer",
@@ -76,8 +83,15 @@ py_test(
7683
"//bark/runtime/viewer:py_viewer",
7784
"//bark/runtime/scenario:scenario",
7885
"//bark/runtime/commons:commons",
79-
"//bark/benchmark:benchmark_analyzer",
80-
86+
"//bark/examples:paths",
87+
"//bark/examples:highway",
88+
"//bark/examples:highway_rss",
89+
"//bark/examples:merging",
90+
"//bark/examples:merging_rss",
91+
"//bark/examples:intersection",
92+
"//bark/examples:maude_interface",
93+
"//bark/examples:maude",
94+
"//bark/examples:interaction_dataset"
8195
],
8296

8397
)

examples/BUILD renamed to bark/examples/BUILD

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ py_test(
2727
"//bark/runtime/viewer:matplotlib_viewer",
2828
"//bark/runtime/viewer:panda3d_easy",
2929
"//bark/runtime/scenario/scenario_generation:scenario_generation",
30-
"//bark/runtime:runtime"],
30+
"//bark/runtime:runtime",
31+
":paths"],
3132
)
3233

3334
py_test(
@@ -43,7 +44,8 @@ py_test(
4344
"//bark/runtime/viewer:matplotlib_viewer",
4445
"//bark/runtime/viewer:panda3d_easy",
4546
"//bark/runtime/scenario/scenario_generation:scenario_generation",
46-
"//bark/runtime:runtime"],
47+
"//bark/runtime:runtime",
48+
":paths"],
4749
)
4850

4951
py_binary(
@@ -58,7 +60,8 @@ py_binary(
5860
"//bark/runtime/viewer:matplotlib_viewer",
5961
"//bark/runtime/viewer:panda3d_easy",
6062
"//bark/runtime/scenario/scenario_generation:scenario_generation",
61-
"//bark/runtime:runtime"],
63+
"//bark/runtime:runtime",
64+
":paths"],
6265
)
6366

6467
filegroup(
@@ -89,8 +92,8 @@ py_binary(
8992
"//bark/runtime/scenario/interaction_dataset_processing:interaction_dataset_processing",
9093
"//bark/runtime/viewer:matplotlib_viewer",
9194
"//bark/runtime/viewer:video_renderer",
92-
"//bark/runtime:runtime"
93-
],
95+
"//bark/runtime:runtime",
96+
":paths"],
9497
)
9598

9699
py_binary(
@@ -143,4 +146,9 @@ py_binary(
143146
'//bark/world/tests:params2'],
144147

145148
deps = [':maude_interface'],
149+
)
150+
151+
py_library(
152+
name = "paths",
153+
srcs = ["paths.py"],
146154
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from bark.core.models.behavior import BehaviorUCTSingleAgent
2020
behavior_used = BehaviorUCTSingleAgent
2121
except:
22-
print("BehaviorUCTSingleAgent not available, rerun example with `bazel run //examples:benchmark_database --define planner_uct=true")
22+
print("BehaviorUCTSingleAgent not available, rerun example with `bazel run //bark/examples:benchmark_database --define planner_uct=true")
2323
exit()
2424

2525
db = BenchmarkDatabase(database_root="external/benchmark_database_release")
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from bark.runtime.runtime import Runtime
1818
from bark.runtime.viewer.panda3d_easy import Panda3dViewer
1919
from bark.core.models.behavior import *
20+
from bark.examples.paths import Data
2021

2122

2223
# parameters
@@ -58,9 +59,7 @@ def behavior_model(self, world):
5859
scenarios = \
5960
ConfigWithEase(
6061
num_scenarios=5,
61-
map_file_name=os.path.join(
62-
os.path.dirname(__file__),
63-
"../bark/runtime/tests/data/city_highway_straight.xodr"),
62+
map_file_name=Data.xodr_data("city_highway_straight"),
6463
random_seed=0,
6564
params=param_server,
6665
lane_corridor_configs=[left_lane, right_lane])
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
LaneCorridorConfig, ConfigWithEase
1717
from bark.runtime.runtime import Runtime
1818
from bark.runtime.viewer.panda3d_easy import Panda3dViewer
19+
from bark.examples.paths import Data
1920
from bark.core.models.behavior import *
2021

2122
try:
@@ -25,8 +26,7 @@
2526
"This example requires building RSS, please run with \"bazel run //examples:highway_rss --define rss=true\"")
2627

2728
# parameters
28-
param_server = ParameterServer(
29-
filename="examples/params/highway_merge_configurable.json")
29+
param_server = ParameterServer(filename=Data.params_data("highway_merge_configurable"))
3030
param_server["BehaviorLaneChangeRuleBased"]["MinVehicleRearDistance"] = 4.
3131
param_server["BehaviorLaneChangeRuleBased"]["MinVehicleFrontDistance"] = 2.
3232
param_server["BehaviorLaneChangeRuleBased"]["TimeKeepingGap"] = 0.
@@ -65,13 +65,12 @@ def behavior_model(self, world):
6565
lane_corridor_id=1,
6666
controlled_ids=True)
6767

68-
map_path = "bark/runtime/tests/data/city_highway_straight.xodr"
6968

7069
# create 5 scenarios
7170
scenarios = \
7271
ConfigWithEase(
7372
num_scenarios=5,
74-
map_file_name=map_path,
73+
map_file_name=Data.xodr_data("city_highway_straight"),
7574
random_seed=0,
7675
params=param_server,
7776
lane_corridor_configs=[left_lane, right_lane])
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
from bark.runtime.commons.parameters import ParameterServer
1212
from bark.runtime.viewer.matplotlib_viewer import MPViewer
1313
from bark.runtime.viewer.video_renderer import VideoRenderer
14+
from bark.examples.paths import Data
1415
import os
1516
import argparse
1617

1718

1819
# set you json config that contains a map and matching tracks.
19-
param_server = ParameterServer(filename=os.path.join(os.path.join(os.path.dirname(__file__),"params/interaction_example.json")))
20+
param_server = ParameterServer(filename=Data.params_data("interaction_example"))
2021
scenario_generation = InteractionDatasetScenarioGeneration(num_scenarios=1,
2122
random_seed=0,
2223
params=param_server)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from bark.core.geometry.standard_shapes import CarLimousine
1919
from bark.core.models.behavior import *
2020
from bark.runtime.runtime import Runtime
21+
from bark.examples.paths import Data
2122

2223

2324
# Parameters Definitions
@@ -68,8 +69,7 @@
6869

6970
scenarios = \
7071
ConfigWithEase(num_scenarios=3,
71-
map_file_name= os.path.join(os.path.dirname(__file__),
72-
"../bark/runtime/tests/data/threeway_intersection.xodr"),
72+
map_file_name=Data.xodr_data("threeway_intersection"),
7373
random_seed=0,
7474
params=param_server,
7575
lane_corridor_configs=lane_corridors)

0 commit comments

Comments
 (0)