Frame manager is used to play choregraphe projects in naoqi. It needs Choregraphe projects in input and will return an ID for each project. It can also only read a given box/timeline in a complex behavior.
string newBehavior (const string& path, const string& xmlFile)
Creates a new behavior, from a box found in an xml file. Note that you have to give the xml file contents, so this method is not very user friendly. You have to open the file, and send the string that matches the file contents if you are working from a file. You probably want to use newBehaviorFromFile instead.
The path to reach the box to instantiate in the project ("" if root).
The choregraphe project (in plain text for the moment).
return a unique identifier for the created box.
string newBehaviorFromFile (const string& xmlFilePath, const string& path)
Creates a new behavior, from a box found in an xml file stored in the robot.
Path to Xml file, ex : "/home/youhou/mybehavior.xar".
The path to reach the box to instantiate in the project ("" if root).
return a unique identifier for the created box, that can be used by playBehavior
string newBehaviorFromChoregraphe ()
Creates a new behavior, from the current Choregraphe behavior (uploaded to /tmp/currentChoregrapheBehavior/behavior.xar).
return a unique identifier for the created behavior
string createAndPlayTimeline (const string& xmlFile)
Creates and play completely a timeline
The choregraphe project (in plain text for the moment).
return a unique identifier for the created box that contains the timeline. You must call deleteBehavior on it at some point.
void deleteBehavior (const string& id)
Deletes a behavior (meaning a box). Stop the whole behavior contained in this box first.
The id of the box to delete.
void completeBehavior (const string& id)
It will play a behavior and block until the behavior is finished. Note that it can block forever if the behavior output is never called.
The id of the box.
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.
void playTimeline (const string& id)
Starts playing a timeline contained in a given box. If the box is a flow diagram, it will look for the first onStart input of type Bang, and stimulate it !
The id of the box.
void stopTimeline (const string& id)
Stops playing a timeline contained in a given box, at the current frame
The id of the box.
void setTimelineFps (const string& id, const int& fps)
Sets the FPS of a given timeline
The id of the timeline.
The FPS to set.
int getTimelineFps (const string& id)
Gets the FPS of a given timeline
The id of the timeline.
Returns the timeline's FPS.
void exitBehavior (const string& id)
Exit the reading of a timeline contained in a given box
The id of the box.
float getMotionLength (const string& id)
Returns in seconds, the duration of a given movement stored in a box. Returns 0 if the behavior has no motion layers.
The id of the box.
Returns the time in seconds.
void gotoAndStop (const string& id, const string& frame)
Goes to a certain frame and pause
The id of the box containing the box.
The behavior frame name we want the timeline to go to. If will jump to the starting index of the name given.
void gotoAndStop (const string& id, const int& frame)
Goes to a certain frame and pause
The id of the box containing the box.
The frame we want the timeline to go to.
void gotoAndPlay (const string& id, const string& frame)
Goes to a certain frame and continue playing
The id of the box containing the box.
The behavior frame name we want the timeline to go to. If will jump to the starting index of the name given.
void gotoAndPlay (const string& id, const int& frame)
Goes to a certain frame and continue playing
The id of the box containing the box.
The frame we want the timeline to go to.
string getBehaviorPath (const string& id)
Returns a playing behavior absolute path.
The id of the behavior.
Returns the absolute path of given behavior.
void onRubyError (const string& boxname, const string& methodname, const string& error)
Transmit Ruby error to Choregraphe or logger. Should not be called manually.
Name of the box raising the error
Name of the method
Error string
void onPythonError (const string& boxname, const string& methodname, const string& error)
Transmit Python error to Choregraphe or logger. Should not be called manually.
Name of the box raising the error
Name of the method
Error string
void onUrbiError (const string& boxname, const string& methodname, const string& location, const string& error)
Transmit Urbi error to Choregraphe or logger. Should not be called manually.
Name of the box raising the error
Name of the method
Location of the error
Error string
void onRubyPrint (const string& message)
Print Ruby message in Choregraphe or logger. Should not be called manually.
Message to print
void onPythonPrint (const string& message)
Print Python message in Choregraphe or logger. Should not be called manually.
Message to print
void onUrbiPrint (const string& message)
Print Urbi message in Choregraphe or logger. Should not be called manually.
Message to print
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.