Skip to content

Commit e5f1822

Browse files
author
Codex Labs
committed
Initial Release of SWARM Developer 1.0.0
1 parent f50cadb commit e5f1822

35 files changed

Lines changed: 2575 additions & 0 deletions

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SWARM Developer Client
2+
API Library for interacting with the SWARM Simulation Developer system
3+
4+
## Dependencies
5+
Supported Versions of Python: 3.7 - 3.11
6+
Supported SWARM Core Containers: 1.0.0
7+
Python Dependencies:
8+
- Matplotlib [version >= 3.6]
9+
- tqdm [version >= 4.64]
10+
- Numpy [version >= 1.22]
11+
12+
## Getting Started
13+
First, ensure that you have installed the dependencies as listed in
14+
the `requirements.txt` folder. This can be installed with `python3 -m pip install requirements.txt`.
15+
16+
Next, ensure you have followed directions for setting up the SWARM Core
17+
Container, which will provides a server for utilizing and interacting with the core
18+
simulation system.
19+
### Windows
20+
First, you will need to install NVIDIA Docker on WSL 2: [Instructions](https://docs.docker.com/desktop/windows/wsl/).
21+
22+
Next, you will need to load the container with: `COMMAND`.
23+
24+
Next, create a file called `LicenseKey.json` in the `settings` folder and ensure it has the following
25+
layout:
26+
```
27+
{
28+
"Key": "YOUR LICENSE KEY HERE",
29+
"Activated": false,
30+
"AccountID": "PROVIDED ACCOUNT ID"
31+
}
32+
```
33+
Please ensure the field `Activated` is set to false, as the licensing system
34+
must validate that the licene has been activated. Setting this to true will
35+
cause your requests to be denied when running simuluations. The `AccountID` will be provided with the License key.
36+
37+
## Running A Simulation - Local
38+
To begin, if you have a local installation of the SWARM Developer system, you
39+
will be able to quickly get started.
40+
41+
### Running the SWARM Core System
42+
First, you need to run the core system before making any requests. This is platform
43+
dependent so please following these instructions. (**NOTE** Please be aware we do not support Mac due to graphics card issues)
44+
45+
#### Linux
46+
For Ubuntu, please follow the instructions to set up `nvidia-docker` here: [Instructions - Linux](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)
47+
48+
An example script has been provided in the root of this project called `main.py`.
49+
Please view this file as an example of how to run a simulation. Other examples are
50+
provided in the `examples` folder and the documentation is also available at:
51+
[SWARM Developer Documentation](https://codexlabsllc.github.io/SWARMSimFirmware/).
52+
53+
You can run an example simulation by running `python3 main.py --map-name SWARMHome`.
54+
55+
## Running A Simulation - Cloud
56+
Get started in the cloud is even easier. Just ensure that you have this repository
57+
downloaded.
58+
59+
Get the ip address from the Codex representative, which will be sent when you
60+
request access to the cloud. Then, you run the system just as you would with a local
61+
install with:
62+
```
63+
python3 main.py --map-name SWARMHome --ip-address IP_ADDRESS
64+
```
65+

core/SupportedSoftwareModules.json

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
{
2+
"SupportedModules": {
3+
"SWARMVersion": "1.0.0",
4+
"ValidModuleParameters": [
5+
"Level",
6+
"States",
7+
"Parameters",
8+
"ClassName",
9+
"InputArgs",
10+
"ReturnValues",
11+
"FunctionName"
12+
],
13+
"ValidModuleNames": [
14+
"HighLevelBehavior",
15+
"PathPlanning",
16+
"ObstacleAvoidance",
17+
"Detector",
18+
"VideoRecorder"
19+
],
20+
"HighLevelBehavior": {
21+
"ValidClassNames": [
22+
"PathFollowing"
23+
],
24+
"ValidParameters": {
25+
"PathFollowing": {
26+
"completed_waypoint_distance": {
27+
"type": "float",
28+
"description": "The distance to consider a waypoint completed in meters",
29+
"range": [
30+
0.1,
31+
3.0
32+
]
33+
}
34+
}
35+
},
36+
"ValidInputArgs": {
37+
"PathFollowing": {}
38+
},
39+
"ValidReturnValues": {
40+
"PathFollowing": [
41+
"Position",
42+
"Heading",
43+
"Speed"
44+
]
45+
}
46+
},
47+
"PathPlanning": {
48+
"ValidClassNames": [
49+
"PassThroughPlanner",
50+
"LinePlanner"
51+
],
52+
"ValidParameters": {
53+
"PassThroughPlanner": {
54+
},
55+
"LinePlanner": {
56+
57+
}
58+
},
59+
"ValidInputArgs": {
60+
"PassThroughPlanner": {},
61+
"LinePlanner": {}
62+
},
63+
"ValidReturnValues": {
64+
"PassThroughPlanner": [
65+
"MovementCommand"
66+
],
67+
"LinePlanner": [
68+
"MovementCommand"
69+
]
70+
}
71+
},
72+
"VideoRecorder": {
73+
"ValidClassNames": [
74+
"VideoRecorder"
75+
],
76+
"ValidParameters": {
77+
"VideoRecorder": {
78+
}
79+
},
80+
"ValidInputArgs": {
81+
"VideoRecorder": {}
82+
},
83+
"ValidReturnValues": {
84+
"VideoRecorder": [
85+
]
86+
}
87+
},
88+
"Detector": {
89+
"ValidClassNames": [
90+
"SWARMDetector"
91+
],
92+
"ValidParameters": {
93+
"SWARMDetector": {
94+
}
95+
},
96+
"ValidInputArgs": {
97+
"SWARMDetector": {}
98+
},
99+
"ValidReturnValues": {
100+
"SWARMDetector": [
101+
]
102+
}
103+
},
104+
"ObstacleAvoidance": {
105+
"ValidClassNames": [
106+
"SlopeDetection"
107+
],
108+
"ValidParameters": {
109+
"SlopeDetection": {
110+
}
111+
},
112+
"ValidInputArgs": {
113+
"SlopeDetection": {
114+
"min_slope": {
115+
"type": "float",
116+
"description": "The minimum slope of the terrain in degrees to acivate the algorithm.",
117+
"range": [
118+
5.0,
119+
40.0
120+
]
121+
},
122+
"max_slope": {
123+
"type": "float",
124+
"description": "The maximum slope of the terrain in degrees to acivate the algorithm.",
125+
"range": [
126+
50.0,
127+
85.0
128+
]
129+
}
130+
}
131+
},
132+
"ValidReturnValues": {
133+
"SlopeDetection": [
134+
"Position",
135+
"LinearVelocity",
136+
"Heading"
137+
]
138+
}
139+
}
140+
}
141+
}

core/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# =============================================================================
2+
# Copyright 2022-2023. Codex Laboratories LLC. All Rights Reserved.
3+
#
4+
# Created By: Tyler Fedrizzi
5+
# Created On: 6 December 2022
6+
#
7+
# Description: Core Execution of the forward-facing gui
8+
# =============================================================================
9+
from core.client import *
10+
from core.gui import *
11+
from core.swarm import *
222 Bytes
Binary file not shown.
12.8 KB
Binary file not shown.
147 Bytes
Binary file not shown.
28.5 KB
Binary file not shown.
1.95 KB
Binary file not shown.

core/_version.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# =============================================================================
2+
# Copyright 2022-2023. Codex Laboratories LLC. All Rights Reserved.
3+
#
4+
# Created By: Tyler Fedrizzi
5+
# Created On: 6 December 2022
6+
#
7+
# Description: Core Execution of the forward-facing gui
8+
# =============================================================================
9+
__version__ = '1.0.0'

0 commit comments

Comments
 (0)