1 #ifndef CONTROL_PY_CONTROLLER_H 2 #define CONTROL_PY_CONTROLLER_H 4 #include "Controller.h" 42 bool Load(
const string& moduleName);
45 virtual const char* Type()
const {
return "PyController"; }
46 virtual void Update(Real dt);
48 virtual bool ReadState(File& f);
49 virtual bool WriteState(File& f)
const;
51 virtual map<string,string> Settings()
const;
52 virtual bool GetSetting(
const string& name,
string& str)
const;
53 virtual bool SetSetting(
const string& name,
const string& str);
55 virtual vector<string> Commands()
const;
56 virtual bool SendCommand(
const string& name,
const string& str);
59 PyObject *module, *updateFunc, *resetFunc, *getStateFunc, *setStateFunc, *getSettingsFunc, *setSettingsFunc;
60 vector<string> commandFuncNames;
61 vector<PyObject*> commandFuncs;
The main robot type used in RobotSim.
Definition: Robot.h:79
A base class for a robot controller. The base class does nothing.
Definition: Controller.h:27
A controller that interfaces with a python module.
Definition: PyController.h:37