Overview

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.

Methods

void startInteractiveRecording (const vector<string>& jointsToRecord, const int& nbPoses, const bool& extensionAllowed, const int& mode)

Start recording the motion in an interactive mode

jointsToRecord

Names of joints that must be recorded

nbPoses

Default number of poses to record

extensionAllowed

Set to true to ignore nbPoses and keep recording new poses as long as record is not manually stopped

mode

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

jointsToRecord

Names of joints that must be recorded

nbPoses

Default number of poses to record

extensionAllowed

set to true to ignore nbPoses and keep recording new poses as long as record is not manually stopped

timeStep

Time in seconds to wait between two poses

jointsToReplay

Names of joints that must be replayed

replayData

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

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.

dataName

Name of the subscribed data.

data

Value of the the subscribed data

message

The message give when subscribing.


Methods inherited from ALModule

void exit ()

Exits and unregisters the module.

string version ()

Returns the version of the module.

Returns

A string containing the version of the module.

bool ping ()

Just a ping. Always returns true

Returns

returns true

vector<string> getMethodList ()

Retrieves the module's method list.

Returns

An array of method names.

AL::ALValue getMethodHelp (const string& methodName)

Retrieves a method's description.

methodName

The name of the method.

Returns

A structure containing the method's description.

AL::ALValue getModuleHelp ()

Retrieves the module's description.

Returns

A structure describing the module.

string getBrokerName ()

Gets the name of the parent broker.

Returns

The name of the parent broker.

string getUsage (const string& name)

Gets the method usage string. This summarise how to use the method.

name

The name of the method.

Returns

A string that summarises the usage of the method.


Copyright © 2010 Aldebaran Robotics - All rights reserved