public class ALAutonomousLife extends ALProxy
Constructor and Description |
---|
ALAutonomousLife(Session session) |
Modifier and Type | Method and Description |
---|---|
void |
clearStats() |
void |
exit()
Exits and unregisters the module.
|
java.lang.String |
focusedActivity()
Returns the currently focused activity
|
java.lang.String |
getActivityNature(java.lang.String activity_name)
Returns the nature of an activity
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> |
getActivityStatistics()
Get launch count, last completion time, etc for activities.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> |
getAutonomousActivityStatistics()
Get launch count, last completion time, etc for activities with autonomous launch trigger conditions.
|
java.lang.String |
getBrokerName()
Gets the name of the parent broker.
|
java.util.List<java.lang.String> |
getEnabledLaunchpadPlugins()
Get a list of enabled AutonomousLaunchpad Plugins.
|
java.util.List<Tuple2<java.lang.String,java.lang.Integer>> |
getFocusHistory()
Get a list of the order that activities that have been focused, and their time focused.
|
java.util.List<Tuple2<java.lang.String,java.lang.Integer>> |
getFocusHistory(java.lang.Integer depth)
Get a list of the order that activities that have been focused, and their time focused.
|
java.util.List<java.lang.String> |
getLaunchpadPluginsForGroup(java.lang.String group)
Get a list of AutonomousLaunchpad Plugins that belong to specified group
|
java.lang.Integer |
getLifeTime()
Get the time in seconds as life sees it.
|
java.lang.Object |
getMethodHelp(java.lang.String methodName)
Retrieves a method's description.
|
java.util.List<java.lang.String> |
getMethodList()
Retrieves the module's method list.
|
java.lang.Object |
getModuleHelp()
Retrieves the module's description.
|
java.lang.Float |
getRobotOffsetFromFloor()
Get the vertical offset (in meters) of the base of the robot with respect to the floor
|
java.lang.String |
getState()
Returns the current state of AutonomousLife
|
java.util.List<Tuple2<java.lang.String,java.lang.Integer>> |
getStateHistory()
Get a list of the order that states that have been entered, and their time entered.
|
java.util.List<Tuple2<java.lang.String,java.lang.Integer>> |
getStateHistory(java.lang.Integer depth)
Get a list of the order that states that have been entered, and their time entered.
|
java.lang.String |
getUsage(java.lang.String name)
Gets the method usage string.
|
java.lang.Boolean |
isMonitoringLaunchpadConditions()
Gets running status of AutonomousLaunchpad
|
java.lang.Boolean |
isRunning(java.lang.Integer id)
Returns true if the method is currently running.
|
java.lang.Boolean |
isSafeguardEnabled(java.lang.String name)
Get if a given safeguard will be handled by Autonomous Life or not.
|
java.lang.Boolean |
isStatsEnabled() |
java.lang.Boolean |
isTraceEnabled() |
java.lang.Boolean |
ping()
Just a ping.
|
void |
setLaunchpadPluginEnabled(java.lang.String plugin_name,
java.lang.Boolean enabled)
Temporarily enables/disables AutonomousLaunchpad Plugins
|
void |
setRobotOffsetFromFloor(java.lang.Float offset)
Set the vertical offset (in meters) of the base of the robot with respect to the floor
|
void |
setSafeguardEnabled(java.lang.String name,
java.lang.Boolean enabled)
Set if a given safeguard will be handled by Autonomous Life or not.
|
void |
setState(java.lang.String state)
Programatically control the state of Autonomous Life
|
void |
startMonitoringLaunchpadConditions()
Start monitoring ALMemory and reporting conditional triggers with AutonomousLaunchpad.
|
void |
stop(java.lang.Integer id)
returns true if the method is currently running
|
void |
stopAll()
Stops the focused activity and clears stack of activities
|
void |
stopFocus()
Stops the focused activity.
|
void |
stopMonitoringLaunchpadConditions()
Stop monitoring ALMemory and reporting conditional triggers with AutonomousLaunchpad.
|
void |
switchFocus(java.lang.String activity_name)
Set an activity as running with user focus
|
void |
switchFocus(java.lang.String activity_name,
java.lang.Integer flags)
Set an activity as running with user focus
|
java.lang.String |
version()
Returns the version of the module.
|
java.lang.Boolean |
wait(java.lang.Integer id,
java.lang.Integer timeoutPeriod)
Wait for the end of a long running method that was called using 'post'
|
call, connect, connect, disconnect, getNaoqiType, getService, isProxyReady, setService
public ALAutonomousLife(Session session) throws java.lang.Exception
java.lang.Exception
public void stopAll() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<Tuple2<java.lang.String,java.lang.Integer>> getStateHistory() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String focusedActivity() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<Tuple2<java.lang.String,java.lang.Integer>> getStateHistory(java.lang.Integer depth) throws CallError, java.lang.InterruptedException
depth
- How many items of history to report, starting from most recent.CallError
java.lang.InterruptedException
public java.lang.Integer getLifeTime() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void switchFocus(java.lang.String activity_name, java.lang.Integer flags) throws CallError, java.lang.InterruptedException
activity_name
- The package_name/activity_name to runflags
- Flags for focus changing. STOP_CURRENT or STOP_AND_STACK_CURRENTCallError
java.lang.InterruptedException
public void stopMonitoringLaunchpadConditions() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean isMonitoringLaunchpadConditions() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void setLaunchpadPluginEnabled(java.lang.String plugin_name, java.lang.Boolean enabled) throws CallError, java.lang.InterruptedException
plugin_name
- The name of the plugin to enable/disableenabled
- Whether or not to enable this pluginCallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getEnabledLaunchpadPlugins() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void stopFocus() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getLaunchpadPluginsForGroup(java.lang.String group) throws CallError, java.lang.InterruptedException
group
- The group to search for the pluginsCallError
java.lang.InterruptedException
public void setRobotOffsetFromFloor(java.lang.Float offset) throws CallError, java.lang.InterruptedException
offset
- The new vertical offset (in meters)CallError
java.lang.InterruptedException
public java.lang.Float getRobotOffsetFromFloor() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void setSafeguardEnabled(java.lang.String name, java.lang.Boolean enabled) throws CallError, java.lang.InterruptedException
name
- Name of the safeguard to consider: RobotPushed, RobotFell,CriticalDiagnosis, CriticalTemperatureenabled
- True if life handles the safeguard.CallError
java.lang.InterruptedException
public java.lang.Boolean isSafeguardEnabled(java.lang.String name) throws CallError, java.lang.InterruptedException
name
- Name of the safeguard to consider: RobotPushed, RobotFell,CriticalDiagnosis, CriticalTemperatureCallError
java.lang.InterruptedException
public java.lang.String getActivityNature(java.lang.String activity_name) throws CallError, java.lang.InterruptedException
activity_name
- The package_name/activity_name to checkCallError
java.lang.InterruptedException
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> getActivityStatistics() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void switchFocus(java.lang.String activity_name) throws CallError, java.lang.InterruptedException
activity_name
- The package_name/activity_name to runCallError
java.lang.InterruptedException
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> getAutonomousActivityStatistics() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<Tuple2<java.lang.String,java.lang.Integer>> getFocusHistory() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<Tuple2<java.lang.String,java.lang.Integer>> getFocusHistory(java.lang.Integer depth) throws CallError, java.lang.InterruptedException
depth
- How many items of history to report, starting from most recent.CallError
java.lang.InterruptedException
public void startMonitoringLaunchpadConditions() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean isStatsEnabled() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void clearStats() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean isTraceEnabled() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void exit() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String version() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean ping() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getMethodList() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Object getMethodHelp(java.lang.String methodName) throws CallError, java.lang.InterruptedException
methodName
- The name of the method.CallError
java.lang.InterruptedException
public java.lang.Object getModuleHelp() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean wait(java.lang.Integer id, java.lang.Integer timeoutPeriod) throws CallError, java.lang.InterruptedException
id
- The ID of the method that was returned when calling the method using 'post'timeoutPeriod
- The timeout period in ms. To wait indefinately, use a timeoutPeriod of zero.CallError
java.lang.InterruptedException
public java.lang.Boolean isRunning(java.lang.Integer id) throws CallError, java.lang.InterruptedException
id
- The ID of the method that was returned when calling the method using 'post'CallError
java.lang.InterruptedException
public void stop(java.lang.Integer id) throws CallError, java.lang.InterruptedException
id
- the ID of the method to wait forCallError
java.lang.InterruptedException
public java.lang.String getBrokerName() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String getUsage(java.lang.String name) throws CallError, java.lang.InterruptedException
name
- The name of the method.CallError
java.lang.InterruptedException
public void setState(java.lang.String state) throws CallError, java.lang.InterruptedException
state
- The possible states of AutonomousLife are: interactive, solitary, safeguard, disabledCallError
java.lang.InterruptedException
Aldebaran SDK for Java
Copyright 2006-2015 Aldebaran Robotics. All Rights Reserved.