Jump to: navigation , search

Overview

This tutorial shows how to create custom frames using the Frames panel, then set and use them in the behavior tree.


Frames are an important concept in Intera. Each endpoint that is defined with a Move To node must have a location and orientation with reference to something, and that something is what a frame is. Every task uses the base frame which describes space relative to the base of the robot. However, other frames can be created and used in a variety of ways. Landmarks, patterns, and vision are all examples of how other frames are created and used. See the tutorials on those topics for more information about how they work. A frame can also be manually created, and then be updated from a behavior tree, which will be covered in this tutorial.

Before continuing, take a moment to review the information on Frames Panel.

Definitions

Frame - A way to orient the world in which you're working. A frame is a point in 3D space, with x, y, and z coordinates as well as x, y, and z rotation information. Its purpose is to make other 3D objects relative to it by using its coordinate system. A frame is a container that can also have children, which reference the frame as their 0,0 point. As the frame moves, so do the children that reference it. Each endpoint must have 1 and only 1 parent frame. Frames are rendered in the Intera 3D Viewer as planes.


Base Frame - The absolute 0,0 point at the base of the robot. All other frames are relative to the base frame in some way. It is a constant that never moves and is the parent of every item in the task.


Active Endpoint Frame - Its 0,0 point is at the end of the robot arm. Its precise location is dependent upon the configuration of the active end of arm tool.


Fixed Frame - General term for a frame which does not move relative to the base frame during task execution.


Moving Frame - General term for a frame which can be redefined during task execution. All points referencing a moving frame will move relative to the frame.


Creating and Using a Custom Frame

1. Create a new Basic Task in Intera Studio.

2. When creating a frame from the Frames panel, it is created based on the current position of the active endpoint. So, position the arm such that the endpoint is in the desired location in which to define a frame. This position doesn't really matter at this point, since it is only as an example.

3. Click on the Frames icon from the Task Bar

Framespanel.png


4. Create a new frame by typing the name "Frame A", then clicking the Add button. Notice the new frame appears in the list and appears in the 3D view.

Addframe.png


5. Now that the frame exists, we will create a Move To node with an endpoint relative to that frame. Move the arm a few inches, then in the behavior tree, add a Move To node, and set the arm pose as the current position of the arm. Change the parent from the base frame to Frame A. There is now an arm position based on a custom frame.

Movetoframe.png


6. Go back to the frames panel and notice the move to node is listed under the Frame A. Look at the 3D view and notice the relationship between the frame and the move to node. Click on Frame A, move the arm, and click UPDATE FRAME (make sure leave children is unchecked). Notice how the endpoint of the Move To node also moved in the same direction and magnitude as the frame. This shows the basic idea of frames, the location of the endpoint was defined by the custom frame, so when the location of the frame moved, so did the endpoint associated with it. Note that there is an option to "Leave Children In Place". When updating a frame from the Frames panel, this option will cause the endpoint of the Move To node to stay in its position relative to the base frame. See Frames Panel for more details on that option.

7. Now, move the arm to a new position, and create another new frame named "Frame B". Make sure the parent of the Frame B is the base frame.

8. Next, move the arm to yet another new position and create another new frame named "Frame C." This time choose Frame A as the parent.

9. Look at the 3D view and notice the location in space of Frame C. In the Frame panel, change the parent of Frame C to Frame B. Notice that if Preserve Transform is enabled, the location of Frame C does not change. Now, uncheck Preserve Transform and change the parent of Frame C back to Frame A. The location of Frame C changes. See Frames Panel for more details on that option.

Framein3dview.png


10. A frame can also be updated from the behavior tree. In the tree, add a Set To node after the Move To node. Replace Set Variable with "Frame A" and choose the endpoint associated with the active tool. This logic will update the frame based on the location of the endpoint. Since the location is also dependent on the frame, it will continue to move in that direction each time through the loop until the location cannot be reached.

Notice in the Set To node, that when a frame is selected to be updated, some additional options are shown. There is the option to update only the X, Y, Z, or the rotational aspects of the frame, or any combination thereof.

Setoframe.png


Benefits

The ability to update a frame within the behavior tree is very useful. This is what the landmark, vision, and pattern nodes are doing. Updating a frame with the Set To node is also useful. For example, when you want to move relative to the current position, instead of commanding the robot to move forward X mm, left y mm, and up z mm, create a frame and a Move To node that is offset from the frame by x, y, and z. Then in the logic, update the frame to be the current endpoint before executing the Move To node.

One example is a pick or place based on contact with the part, often used for stacking and unstacking. The idea is that the arm moves until it feels that it has come into contact with the part, then it updates the frame so that the retract move is relative to the current location.

There are also situations in which only updating the rotational aspect of the frame is desired. For example, if you want the cuff to rotate by 10 degrees each time through the loop, but don't change the location. To do this, create a frame, then use the Joints panel to rotate the J6 joint 10 degrees. Create a Move To node in this position which uses that frame. In the behavior tree, use the Set To node to update the frame to the current endpoint, but unselect the X, Y, and Z options, leaving only the rotational information. Then insert the Move To node. This will cause the arm to only rotate by 10 degrees around the active endpoint, and without changing the location of the endpoint.

Additional Details

Frames in General

The concept of frames is present in the traditional world of robotics, which may also be referred to as coordinate systems, transforms, or pivot points. Frames create a local space in which locations, or more technically "spatial entities" (position and orientation) may be defined relative to the origin of the frame. This simplifies the description of locations. An airplane represents a type of frame. A person in an airplane would describe their location if asked by another passenger relative to some feature in the plane, for example, in seat 25-C. And the location doesn’t change regardless whether they are over New York facing west, or over Munich facing north. A part sitting in a tray may be defined by its location relative to the tray (row 2, column 4), regardless of where the tray itself is located.


Frames Relative to Other Frames

Frames are defined relative to other frames. All other frames are descendants of the base frame. If frame A is a child of the base frame, that means its origin (point 0, 0, 0) is defined relative to the base frame's origin (which is in the middle of the base at the point where it is attached to the pedestal). If frame B is a child of frame A, that means that frame B’s origin, is defined relative to the origin of frame A. This is powerful because it allows for locations in one frame to be mapped to a different frame. With example of the part on the tray, the location of the part is defined relative to the tray (row 2, column 4), and the location of the tray is defined relative to the base of the robot (for example, 1000mm in front, 50mm to the left, and 200mm above the base). Therefore the part is in a frame which is defined by another frame.


More on the Base Frame

The robot has what is known as its base frame. This is a frame that is positioned at the center of the base of the robot, with the Z (blue) axis pointing vertically, the X (red) axis pointing out straight out the front of the robot, and the Y (green) axis pointing to the right facing the robot. However, this is often not a convenient frame for to specify locations, especially if the locations can move. For example, to use the tray example again, if the tray moves relative to the robot, it is true that the part locations that are defined relative to the tray change with respect to where they are relative to the robot, but, the robot can calculate that change based on knowing how the tray changed.


Move To Nodes and Endpoints

Move To nodes use an endpoint, and each endpoint has a "parent" property. This is the frame. It is possible to use another endpoint as the parent, which can also be used as a frame. Moving the frame also moves the endpoints associated with that frame. There are a number of things that could cause the frame to move:

  • The frame may be associated with a Landmark node and when the associated landmark is re-registered, the frame changes accordingly.
  • The frame may be associated with Pattern node. All patterns have a moving frame which on each iteration of the pattern moves so it is located at the next location in the pattern.
  • The frame may be associated with a Vision node. When a Vision node is active it attempts to detect its specified object. Once it does, it updates a frame that describes the position and orientation of the object (called the object frame).

In each case, the node (Landmark, Pattern, or Vision) is created with a frame that is updated when the node is active, and is available to other nodes such as Move To nodes to use as their parent frame.


Invalid Endpoints and Paths

When the parent frame of an endpoint changes, the resulting arm motion and ending arm configuration will also change. The system will automatically calculate a new arm configuration that is consistent with the change in position/orientation of the end effector defined by the change in the frame. A large change in the location/orientation of a frame or an initial arm configuration with one or more joints near a joint limit, may result a new position or path that is not possible. For example, the location of a new frame could put an endpoint out of reach of the arm. The path from one endpoint to another might also be invalidated especially if linear movements are used since it is not always possible to move in a straight line from one location to another.