Programming manual - Ryerson University

advertisement
Ryerson University
Department of Aerospace Engineering
AER 403
Mechanisms and Vibrations
Programming Manual
Winter 2005
RoboWorks User Instruction
1. Getting Started
From MS Windows, click on the icon
or go to “Program” to find RoboWorks. Ignore
the error message and click “OK”. This will bring you up to the RoboWork main window as
shown below.
To create a new file, click “File” on the top of the RoboWorks main window and select “New”.
There are two sub-windows, one for drawing and another for hierarchy tree.
Hierarchy
tree
Drawing
Jeff Xi 2004/12
2
2. Creating Object Groups
In the tree window, left click on “red/blue/green” bar beside “Root”
to highlight
it. (Please make sure to left click on the BAR not the NAME “Root”. Otherwise, the system
will crash. This is true for all items in the tree window.) Then right click to bring up the pulldown menu and select “Insert Child”. This will give you the “Node Selector” window as shown
below.
Select “Other” from the top of the “Node Selector” window, leading to the next window.
Select “Group” to bring up the following window and type “Slider” in the “Name” input box,
and then click “Ok”.
Jeff Xi 2004/12
3
Now in the tree window, a “+” sign will appear on the left-hand side of “Root” and click on the
“+” sign to show the first object group that you have just created under the name “Slider”.
To create the second object group, left click on “red/blue/green” bar beside “Slider” to highlight
it. (Again, as mentioned before, please make sure to left click on the BAR not the NAME
“Slider”. Otherwise, the system will crash. This is true for all items in the tree window.)
Then right click to bring up the pull-down menu and select “Insert After”. Afterwards, repeat the
remaining steps as for the first object group. Name the second group “Link”. When you finish,
your window should include two object groups as shown below.
Jeff Xi 2004/12
4
3. Coordinate Systems
Move the cursor into the drawing window. Left click to select this window. Once in this window,
right click to bring up the pull-down menu. There are a number of selections. Select “Grid” to
display the global coordinate system as shown below. It only shows x and z axis, while y axis is
perpendicular to the x-z plane.
Jeff Xi 2004/12
5
4. Modelling an Object
4.1 Create the First Object (Slider)
Move the cursor back to the tree window, left click on the “red/blue/green” bar beside “Slider” to
select it. Right click and then select “Insert Child”. In the ““Node Selector” window, select
“Cube”. This will bring you up to the following window. Input the name and sizes as shown
below.
The coordinates
of the center of
the cube in its
local coordinate
system.
Objects are
drawn in their
respective local
coordinate
systems.
Note that the directions of width, height and depth correspond to x, y and z axis, respectively.
Now, you have a cube displayed in the drawing window. In the tree window, there is a child
object called “cube” under “Slider” group, as shown in Figure below on the left. Turn off “Grid”
and turn on “Coordinate Frames”, leading to the Figure below on the right, with a local
coordinate system attached.
Jeff Xi 2004/12
6
4.2 Create the Second Object (Link)
Again, move the cursor back to the tree window, left click on the “red/blue/green” bar beside
“Link” to select it. Right click and then select “Insert Child”. In the ““Node Selector” window,
select “Transformation ”. This will bring you up to the following window. Input the name and
sizes as shown.
This will translate the origin of the coordinate system along the y axis by 50 (i.e. static
translation). To create the base for the link, left click beside “Y translation”, and right click to
select “Insert After”. In the “Node Selector” window, select “Cube”. Input the name and sizes as
shown below.
The coordinates
of the center of
the cube in its
local coordinate
system.
Jeff Xi 2004/12
7
Repeat the same steps to create the cylinder and the disk (as the cover for the cylinder), with
inputs shown below.
Repeat the same steps to create the link (cube).
The coordinates
of the center of
the components
in 2nd local
coordinate
system for the
link.
Jeff Xi 2004/12
8
Once done all that, you should now have the following drawing with associated tree.
5. Animation
5.1 Manual Method
Move the cursor back to the tree window and in the slider group, insert “Transformation ” above
the cube. Input the name as shown on the left Figure below. Click on “control” to further input as
shown on the right Figure. This is the dynamic translation for moving the slider.
Jeff Xi 2004/12
9
Now you can press key “1” to move the whole system along positive x direction, and to move
the system back just by pressing shift key together with key “1”.
To rotate the link, you need to move the cursor back to the tree window. In the link group, insert
“Transformation ” above the cylinder. Input the name as shown on the left Figure below. Click
on “control” to further input as shown on the right Figure. This is the dynamic rotation for
rotating the link.
Jeff Xi 2004/12
10
Now, you can press key “2” to rotate the link about positive z direction of the cylinder, and to
rotate it back just by pressing shift key together with key “2”.
Note that the rotation of link does not affect the slider. Hence, the dynamic variables in this
case are relative variables.
5.2 Animation Method
To animate the system, first move the cursor back the tree window, left click to highlight “Move
in x”, then right click and select “Properties”. Input Tag name “slider” as shown below on the
left. Do the same for “Rotate about z”, and input Tag name “link” as shown below on the right.
Jeff Xi 2004/12
11
Use Notepad to create a data file called “manual.dat”.
Back to RoboWorks, on the top of the main window, select “Animation”, and then select “File”.
Load “manual.dat” file to open the following window. Then, do the following as shown below.
Click here to
start animation
Jeff Xi 2004/12
12
Download