vrExternalAPI : ----------------------- Arguments are case insensitive (except "vrExternalAPI" and ) [] - denotes optional argument <> - denotes argument descriptor | - denotes OR Agent Utilities: --------------- "vrExternalAPI agent " The argument can be one of the following: "param endMove []" "param smoothBody " "param moveHand " "param moveIdleHand " "param velocity " "move " "jump dcs l|w []" "jump pos " "eyes [l|w ]" "glance [l|w ]" "look [l|w ]" "focus [l|w ]" "pause" "nod []" "eyebrows set " "eyelids set " "mouth set " "mouth speak bgn|end [ ]" "hand l|r|b pocket [ [ []]]" "hand l|r|b ready " "hand l|r|b pointAt " "hand l|r|b pointTo " "hand l|r|b press " "hand l|r|b grasp " "hand l|r|b tether " "hand l|r|b move l|w " "hand l|r|b orient euler l|w " Example: ------- "vrExternalAPI agent steve look rickel_user_dcs" Begin orienting the steve's eyeballs, head, and neck toward the center of the bounding sphere of node rickel_user_dcs. The associated tracking motors will continue to track rickel_user_dcs dynamically. Agent Names: ----------- "" is one of 'steve', 'jack', 'herman', 'sam', or 'otto', unless a specific VRML agent-file is generated with another DEF prefix. This name is case-Sensitive. Local and World Vectors: ----------------------- "l|w" Unless this option is required, vectors are assumed to be in world coordinates. The user is responsible for understanding the distinction between VRML coordinates (local), where 'y' is up, and Performer coordinates (world), where 'z' is up. The user can spell out the word 'local' for clarity, or simply use 'l' for brevity. Descriptions: ------------ "param endMove []" The 'move' command is followed up by a Tscript message to notify the caller that the agent has arrived at the destination within a specified distance , which is 1 cm by default. The Tscript key-word is "vrAgentMoveComplete" by default, and can be changed with the optional argument . "param smoothBody " Most motors provide a smoothing factor over the range [0.0 -> 1.0) for averaging the previous value with a new value. The smoothBody factor is multiplied by hard-coded agent values to control the apparent deliberateness of body motion. A value of 1.0 results in a predefined slow and casual motion, whereas a value of 0.5 is more abrupt. Values greater than 1.0 may result in undefined behavior, so this is clamped. "param velocity " This parameter determines the rate of motion for the move command. "move " Move the agent to a world-coordinate location. The node which is assigned to this coordinate is _main_dcs, which corresponds to a point near the belly-button (center of gravity of a legged agent). Upon arrival at this point (within 1cm by default), a Tscript message is generated as follows: "vrAgentMoveComplete _main_dcs " where x, y, and z designate the point of arrival within the distance threshhold of the target position. "jump dcs l|w []" Assign agent's position to the location of node plus some local or world offset vector, and optionally assign agent's size to . The agent is then automatically tethered to this node and dynamically retains this spatial relationship until a subsequent move or jump command. "jump pos " Assign agent's position to the specified world coordinate, restoring the agent's scale to 1.0, and breaking any active tethers. "eyes " Begin orienting the agent's eyeballs toward the center of the bounding sphere of node . The associated tracking motors will continue to track the named node dynamically. "glance " Begin orienting the agent's eyeballs, head, and neck toward the center of the bounding sphere of node . The associated tracking motors will continue to track the named node dynamically. "look " Begin orienting the agent's eyeballs, head, neck, and upper body toward the center of the bounding sphere of node . The associated tracking motors will continue to track the named node dynamically. "focus " Begin orienting the agent's eyeballs, head, neck, chest, and waist toward the center of the bounding sphere of node . This command controls the orientation of the entire agent's body. The associated tracking motors will continue to track the named node dynamically. "pause" Disable motors associated with 'look' and 'focus'. "nod []" Begin nodding motion of neck joint with a magnitude of degrees from level. Each of nods should complete in a little over seconds. A negative value specifies head-shaking "NO". The value of defaults to 1. "eyebrows set " Set the translational and rotational offset for both eyebrows over a period of seconds, in meters and degrees. "eyelids set " Set the rotations of the left-upper, left-lower, right-upper, and right-lower eyelids, over a period of seconds, in degrees. The valid range is limited to about 20 degrees. "mouth set " Set the rotations of the upper-lip and lower-lip, over a period of seconds, in degrees. The valid range is limited to about 30 degrees. "mouth speak bgn|end [ ]" Begin or end sinusoidal motion of the mouth, such that the upper lip rotates from to degrees, and the lower lip rotates from to degrees, every seconds. When optional parameters are not specified, they will default to previously specified values. The "mouth set" command will also end this motion. "hand l|r|b pocket [ [ []]]" Move the left-hand, right-hand, or both hands to a pocket- position (by the hips) when a hand activity is complete. Every seconds, the hand will move up to from this position over a period of seconds. When optional parameters are not specified, they will default to previously stored values. "hand l|r|b ready" Move the left-hand, right-hand, or both hands to a ready- position (in front of the shoulder) when further hand activity is anticipated. "hand l|r|b pointAt " Configure hand into a pointing gesture, and direct it toward node such that the tip of the index finger is meters to the center of the node's bounding sphere. This command does not check to see if the target is within reach. If not, the arm separates at the elbow and the hand moves to the specified location. "hand l|r|b pointTo " Configure hand into a pointing gesture, and direct it toward node such that the tip of the index finger is meters from the shoulder. This command is intended for pointing to targets beyond reach. "hand l|r|b press " Configure hand into a pressing gesture, and direct it toward node such that the hand approaches from world- direction vector , and the tip of the index finger is meters from the target. This command does not check to see if the target is within reach. If not, the arm separates at the elbow and the hand moves to the specified location. "hand l|r|b grasp " Configure hand into a grasping gesture, and direct it toward node such that the hand approaches from world- direction vector , and the center of grasping is meters from the target. This command does not check to see if the target is within reach. If not, the arm separates at the elbow and the hand moves to the specified location. "hand l|r|b tether " Disable any motors controlling the hand position and orientation, and maintain the current offset from the target dynamically. This command does not check to see if the hand moves beyond reach. If so, the arm separates at the elbow and the hand follows the target. "hand l|r move l|w " Move the left-hand, right-hand, or both hands, over a period of seconds, to either a local position, relative to the corresponding shoulder, or a world-coordinate position. This command is intended as an explicit alternative to the predefined "hand l|r|b pocket|ready" commands, in conjunction with "hand l|r|b orient". "hand l|r|b orient euler l|w " Orient the left-hand, right-hand, or both hands, over a period of seconds, to either a local orientation, relative to the corresponding shoulder, or a world-coordinate orientation. Euler angles are premultiplied in the order { Y, X, Z }. Other orientation specifications, such as quaternions and rotation vectors, are available on request. Associated Vista Utilities: -------------------------- "vrLoadWrl " Old: Loads vrml files. : "/nfs/asd/user/file.wrl" : "file:/nfs/asd/user/file.wrl" "vrAddVRMLFile all stage_sys_dcs path/.main.wrl" Loads the vrml files for the specified agent. "vrFindNode _main_dcs" Asks Vista whether the agent's body has already been loaded. Vista will respond with the message vrFindNodeResult; the second argument of this return message will be the name of the node you asked about, and the third argument will be 1 or 0 (loaded or not loaded). This is useful because Vista does not allow you to delete a vrml file, and loading a second copy causes Vista problems. "vrSetVRMLField all _main_switch whichChild SFInt32 <0|1>" Setting this switch to 0 will disable the display of the entire agent. Setting to 1 will enable. This switch must be enabled once prior to the first 'vrExternalAPI agent' call, or an error will be reported for each call referencing that agent. "vrSetVRMLField all __shoulder_switch whichChild SFInt32 <0|1>" Setting this switch to 0 will disable the display of the entire arm, where is either 'left', or 'right'. If this is disabled prior to the first 'vrExternalAPI agent' call, no motors will be instantiated for that arm.