Quote:
|
Originally Posted by Max Lobovsky
...scripting system or something to define the functions of a robot.
|
Scripting engine: We could do that easily enough by having a "scripting engine" class. The rest of the program would interface with this class when they want to tell the robot to do something. The scripting engine will then look at some sort of file in the robot zip and determine just what the robot does to do this. The scripting interface could also be used to determine if a robot is even capable of a certain action. IE:
Code:
#include <string>
#include <map>
using namespace std;
class ScriptingInterface {
public:
ScriptingInterface(string robotZip); // This would read in the robot actions,
// etc from the file, storing them in something like an accociative
// map (the STL has this all ready for us, so it would be easy)
bool grabBall(bool canDo = false); // If canDo was false (which is the
// default here), then it will attempt to grab the ball. If it is true,
// then it will return a true or false depending on whether or not
// this robot is capable of performing this action.
// Similar functions to grabBall...
private:
string robotSciptFile;
map<string, Action> possibleActions;
};
class Actions {
// I don't want to think about it right now, but this class would be able
// to store a sequence of actions (in some sort of vector/array?) and
// play them back on the robot.
};
Yeah, all the said, I was bored, so I thought I'd say it...
On the DLL note: Would the DLL include the AI robot software? I assume so, otherwise it doesn't do us much good.