Actin  Version 5.5.5
Software for Robotics Simulation and Control
Melodrama Training

Introduction

Welcome to "Melodrama Tutorial"!

  1. Theatre terminology
    • Director
    • Script
    • Scene
    • Cast
      • Role
      • Actor -Direction
      • Manipulation direction (“speaking lines”)
      • Stage direction (other acting directions that are not “speaking lines”) -Cue

2.Basic Building Blocks

-Cast

-Pose

  • Fixed
  • Manipulator­relative

-Waypoint sequence

-Joint frame sequence

-Multi­Arm Waypoint sequence

-Path planning direction

  • Joint?
  • End effector?

Timed wait direction

  • Manual pause direction
  • Conditional direction
    • Preconditions
    • Persistent conditions
    • Directions
    • Post conditions

-Attach to direction

-Set attachment direction

-Stop direction

-Continue direction

-Collision exclusion direction

-Send signal direction (IO)

3.Assembling the Blocks

  • Controls
    • Gravity
  • Scenes
    • Drag­and­drop actions
    • Context menu insert
    • Drag­and­drop reordering
    • Drag­and­drop cues
  • Script
    • Append scene
    • Insert scene before/after

4.Execution

  • Controls
    • Play, Single Step, Pause, Stop
    • Gravity
    • Follow
    • Breakpoints
  • Run­time modifications
    • Insert direction
    • Move direction
    • Add/Modify Cue
    • Append scene

5.Other operations

  • Export to directory of XML files
  • Import from directory of XML files

6.Advanced

  • Listen and act on a signal sent from the manipulation director (IO)
  • Custom extensions
    • Custom conditions
    • Custom condition editor (GUI)
    • Custom directions
    • Custom direction editor (GUI)

Tutorial Storyboard

This Melodrama adapts the story from Dudley Do_Right .

Dudley Do_Right (http://en.wikipedia.org/wiki/Dudley_Do­Right)

Video (Watch first 30 seconds): https://www.youtube.com/watch?v=Q83Jqd2h0Yg

Roles

The following table gives details on the roles played in melo drama and the name of actor(manipulator) who plays each role.

Role Actor Played by
Dudley (Do­Right) Bill Scott
Snidely (Whiplash) Hans Conried
Nell (Fenwick … the damsel) June Foray
Audience

Poses

The following table lists out the poses used in the melodrama and describes each pose.

Pose Name Description
Nell Approach Pose relative to Nell
Nell GrabPose relative to Nell
Nell Above Tracks System pose
Nell On Tracks System pose
Nell Deliver Pose relative to Dudley
Nell Next To Dudley Pose relative to Dudley

Scenes

The following table lists out the scenes used in the melodrama and breaks down each scene into sub tasks.

Scene Name Description
Damsel In Distress 1. Snidely grabs Nell and places her on the train tracks
2. Audience says “Boo”
Intermission1. Manual pause until operator continues
2. Audience claps
Hero Saves The Day1. Dudley removes Nell from the train tracks
2. Audience says “Yeah”
3. Dudley puts Nell down next to him
Curtain Call 1. Audience “Claps”
2. Snidely and Dudley take a bow

Directions

The following table gives details on the directions.

Direction Name Description
Approach Nell Waypoint sequence to “Nell Approach” pose
Approach Tracks Waypoint sequence to “Nell Above Tracks” pose. I would like to make this an “End Effector Path Planning Action”
Close Gripper Gripper action to close the gripper finger
Deliver Nell Waypoint sequence to “Nell Deliver” pose followed by “Nell Next To Dudley”
Deliver Tracks Waypoint sequence to “Nell On Tracks” pose
Deliver Tracks Exclusions Collision exclusion direction to exclude gripper fingers from colliding with the stage
Deliver Tracks Inclusions Collision exclusion direction to include gripper fingers to collide with the stage
Grab Nell Waypoint sequence to “Nell Grab” pose
Grab Nell Exclusions Collision exclusion direction to exclude gripper fingers and wrist from colliding with Nell
Grab Nell Inclusions Collision exclusion direction to include gripper fingers and wrist to collide with Nell
Nell Tracks Exclusions Collision exclusion direction to exclude Nell from colliding with the rails
Nell Tracks Inclusions Collision exclusion direction to include Nell to collide with rails
Open Gripper Gripper action to open gripper
Ready Pose Joint frame sequence to a ready pose
Starting Pose Joint frame sequence to a starting pose
Take A Bow Joint frame sequence to bow
Terrorize Nell Joint frame sequence

Construct the Actors and Stage

Set Simulation and Plugins

  • Load toolkits/data/actin/melodrama/cytonGamma1500R4.ecz.
  • Load the following plugins (“Plugins­>Load Plugin…”, select <pluginName>, click OK)
    • “Status Plugin” (statusPlugin)
    • “Control System Plugin” (controlSystemPlugin)
    • “Collision Exclusion Plugin” (collisionExclusionPlugin)
    • “Shape Primitive Plugin” (shapePrimitivePlugin)
    • “Manipulation Director Plugin” (manipulationDirectorPlugin)
    • “Melodrama Plugin” (melodramaPlugin)
    • "Manipulator Config Plugin" (manipulatorConfigPlugin) if it is not loaded by default
  • Set Gripper Finger settings
    • Open the “Manipulator Configuration” dock by clicking on "Numerical Configuration of Manipulators" option from toolbar and Select “Motion Constraints” tab.
    • Specify 14mm for z value of “Gripper Finger [1]”
    • Press “Play” button on the tool bar. You should see the gripper move slightly.
    • Press “Stop” button on the tool bar
    • Close the “Manipulator Configuration” dock
  • Set Joint Limit Avoidance
    • Open the “Position Control System Properties” dialog (Edit­>Position Control System­>Control System Parameters)
    • Double­click on “ControlSystemDesc0” to open the “Velocity Control Description” dialog Change the “Weight” value for “Joint Limit Avoidance” to ­4
    • Press the “OK” button to close the “Velocity Control Description” dialog
    • Press the “OK” button to close the “Position Control System Properties” dialog
      melodrama_image1.png
  • Save Simulation

    • “File­>Save As…”, and save the simulation out as melodrama.ecz
    melodrama_image2.png

Create Actors

  • Construct Stage and BillScott

    • Right­click on the floor and select “Manipulator­>Rename” from the context menu Specify “Stage” as the new name
    • Right­click on the robot and select “Manipulator­>Rename” from the context menu Specify “Bill_Scott” as the new name
    • Right­click on Bill_Scott and select “Manipulator­>Clone” from the context menu Set Y value to ­0.4 in the dragger dock
    melodrama_image3.png
    • Press Esc to complete moving the clone.
    • Right­click on the clone and select “Manipulator­>Rename” from the context menu Specify “Hans_Conried” as the new name
    • Right­click on Bill_Scott and select “Manipulator­>Move” from the context menu Set Y value to 0.4 in the dragger dock
    • Press Esc to complete moving the robot
  • Set Collision data between manipulators
    • Show the collision exclusion dock by selecting “Edit­>Collision Exclusion­>Edit Collision Exclusion Map”
    • Select “Stage­Manipulator” under “Current Link/Manipulator (s)”, and then select “Cyton Gamma R4­Link” under “Excluded Links/Manipulators”
    • Press the “Apply” button, and close the collision exclusion dock
      melodrama_image4.png
  • Construct JuneForay
    • Go to “Add Shape as Manipulator” by selecting “Edit­>Add Shape to System”
    • Select “capsule” as the primitive, uncheck “Fixed Base”, define the radius property to be 0.01, and specify the label as “June_Foray”
      melodrama_image6.png
    • Press the OK button
    • Set the Dragger to X=0.0, Y=0.0, Z=0.115, Roll=0.0, Pitch=1.5708, Yaw=3.141592 to configure June’s origin
    • Right­click on June_Foray and select “Manipulator­>Move” from the context menu Set X value to 0.5 and Y value to ­0.4 in the dragger dock
    • Press Esc to complete moving the shape.
    • Now the actors are on the stage
      melodrama_image7.png
  • Save the simulation (File­>Save)
  • Contruct Rail1 and Rail2
    • Go to “Add Shape as Manipulator” (“Edit­>Add Shape to System”)
    • Select “capsule” as the primitive, define the length property to be 0.6 and the radius property to be 0.01, and specify the label as “Rail1”
    • Press the OK button
    • Set the Dragger to X=0.0, Y=0.0, Z=0.0, Roll=­1.5708, Pitch=0.0, Yaw=­3.141592 to configure the rail’s origin
    • Right­click on Rail1 and select “Manipulator­>Clone” from the context menu Set Y value to ­0.08 in the dragger dock
    • Press Esc to complete moving the clone.
    • Right­click on the clone and select “Manipulator­>Rename” from the context menu Specify “Rail2” as the new name
    • Right­click on Rail1 and select “Manipulator­>Move” from the context menu Set Y value to 0.08 in the dragger dock
    • Press Esc to complete moving the shape
  • Now the stage is set.
melodrama_image8.png
  • Save the simulation (File­>Save)

Construct the Manipulation Director

Define the Cast

  • Show the manipulation director dock by selecting toolbar button for Manipulation Director
    menubutton.png
  • In the Tool menu for the manipulation director dock, select "New" option.
  • In the Tool menu for the manipulation director dock, select “Edit Cast" Option.
castbutton.png
  • Double­click on “June_Foray”, change the “Role” to “Nell”, and press the OK button The role of Nell is now being played by June_Foray
  • Double­click on “Hans_Conried”, change the “Role” to “Snidely”, and press the OK button The role of Snidely is now being played by Hans_Conried
  • Double­click on “Bill_Scott”, change the “Role” to “Dudley”, and press the OK button The role of Dudley is now being played by Bill_Scott
  • Double­click on “Stage”, change the “Role” to “Audience”, and press the OK button
  • Press the OK button in the “Edit Cast” dialog
melodrama_image9.png
  • Save the “manipulation director” file by selecting “File­>Save” in the menu for the manipulation director dock and specifying the name melodrama.ecd

Define the Poses

Select the “Poses” tab in the manipulation director dock

Nell_Grab

  • Right­click in the “Poses” tab and select “New Pose” from the context menu Specify “Nell_Grab” as the “Pose Name” and press the “OK” button
  • Check “Is Relative”
  • Check “Dragger Pose” to see the location of the pose Select “June_Foray” for “Manipulator”
  • Set X=­0.03, Y=0.0, Z=0.12, Roll=1.5708, Yaw=­1.5708 in the relative group
melodrama_image10.png

Nell_Approach

  • Drag “Nell_Grab” to the empty space below in the “Poses” tab and select “Copy” from the context menu
  • Specify “Nell_Approach” as the “Pose Name” and press the “OK” button Double­click on “Nell_Approach”
  • Change X=­0.12, Z=0.25, and Roll=1.1 in the relative group

Nell_Above_Tracks

  • Create and edit a new pose called “Nell_Above_Tracks” Set X=0.0, Y=0.0, Z=0.08 in the dragger group

Nell_On_Tracks

  • Create and edit a new pose called “Nell_On_Tracks” as a copy of “Nell_Above_Tracks” Set X=0.0, Y=0.0, Z=0.04 in the dragger group

Nell_Next_To_Dudley

  • Create and edit a new pose called “Nell_Next_To_Dudley” Check “Is Relative”
  • Select “Bill_Scott” for “Manipulator” and “Link”
  • Set X=0.5, Y=0.0, Z=0.12. Roll=1.5708, and Yaw=­1.5708 in the relative group

Nell_Deliver

  • Create and edit a new pose called “Nell_Deliver” as a copy of “Nell_Next_To_Dudley” Change the Z value to 0.18
  • Save the pose file by selecting “File­>Save Poses…” in the menu for the manipulation director dock and specifying the name melodramaPoses.ecz
melodrama_image11.png
  • Uncheck “Dragger Pose” Close all of the pose tabs

Define Some Directions

Select the “Directions” tab in the manipulation director dock

Open_Gripper

  • Right­click in the “Directions” folder and select "New Gripper Action” from the buttons or from the context menu
  • Specify “Open_Gripper” as the name and press the “OK” button
  • Select “Role”=”Dudley”, “End Effector Set”=”Frame EE”, and “Desired Percentage”=98%
melodrama_image12.png

Close_Gripper

  • Drag and drop Open_Gripper in the Directions tab on the “Directions” folder
  • Select “Copy” from the context menu, specify the name “Close_Gripper”, and press the “OK” button
  • change the “Desired Percentage” to 60%.

Test Gripper Actions

  • Now press the manipulation director “Play” button in the lower left corner of the manipulation director dock
  • You should see Dudley’s gripper close
  • Select the Directions/Gripper_Open tab, and press “Play” again You should see Dudley’s gripper open
  • Close the Open_Gripper and Close_Gripper tabs
  • Save the manipulation director

Starting_Pose

  • Right­click in the “Directions” folder and select “New Joint Frame Sequence” from the buttons for from the context menu, Select “Dudley” for “Role”
  • Specify “Starting_Pose” as the name and press the “OK” button
  • Right­click in the main area and select “Add Joint Frame” in the context menu
melodrama_image13.png

Ready_Pose

  • Create and edit another “Joint Frame Sequence” called “Ready_Pose”
  • Now open the “Manipulator Configuration” dock
  • Make sure "Bill_Scott” is selected, and play with the joint sliders to make a ready pose Use the following joint values: 0, ­0.35, 0, 0.7, 0, 0.85, 1.5708, 0.0147
melodrama_image14.png
  • Now close the “Manipulator Configuration” dock
  • Right­click in the main area of “Directions/Ready_Pose” and select “Add Joint Frame” in the context menu
  • Test Starting_Pose and Ready_Pose: Select “Directions/Starting_Pose” and “Play” the manipulation director Select “Directions/Ready_Pose” and “Play” the manipulation director Change “Role” to “Snidely” and “Play” the manipulation director

Take_A_Bow

  • Create and edit another “Joint Frame Sequence” called “Take_A_Bow” Select “Dudley” for “Role”
  • Select the “Directions/Starting_Pose” tab, right­click on “Joint Frame 1”, and
  • select “Move To Joint Frame” from the context menu
  • Select the “Directions/Take_A_Bow” tab
  • Right­click in the main area and select “Add Joint Frame” in the context menu
  • Select the “Directions/Ready_Pose” tab, change the role to “Dudley”, right­click on “Joint Frame 1”, and select “Move To Joint Frame” from the context menu
  • Select the “Directions/Take_A_Bow” tab
  • Right­click in the main area and select “Add Joint Frame” in the context menu
  • Right­click on “Joint Frame 1”, and select “Move To Joint Frame” from the context menu Right­click in the main area and select “Add Joint Frame” in the context menu
  • Test Take_A_Bow : “Play” the manipulation director and watch “Dudley” take a bow
melodrama_image15.png
  • Change “Role” to “Snidely”
  • “Play” the manipulation director and watch “Snidely” take a bow
  • Close Directions/Starting_Pose, DIrections/Ready_Pose, and Directions/Take_A_Bow Save the manipulation director

Create Our First Scene

Select the “Scenes” tab

Curtain_Call

  • Right click in the “Scenes” tab and select “New Scene…” from the context menu Specify “Curtain_Call” as the name, select “Audience”, “Dudley” and “Snidely”
  • Select the “Directions” tab
  • Drag “Starting_Pose” into the Snidely and Dudley columns
  • Right­click on both directions and select “Rename…” from the context menu Specify “Stand Up” as the tag
  • Drag “Take_A_Bow” into the Snidely and Dudley columns, and rename them both to “First Bow”
  • Drag “Take_A_Bow” into the Snidely and Dudley columns (again), and rename them both to “Second Bow”
  • Left­click on “First Bow” from the Dudley column, drag to “First Bow” from the Snidely column This creates a “cue” for Dudley to wait until after Snidely’s first bow before bowing
  • Left­click on “Second Bow” from the Snidely column, drag to “First Bow” from the Dudley column

This creates a “cue” for Snidely to wait until after Dudley’s first bow before bowing the second time

  • Left­click on “Second Bow” from the Dudley column, drag to “Second Bow” from the Snidely column
  • Right­click on “Second Bow” in the Dudley column and select “Edit Cues…” from the context menu
  • Change “Type” to “SIMULTANEOUS” in the “Edit Cues” dialog and press the “OK” button This means Dudley and Snidely will take their second bow together
  • Right­click in the Audience column and select “Insert Direction…” from the context menu Select “Timed Wait Direction” for “Type”, set the “Wait Duration” to 2 seconds, and press the “OK” button
  • Insert a “Send Signal Direction”
  • Specify “melodrama” for “Signal Name”, “StartClapping” for “Signal Message”, and “Start Clapping” for “Tag”
  • Insert another “Send Signal Direction” to “Stop Clapping”
  • Create cues for “Wait 2 seconds” to start after both “Stand Up” directions Create a cue for Snidely’s “First Bow” to wait until after “Start Clapping” Create cues for “Stop Clapping” to start after both “Second Bow” directions
  • Now the audience will start clapping before the bows and continue clapping until all of the bowing is complete
melodrama_image16.png
  • Test Curtain_Call “Play” the manipulation director and watch the curtain call
  • Close all tabs
  • Save the manipulation director

Define More Directions

Select the “Directions” tab

Approach_Nell

  • Create and edit a new “Waypoint Sequence” called “Approach_Nell”
  • Select “Snidely” role, “Frame EE” end effector set, and “Wrist Roll [0]” end effector
  • Select “Poses” tab and drag “Nell_Approach” to the main area of Directions/Approach_Nell
melodrama_image17.png
  • “Play” the manipulation director and watch “Snidely” approach “Nell”

Grab_Nell

  • Create and edit a new “Waypoint Sequence” called “Grab_Nell”
  • Select “Snidely” role, “Frame EE” end effector set, and “Wrist Roll [0]” end effector Select “Poses” tab and drag “Nell_Grab” to the main area of Directions/Grab_Nell “Play” the manipulation director and watch “Snidely” move to grab “Nell”
  • Diagnose the Failure Failed!
  • Notice the status message at the bottom reports “Collision”, also showing the links as show in the image highlighting the links; Then displays the error message.
melodrama_image18.png

We see that “Gripper Finger” of Hans_Conried (Snidely) collided with June_Foray (Nell) This is to be expected

Correct the Failure

Now what?

  • Select “Directions/Approach_Nell” tab and “Play” the director
  • This moves Snidely out of collision until we can figure out a solution
  • There are two options: use the collision exclusion dock to add a collision exclusion or use a collision exclusion direction. The collision exclusion dock is mainly used for permanent collision exclusions, while the collision exclusion direction is intended for more dynamic changes. For instance, we want to exclude collisions between Snidely and Nell only while Snidely is grabbing Nell. After Snidely releases Nell, the collisions should be included again.
  • Right­click in the “Directions” folder and select “New Direction­>Collision Exclusion Direction” from the context menu
  • Specify “Grab_Nell_Exclusions” as the name and press the “OK” button
  • In the “New Manipulation Direction Dialog”, select “Snidely” as the “Active Role” Click on “Gripper Finger” in the left column and then “Nell” in the right column Click on “Gripper Finger­1” in the left column and then “Nell” in the right column
melodrama_image19.png
  • Press the “OK” button to close the dialog
  • Double­click on Grab_Nell_Exclusions in the “Directions” tab to edit it Select “Snidely” for “Active Role”
  • “Play” the manipulation director
  • Now Snidely’s fingers will not cause a collision with Nell
  • Select “Directions/Grab_Nell” tab and “Play” the director
  • Now there is a new collision: “Wrist Roll” of Hans_Conried (Snidely) collided with June_Foray (Nell)
  • Looking closely, there does not appear to be a collision
melodrama_image20.png
  • Turning on the bounding volumes makes the collision more apparent
melodrama_image21.png
  • Turn off the bounding volumes
  • Select “Directions/Approach_Nell” tab and “Play” the director to move Snidely out of collision again
  • Edit Grab_Neil_Exclusions again and add the exclusion for “Wrist Roll” and Nell “Play” the director
  • Select “Directions/Grab_Nell” tab and “Play” the director Success!

Fine Tuning Grab_Nell

Looking closely, we can see that we should move a little closer to Nell

melodrama_image22.png
  • Edit Nell_Grab pose and change the X value to ­0.02 Select “Directions/Grab_Nell” tab and “Play” the director Now we are in a much better position to grab Nell
  • Close all tabs
  • Save the manipulation director Save the poses

Put Some Pieces Together

Edit Directions/Ready_Pose, select “Snidely”, and “Play” the director

Grab_Nell_Inclusions

  • Create and edit a new “Collision Exclusion Direction” called “Grab_Nell_Inclusions” as a copy of “Grab_Nell_Exclusions”
  • Select “Snidely” for the “Active Role” and “Include” for “Collision type” We just created a direction to undo the effects of Grab_Nell_Exclusions “Play” the director
  • Now Snidely can again collide with Nell Close

Start Damsel_In_Distress

  • Create and edit a new scene called “Damsel_In_Distress” Add Dudley and Snidely roles
  • Drag Ready_Pose to Snidely and Dudley Drag Approach_Nell to Snidely
  • Drag a cue from Approach_Nell in Snidely’s column to Dudley’s direction
  • Insert a “Send Signal Direction” in Snidely’s column named “melodrama” with the message “Bwahaha” and the tag “Bwahaha”
  • Drag Open_Gripper to Snidely Insert a 3 second wait to Snidely
  • Drag Grab_Nell_Exclusions to Snidely Drag Grab_Nell to Snidely
  • Drag Close_Gripper to Snidely
  • Insert a “Set Attachment Direction” in Snidely’s column with “Attached Role” Nell and “Base Link” “Wrist Roll”
melodrama_image23.png
  • “Play” the director and watch Snidely grab Nell Now Nell is attached to Snidely
  • Close all the tabs and Save the manipulation director

Terrorize_Nell

  • Create and edit a new “Joint Frame Sequence” called “Terrorize Nell” Select “Snidely”
  • Use “Manipulator Configuration” to slide Hans_Conried Shoulder Pitch to ­0.6 and “Add Joint Frame”
  • Use “Manipulator Configuration” to slide Hans_Conried Shoulder Roll to ­2.7 and “Add Joint Frame”
  • Use “Manipulator Configuration” to slide Hans_Conried Shoulder Roll to 2 and “Add Joint Frame”
  • Add one more joint frame with the following values: 1.7, ­0.6, 0, 0.94, 0, 1.2, 1.65, 0.009 “Play” the director

Approach_Tracks

NOTE: I would like to make this an “End Effector Path Planning Action” Create and edit a new “Waypoint Sequence” called “Approach_Tracks” Select “Snidely”, “Frame EE”, “Wrist Roll [0]”

Drag Nell_Above_Tracks pose “Play” the director

melodrama_image24.png

Deliver_Tracks_Exclusions

Create and edit a new “Collision Exclusion Direction” called “Deliver_Tracks_Exclusions” Select Snidely “Active Role” and add exclusions for the fingers with Audience (which is the stage floor)

Deliver_Tracks_Inclusions

Copy Deliver_Tracks_Exclusions into Deliver_Tracks_Inclusions

Nell_Tracks_Exclusions

Create and edit a new “Collision Exclusion Direction” called “Nell_Tracks_Exclusions” Select Nell “Active Role”, “shape” on the left column, and “Rail1” and “Rail2” on the right column

Nell_Tracks_Inclusions

Copy Nell_Tracks_Exclusions into Nell_Tracks_Inclusions

Deliver_Tracks

Create and edit a new “Waypoint Sequence” called “Deliver_Tracks” Select “Snidely”, “Frame EE”, “Wrist Roll [0]”

Drag Nell_On_Tracks pose

Reset Simulation

We should now have all of the pieces necessary to complete Damsel_In_Distress Reset the simulation (SImulation­>Reset to Home)

Close all the tabs and Save the manipulation director

Finish Damsel_In_Distress Edit Damsel_In_Distress scene Add Audience and Nell columns

  • Drag Terrorize_Nell to the Snidely column Drag Approach_Tracks to the Snidely column
  • Drag Deliver_Tracks_Exclusions to the Snidely column
  • Insert a “Send Signal Direction” in Nell’s column named “melodrama” with the message “Scream” and tag “Scream”
  • Drag a cue from Scream to Terrorize_Nell Make the cue simultaneous
  • Drag Nell_Tracks_Exclusions to the Nell column
  • Drag a cue from Nell_Tracks_Exclusions to Approach_Tracks Drag Deliver_Tracks to the Snidely column
  • Drag Open_Gripper to the Snidely column
  • Insert “Set Attachment Direction” in the Snidely column Detach Nell Drag Approach_Tracks to the Snidely column
  • Drag Deliver_Tracks_Inclusions to the Snidely column Drag Grab_Nell_Inclusions to the Snidely column Drag Ready_Pose to the Snidely column
  • Insert a “Send Signal Direction” in the Audience column named “melodrama” with the message “Boo” and tag “Boo”
  • Drag a cue from Boo to Deliver_Tracks
  • Insert 3 second wait between Deliver_Tracks and Open_Gripper
melodrama_image25.png

Test Damsel_In_Distress

  • “Play” the director
  • Close all the tabs and Save the manipulation director

Deliver_Nell

  • Create and edit a new “Waypoint Sequence” called “Deliver_Nell” Select “Dudley”, “Frame EE”, “Wrist Roll [0]”
  • Drag Nell_Deliver pose
  • Drag Nell_Next_To_Dudley pose

Hero_Saves_The_Day

  • Create and edit a new scene called “Hero_Saves_The_Day” with the roes Audience, Dudley, Nell, and Snidely
  • Drag Ready_Pose into the Dudley and Snidely columns Drag Approach_Tracks into the Dudley column
  • Drag Open_Gripper into the Dudley column
  • Drag Deliver_Tracks_Exclusions into the Dudley column Drag Grab_Nell_Exclusions into the Dudley column Drag Grab_Nell into the Dudley column
  • Drag Close_Gripper into the Dudley column
  • Insert a “Send Signal Direction” in the Nell column named “melodrama” with the message “MyHero” and tag “My Hero”
  • Drag a cue from My Hero to Close_Gripper
  • Insert a new “Attach To Direction” into the Nell column with “Base Role” Dudley and “Base Link” Wrist Roll
  • Notice the different “attach” directions. In the “set attachment direction”, a role commands the object (Nell) to attach to it. In the “attach to direction”, the object (Nell) decides what to attach to. Nell did not have a choice when Snidely grabbed her, but she chooses to latch on to her hero.
  • Insert a 3 second wait into the Nell column Drag Approach_Tracks into the Dudley column
  • Drag a cue from Approach_Tracks to Wait 3 seconds Drag Nell_Tracks_Inclusions into the Nell column
  • Drag a cue from Nell_Tracks_Inclusions to Approach_Tracks Drag Deliver_Tracks_Inclusions into the Dudley column Drag Deliver_Nell into the Dudley column
  • Drag Open_Gripper into the Dudley column
  • Insert a new “Attach To Direction” into the Nell column to Detach Drag a cue from Detach to Open_Gripper
  • Drag Approach_Nell into the Dudley column Drag a cue from Approach_Nell to Detach
  • Drag Grab_Nell_Inclusions into the Dudley column Drag Ready_Pose into the Dudley column
  • Insert a “Send Signal Direction” in the Audience column named “melodrama” with the message “Yeah” and tag “Yeah”
  • Drag a cue from Yeah to Deliver_Nell, and make the cue simultaneous
melodrama_image26.png
  • “Play” the director

Close all all the tabs

  • Save the manipulation director

Intermission

  • Copy the Curtain_Call scene to Intermission and edit it
  • Right­click in the Dudley header and select “Delete” from the context menu Delete the Snidely column
  • Insert a “Manual Pause Direction” between “Start Clapping” and “Stop Clapping” Right­click on the scene block (Curtain_Call) and select Edit from the context menu Specify Intermission as the “Scene Tag”
melodrama_image27.png
  • “Play” the director
  • The audience loves the show so much they clap through the entire intermission When execution gets to the manual pause, press the red button to continue

Dress Rehearsal (Or Composing the Script)

  • Reset the simulation
  • Go to the scripts tab; Right click or click on + button to create a new script. Name it as "melodrama_part1".
  • Drag Damsel_In_Distress to the scenes header
  • Drag Intermission to the header.
  • Drag Hero_Saves_The_Day to the header.
  • Finally drag Curtain_Call to the header
script1.png

Complete?

  • The script is complete!
  • Right click on the script and select the option - Set as default
    default_script.png
  • Save the manipulation director
  • Reset the simulation and play the entire script.
  • Play around with the gravity checkbox during execution.

Adding Safety Checks

  • Try running the entire script again without resetting the simulation The script fails early because Snidely cannot get to Approach_Nell Nell is not in her correct starting position
  • How do we prevent Snidely from looking foolish when Nell is not in the correct starting position?
  • Edit the Damsel_In_Distress scene

    • Before Snidely’s first direction insert a new “Conditional Direction”
      melodrama_image28.png
    • The conditional direction contains four regions: PreConditions, Persistent Conditions, Directions, and PostConditions. PreConditions are conditional expressions that must be satisfied before executing the Directions. Persistent Conditions are conditional expressions that must be satisfied during the execution of the Directions. PostConditions are conditional expressions that must be satisfied following the execution of the Directions.
    • Right­click inside PreConditions and select “Add Element” from the context menu
    melodrama_image29.png
    • Double­click in the “Stop sign” to edit the condition
    • Select “Has Attachment” and do not specify the “Attached Role” or “Base Link”
    melodrama_image30.png
    • Press the “OK” button to close the editing dialog

    We want this condition to be false to ensure Snidely does not currently have an attachment Right­click on the “hasAttachment” symbol and select “Insert NOT” from the context menu

    melodrama_image31.png
    • This conditional expression is complete, so press the “OK” button to close the editing dialog,
    • Now add another “Role Location” PreCondition

    We want Nell to be in a specific region relative to Snidely, so select “Nell” and “Relative Location”

    • Check the minimum and maximum X and Y boxes and specify min X=0.1, max X=0.6, min Y=­0.1, max Y=0.1
    melodrama_image32.png
    • Press the “OK” button for the “Edit Condition” dialog and “Edit Conditional Expression” dialog
    melodrama_image33.png

    Notice that both conditions have a “Stop” box to the right. This is the “Exception” direction that runs if the conditional expression returns False. In this case, “Stop” will cause the manipulation director to stop executing with a failure. A context menu allows editing the “Exception” behavior to run any number of directions. This provides the potential for conditional directions to recover from unexpected conditions.

    • Right­click inside Directions and select “Add Element” from the context menu Select “Continue Direction”
    • We do not need to do anything fancy when all of the PreConditions pass, so we just “Continue”
    melodrama_image34.png
    • Press the “OK” button to close the “New Manipulation Direction” dialog The “Conditional Direction” is now complete
    melodrama_image35.png
    • Press the “OK” button to close the dialog
  • Now “Play” the director and notice that it fails at a Pre­Condition before Snidely moves “Stop” the director

It is important to note that scenes are referenced in the script. This means we need not have to edit the script to replace the old Damsel_In_Distress with the new one.

  • Close all the tabs.
  • Save the manipulation director
  • “Play” the director
  • Now go through the same process to add a conditional direction to Dudley in the Hero_Saves_The_Day scene

Changing Actors

Following the successful completion of the script, attempt to run again as­is. This should fail because built­in conditions say that Nell is already with Dudley, so Snidely cannot grab her. Need to add “distance condition” for this. Change the actors assigned to the roles and run script (i.e. Snidely and Dudley swap). This should now succeed.

  • Hans_Conried is tired of always being the villain. After a show, he and Bill_Scott decided to switch roles.
  • “Stop” the director Edit the cast
  • Change Snidely’s actor to “Not Specified” Change Dudley’s actor to Hans_Conried Change Snidely’s actor to Bill_Scott
  • Currently, the relative poses use manipulator names instead of role names, so we need to edit the Nell_Deliver and Nell_Next_To_Dudley poses to switch Bill_Scott to Hans_Conried. In the future, the pose set will use role names, so this step will not be needed.
  • “Play” the director
  • “Approach_Tracks” fails because we use a waypoint sequence

It is possible that changing this to a path planning action would fix this.