I think there is real value in testing with a simulator. I don't think it's the right tool for typical unit tests, and I probably wouldn't use it to tune PID constants either; the real value in the simulator is in being able to see all the pieces work together and interact with each other and the environment. Off the top of my head, I might put together an interface that looked something like this:
Code:
struct Object_status{
//Put position, orientation, speed, here
std::map<std::string,double> etc; //extra in case the object has extra configuration like part that move relative to the others
};
struct Object_setup{
Object_status status;
std::string path_to_model;
};
struct Robot_setup{
Object_setup object;
std::string path_to_executable;
};
using Name=std::string;
struct Initial_setup{
std::map<Name,Object_setup> objects;
std::map<Name,Robot_setup> robots;
};
using Status=std::map<Name,Object_status>;
typedef bool (*Done_callback)(Status);
Status run_sim(Initial_setup,Done_callback);