The code for the Paradigm Pod Control systems.
The Core Control Software found in this repository is designed to run in a RealTime Linux environment on a high performance ARM core. Suitable platforms include the TI Sitara am335x series of processors, conveniently found in the consumer and industrial grade BeagleBoard Open Source Hardware. We utilize the BeagleBone black hardware and make extensive use of the onboard TI Sitara ARM core to manage the system level control loop for the Paradigm Pod.
This breaks down into several responsibilities:
There is more documentation in this repository and on the internal Paradigm Google Drive.
The following is a high level getting started geared for new developers
The minimal controls system is comprised of 4 distinct systems that you will need to install.
You will also need clang/LLVM and Python development environments installed.
sudo apt-get install build-essential python-pip clang llvm cmake
You will also need to build and install LibBlocksRuntime
Install influxdb and grafana per the instructions on their respective websites
Clone ODS in a new terminal window following the instructions on the ODS README
Clone this repo somewhere safe, then cd into it.
mkdir ~/dev
cd ~/dev
git clone git@github.com:ParadigmHyperloop/hyperloop.git
cd hyperloop
This is a CMake project, meaning that you need to first build the build system, then build the project with the new build system.
cd ./proj
cmake -DCMAKE_C_COMPILER=$(which clang) ..
You should get something like this:
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/edhurtig/hyperloop-core/proj
Now if you run make
you should get a built controller.
...
[ 94%] Building C object core/CMakeFiles/core.dir/telemetry.c.o
[ 97%] Building C object core/CMakeFiles/core.dir/tests.c.o
[100%] Linking C executable core
[100%] Built target core
You should now be running all 3 of the aforementioned services (InfluxDB, Grafana, ODS) on your dev machine. Now it is time to start up core
From the ./proj
folder in a terminal window, run ./core/core -i -
You should see the core controller start with output like this
[INFO] [main] {main.c:65} POD Booting...
[INFO] [main] {main.c:66} Initializing Pod State
[WARN] [get_pod_state] {pod.c:92} Pod State is not initialized
[DEBUG] [init_pod_state] {pod.c:61} initializing State at 0x1057f0240
[INFO] [main] {main.c:73} Loading POD state struct for the first time
[INFO] [main] {main.c:76} Registering POSIX signal handlers
[INFO] [main] {main.c:83} Starting the Logging Client Connection
[DEBUG] [logging_main] {logging.c:230} [logging_main] Thread Start
[DEBUG] [log_connect] {logging.c:95} Connecting to logging server: controls.paradigmhyperloop.com
[NOTE] [log_connect] {logging.c:130} Connected to controls.paradigmhyperloop.com:7778 on fd 5
[INFO] [logging_main] {logging.c:244} punching boot_sem to proceed
[INFO] [main] {main.c:101} Booting Command and Control Server
[DEBUG] [cmd_server] {commander.c:224} Starting TCP Network Command Server
[NOTE] [cmd_server] {commander.c:231} TCP Network Command Server Started on port: 7779
[NOTE] [cmd_server] {commander.c:239} === Waiting for first commander connection ===
Start ODS if not already, the ODS terminal window will start printing telemetry data. The telemetry data will be accessible in Grafana at http://localhost:3000 as well, but you will need to configure a data source and some dashboards (more on that later)
A Jenkins server builds and tests all changes made to this repository automatically. Whenever you open a pull request, a build will be triggered and a link to the results will be attached to the PR.
Before you checkin code, run the following to catch errors before the Jenkins server catches them
make DESTDIR="./BUILD" clean all install integration
Note: You will need to install pytest
for the integration target to work properly
sudo pip install pytest
See the LICENSE for full licensing details.
In summary, (you still need to read the whole thing), this code is for Paradigm Hyperloop only. It is shared with the world for the benefit of observers and potential developers. If you wish to utilize this code in any way, you must contact us first and receive written permission to utilize the source for the purpose you require.
Lastly, DON'T trust this code to work for your HyperLoop pod, or your project. This code is only being verified and tested on the Paradigm Hyperloop Pod.