Frame Creation

RTSX Help: Create a coordinate frame structure

Frame

Create coordinate frame structure. Useful as a first step to build a chain of homogeneous transformations.

Syntax

  • F = Frame(T, options)

Input Arguments

  • T  — a   4 x 4 homogeneous transformation matrix

Output Arguments

  • F — frame data structure containing the following fields
    • Tabs — absolute homogeneous transformation matrix (w.r.t first frame in the chain)
    • Trel — relative homogeneous transformation matrix (w.r.t adjacent frame below)
    • name — a string specifying frame name
    • completed — a boolean value (0 or 1) to flag the completion of frame (used by SerialFrame( ) when forming a chain.)

Options

Note : options in [ ] must be passed to the function in pairs.

  • ‘rel’ — input T is a relative homogeneous transformation (default)
  • ‘abs’ — input T is an absolute homogeneous transformation
  • [ ‘name’, ‘(frame name)’] — frame name. A single character such as ‘A’, ‘B’, ‘1’, ‘2’ is recommended. A long name would look messy during plotting.

Description

Frame( ) has little use by its own. one does not need it when working with only 1-2 frames. In contrast, if a chain of several frames needs to be constructed, Frame( ) combined with SerialFrame( ) and related functionsare a handy set of tools for such purpose. For those familiar with OOP, a frame data structure can be thought of roughly as an object (lacking method, of course). More information other than just homogenous transformation matrices could be attached to the structure. Frame( ) is used as the required first step to build a frame chain.

Examples

F=Frame(trotz(pi/4),'name','A');  // create just a single frame
// create a sequence of frames
F(1)=Frame(eye(4,4),'name','U');   // base frame
F(2)=Frame(trotx(pi/2)*transl([0 1 1]),'name','V'); // 2nd frame (default T input is relative)
F(3)=Frame(transl([2 3 -1]),'abs','name','W');  // 3rd frame is inputted as absolute T w.r.t base
F(4)=Frame([],'name','X');  // a blank frame can be inserted at only one place in chain
F(5)=Frame(troty(pi/3)*transl([3 2 -1]),'name','Y');  // last frame in structure

Notice in the example above that frame 4 is defined as a blank frame. This can be solved by function ResolveFrame( ) provided that another chain is available to form a closed chain, a typical problem in basic robot kinematics

See Also