12 #ifndef _SOT_LOADER_HH_ 13 #define _SOT_LOADER_HH_ 94 inline void startDG() { dynamic_graph_stopped_ =
false; }
97 inline void stopDG() { dynamic_graph_stopped_ =
true; }
101 sot_dynamic_library_filename_ = afilename;
106 std::string &out, std::string &
err);
121 void oneIteration(std::map<std::string, SensorValues> &sensors_in,
122 std::map<std::string, ControlValues> &control_values,
123 const double &period);
void * sot_dynamic_library_
Handle on the SoT library.
void loadDeviceInPython(const std::string &device_name)
Load the Device entity in the python global scope.
bool initialization()
Prepare the SoT framework.
This class is loading the control part of the Stack-Of-Tasks.
void startDG()
Get Status of dg.
bool isDynamicGraphStopped()
Get Status of dg.
~SotLoader()
Default destructor.
std::map< std::string, ControlValues > control_values_
Map of control values.
void oneIteration(std::map< std::string, SensorValues > &sensors_in, std::map< std::string, ControlValues > &control_values, const double &period)
Compute one iteration of control. Basically executes fillSensors, the SoT and the readControl...
std::string device_name_
Device entity created and loaded, so we deregister it as the Pool is not responsible for it's life ti...
void cleanUp()
Unload the library which handles the robot device.
void stopDG()
Get Status of dg.
SotLoader()
Default constructor.
void runPythonFile(std::string filename)
python::Interpreter embeded_python_interpreter_
Embeded python interpreter.
AbstractSotExternalInterface * sot_external_interface_
The interface between the device and the robot driver.
void runPythonFile(std::string ifilename)
Run a python script inside the embeded python interpreter.
std::map< std::string, SensorValues > sensors_in_
Map of sensor readings.
void runPythonCommand(const std::string &command, std::string &result, std::string &out, std::string &err)
Run a python command inside the embeded python interpreter.
std::string sot_dynamic_library_filename_
Name of the dynamic library containing the dgs::AbstractSotExternalInterface object.
void setDynamicLibraryName(std::string &afilename)
Specify the name of the dynamic library.
int parseOptions(int argc, char *argv[])
Read user input to extract the path of the SoT dynamic library.
bool dynamic_graph_stopped_
Check if the dynamic graph is running or not.
void runPythonFile(std::string ifilename, std::string &err)
Run a python script inside the embeded python interpreter.