Attach/Detach Base/Tool

RTSX Help: Attach/Detach robot base/tool

AttachBase, DetachBase

AttachTool, DetachTool

This set of auxiliary functions is designed to conveniently attach/detach base and tool frame in a robot model.

Syntax

  • robot = AttachBase(robot, Tb)
  • [robot,Tb] = DetachBase(robot)
  • robot = AttachTool(robot, Tt)
  • [robot,Tt] = DetachTool(robot)

Input Arguments

  • robot –a robot model to modify
  • Tb –base frame, a 4 x 4 homogeneous transformation matrix
  • Tt –tool frame, a 4 x 4 homogeneous transformation matrix

Output Arguments

  • robot — updated robot model
  • Tb — detached base frame, a 4 x 4 homogeneous transformation matrix
  • Tt — detached tool frame, a 4 x 4 homogeneous transformation matrix

Description

Suppose a robot model is already built and one later wants to add/remove its base/tool frame, this set of support functions is designed for such purpose. AttachBase( ) and AttachTool( ) checks wheter a user inputs a valid homogeneous transformation matrix, so it is a prefered approach to accessing robot.base or robot.tool directly.

Examples

// build a robot first
robot = AttachBase(robot, transl([1 1 0])); // translate robot to location [1,1,0]'
robot=AttachTool(robot,trotx(pi/2)); // rotate original tool frame about x 90 degree
robot=DetachBase(robot);
robot=DetachTool(robot);  // back to original

See Also