STEP: A Scripting Language for Embodied Agents

Home --- STEP --- Tool --- Paper --- Source --- XSTEP --- DLP --- Link

How to Use STEP Engine

Based on the source code, you can develop your own STEP script libraries, test the scripting actions, enhance the functionalities of STEP, and evaluate STEP.

Define scripting actions: Write the scripting actions according to the STEP syntax in the STEP script libraries. See STEP release notes for details.

Test scripting actions: First, add the test line in the rule 'main' of the object 'step'. Secondly, compile the source code. Before doing that, make sure DLP has been properly configured in your computer. Finally, launch the file 'step.html'.
Before launching the file, make sure the followings:
1. Blaxxun Contact (VRML Browser) has been installed in your web browsers,Internet Explorer or Netscape Communicator (version 4.6 or lower).
2. Enable the Java script support of your web browsers
3. Uncheck the Java 2 support if you use Internet Explorer.

How to Use STEP javascript Interface

The file 'stepjsi.jar' is the STEP interface for Javascripts. In Javascripts, adding a line like this:
appletQueue( "term: command");
would call the STEP engine to execute certain tasks, where the command can be one of the following methods.

  • do_action(Action): do the Action.
  • loadurl(URL): load the URL.
  • pose_reset(Agent): do the body pose reset action in the stepscriptlib_basic.
  • finger_pose_reset(Agent): reset the finger joints (for LOA2 avatars).
  • getScriptData(Script,JSMethod, ParameterList): do the scripting action, and then return the parameters to the method in the javascript.
  • stop: stop the STEP engine applet.

    How to Use STEP script libraries which are made by other authors

    In order to use STEP script libraries which are made by other authors, you can do the followings:
    1. In the file 'stepscriptlib.pl', add the script library claim, like this:
    script(ScriptAction, Action):-
    other_scriptlib <- script(ScriptAction,Action),!.
    where other_scriptlib is the name of the script library which is made by other authors.
    2. In your STEP application html file, add the archive name of the script library, like this:
    archive="dlpsys.jar, step_engine.jar, other_scriptlib.jar"
    3. Recompile the file 'stepscriptlib.pl'

    Here are several STEP script libraries available for you:

  • STEP script library: Touch based on Inverse Kinematics (version 0.41) by Zhisheng Huang
    The file steplib_touch.jar is a script library with the actions of touch based on inverse kinematics.
    Library name: step_scriptlib_touch
    Script actions:
    touch_absolutePosition(Agent,position(X,Y,Z), Hand): The Agent would touch the position (X,Y,Z) with a hand, where 'l' means the left hand, and 'r' means the right hand.
    touch(Agent,position(X,Y,Z), Hand): The Agent would touch the position (X,Y,Z) which is relative to the body coordinate system with a hand.
    touchValue(Agent,position(X,Y,Z), Hand, [ShoulderRotation,ElbowRotation,WristRotation]): Returning the rotation values of the joints for the touch action (relative to the body coordinate).

    Enhance and evaluate STEP: Report bugs, suggestions, and comments to Zhisheng Huang