View Single Post
  #17   Spotlight this post!  
Unread 04-03-2016, 03:28
SoftwareBug2.0's Avatar
SoftwareBug2.0 SoftwareBug2.0 is offline
Registered User
AKA: Eric
FRC #1425 (Error Code Xero)
Team Role: Mentor
 
Join Date: Aug 2004
Rookie Year: 2004
Location: Tigard, Oregon
Posts: 488
SoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant future
Re: Potential Git and CI integration

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);