ALMotionRecorder is a module giving the possibility to record Nao's motors poses. A first possibility is to record periodically, ie. a pose is stored every t seconds. Another possibility is to use an interactive mode where the user choses when a poses must be stored.
void startInteractiveRecording (const vector<string>& jointsToRecord, const int& nbPoses, const bool& extensionAllowed, const int& mode)
Start recording the motion in an interactive mode
Names of joints that must be recorded
Default number of poses to record
Set to true to ignore nbPoses and keep recording new poses as long as record is not manually stopped
Indicates which interactive mode must be used. 1 : Use rigth bumper to enslave and left bumper to store the pose
void startPeriodicRecording (const vector<string>& jointsToRecord, const int& nbPoses, const bool& extensionAllowed, const float& timeStep, const vector<string>& jointsToReplay, const AL::ALValue& replayData)
Start recording the motion in a periodic mode
Names of joints that must be recorded
Default number of poses to record
set to true to ignore nbPoses and keep recording new poses as long as record is not manually stopped
Time in seconds to wait between two poses
Names of joints that must be replayed
An ALValue holding data for replayed joints. It holds two ALValues. The first one is an AlValue where each line corresponds to a joint, and column elements are times of control points The second one is also an ALValue where each line corresponds to a joint, but column elements are arrays containing [float angle, Handle1, Handle2] elements, where Handle is [int InterpolationType, float dAngle, float dTime] describing the handle offsets relative to the angle and time of the point. The first bezier param describes the handle that controls the curve preceding the point, the second describes the curve following the point.
AL::ALValue stopAndGetRecording ()
Stop recording the motion and return data
Returns the recorded data as an ALValue
void dataChanged (const string& dataName, const AL::ALValue& data, const string& message)
Called by ALMemory when subcription data is updated.
Name of the subscribed data.
Value of the the subscribed data
The message give when subscribing.
string version ()
Returns the version of the module.
A string containing the version of the module.
AL::ALValue getMethodHelp (const string& methodName)
Retrieves a method's description.
The name of the method.
A structure containing the method's description.
AL::ALValue getModuleHelp ()
Retrieves the module's description.
A structure describing the module.
string getUsage (const string& name)
Gets the method usage string. This summarise how to use the method.
The name of the method.
A string that summarises the usage of the method.