Software - Shirt Flinger

 

This application reads 3D geometry parameters from an XML file, then generates and displays a Java3D model. The program provides the user with a set of Swing-based GUI controllers to manipulate the movable parts and animate them. The controllers give the user the ability to control all aspects of the movements and behaviors.

Individually the program parts are a generic solid modeler, and a set of controllers and analyzers.

Collectively, however, it is a simulator of a robotic arm that reaches into a basket, grabs a rolled up T-shirt, and hurls it into an auditorium.

Download the PowerPoint Presentation I delivered at JavaOne 2005 (the Java Developer's Conference)

This program was written as the subject for a presentation I was invited to give at software developer's conference on the ease of using 3D imagery in project visualization. They had a contest each year to design and build the geekiest contraption to hurl T-shirts into the audience. My imagination was a little geekier than my ability to actually build the hardware, so instead I wrote this simulator. What a hoot!

Details

 This program displays three windows: a 3D perspective of the ShirtFlinger model in an auditorium with the seating and stage outlined on the floor, a plan-view drawing of the auditorium for a high-level Control Center, and a set lower-level controllers for diagnostics.

 

The 3D Perspective Window

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\perspective_2.jpg

 

The ShirtFlinger model consists of a base, a rotating platform, three legs of a tower, an array of motors, gears, pivoting swing arms, and a rotating hand. Next to the base is a set of 11 little baskets holding rolled up T-shirts. When the shirts are all thrown, they are automatically replaced in the baskets.

 This screen has mouse control of the perspective; it can navigate the view point around, including moving and rotating in 3D; in other words you can move and rotate in/on all 3 axiis (up/down, right/left, and forward/backward). The rotation can be with respect to either the model or the view. For example you can spin the model or spin the view.

 

The Control Center Window

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\control_center_2.jpg

 

Ok, so the auditorium planners weren’t union. But you get the idea. The chairs are in the turquoise areas, and the stage is the blue rectangle, the ShirtFlinger is at the red square, and the target position is in green.

 When you click on the screen the target moves there, then the ShirtFlinger, grabs a shirt, winds up, and flings it there. While the shirt is in the air, it appears as a moving yellow dot (see it half way up the left aisle). A red dot marks the locations where shirts have already been flung to.

 Clicking on the red square toggles the Shirtflinger into and out of continuous mode – which repeatedly selects a random target position in the auditorium and flings shirts until stopped.

 

The Controllers Window

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\environment_controllers_2.jpg

 

The Controllers window contains toggles, sliders, and display values to give you the ability to manually manipulate a number of features.

 

These are the Environment controls:

*      A Model-Map is text file explaining all the Java3D elements on the model.

*      The Motions Log contains a list of the motions of each of the movable interfaces in a cycle.

*      The Perspective Z-Axis Lock normalizes the right/left tilt; assuring the up-side is always upward. Unlocking it you can tilt the perspective in an awkward angle.

*      Full Screen toggles the size of the perspective window to occupy the full screen or small enough that the control windows don’t overlap the image.

*      Diagnostics output is a text file containing a lot of programming metrics as to what is going on “under the hood”.

*      The Kinematics Log contains a list of data useful for off-line analysis of the motions to calculate things like inertia, motor torque, etc.

*      Locking the View Point onto the Hand moves the perspective point close to the hand, and automatically follows it as it moves around.

*      The Clock Speed allows you to set the physics of time. Normal time moves things so fast that it is difficult to see what it is actually doing, so slowing it down makes the movements more interesting to watch.

*      The Frame Rate is how fast the program will (try) to update the image; the Actual Frame Rate is how fast it actually is able to do it.

 

These are the Trace Movement controls:

*      The Points draw lines showing where the respective objects will move in the current cycle.

*      The Lines draw lines showing where the respective objects will appear at 5 degree increments through the current cycle.

*      Notice that there are actually two cycles for each fling of a shirt: a Load cycle and a Fire cycle. The Trace Movements only show the tracings for the cycle type in progress.

 

The Controllers Window (continued)

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\high_level_controllers_2.jpg

 

The High-Level Actions are the kinds of things that clicking on the Control Center window computes and controls automatically.

 

The Controllers Window (continued)

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\low_level_controllers_2.jpg

 

The Low-Level Actions control the joints individually. These are normally controlled automatically by the clock of the High-Level Actions.

 

A Close-Up View of the Shoulder and Hand

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\shoulder_n_hand_2.jpg

 

Notice the motor (green), and idler gear (grey) driving the shoulder gear (blue), and the motor (red) driving the wrist gear (grey), and the hand-spin motor gear (grey) driving the hand (for spinning).

 

A Close-Up View of the Whole Arm Mechanism

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\whole_arm_2.jpg

 

Notice the multiple simultaneous movements.

 

Wrist and Elbow Movement Tracings

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\wrist_n_elbow_2.jpg

 

Notice the complex movement of the Hand as a composite of all the other rotations.

 

Wrist and Shirt Tracings

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\wrist_n_shirt_2.jpg

 

Notice the elegant motion of a simple movement – very nice.

 

The Shirt takes Flight

Description: Description: C:\Users\Mike\MikeBrownProjects.net\ShirtFlinger_images\shirt_flight_2.jpg

 

The shirt just released following the trace from the hand.