mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
3484683199
* start thneed load/save * compiling * fix loading * build thneed model in scons * don't hardcode /data/openpilot * release files * those too * support for loading/saving binary kernels * save binaries out of json band * make binary a command line flag to the compiler * need include assert * fix shadowed common in SConscript * cleanup run.h * hmm, the recurrent buffer wasn't 0ed * ugh, unique ptr * remove power constraint, refactor record * Revert "remove power constraint, refactor record" This reverts commit bb6fa52db6df59cd9d6420a6f630430e35af8a5e. * print on thneed stop * fingers crossed for this one * recorded * just curious * okay okay, pass tests? * cleanups * refactor wait Co-authored-by: Comma Device <device@comma.ai> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: 59fac9fdc630fa78f520fc9a244f9f9cd39fa562
25 lines
568 B
C++
25 lines
568 B
C++
#pragma once
|
|
|
|
#include "runmodel.h"
|
|
#include "thneed/thneed.h"
|
|
|
|
class ThneedModel : public RunModel {
|
|
public:
|
|
ThneedModel(const char *path, float *loutput, size_t loutput_size, int runtime);
|
|
void addRecurrent(float *state, int state_size);
|
|
void addTrafficConvention(float *state, int state_size);
|
|
void addDesire(float *state, int state_size);
|
|
void execute(float *net_input_buf, int buf_size);
|
|
private:
|
|
Thneed *thneed = NULL;
|
|
bool recorded;
|
|
|
|
float *output;
|
|
|
|
// recurrent and desire
|
|
float *recurrent;
|
|
float *trafficConvention;
|
|
float *desire;
|
|
};
|
|
|