UpdateRobot

RTSX Help: Add/change robot model and link data

UpdateRobot

UpdateRobotLink

These two functions are used to add/change data in a robot model or one of its links.

Syntax

  • robot = UpdateRobot(robot, options)
  • robot = UpdateRobotLink(robot, i, options)

Input Arguments

  • robot –a robot model to modify
  • i –index of robot link to modify

Output Arguments

  • robot — updated robot model

Options

An option specific to a function is given that function name in ( ). Otherwise, it can be used for both functions.

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

  • [ ‘name’, ‘robot name’] — (UpdateRobot) add/replace robot name.
  • [ ‘manuf’, ‘robot manufacturer’] — (UpdateRobot) add/replace robot manufacturer.
  • [ ‘comment’, ‘comment string’] — (UpdateRobot) add/replace comment
  • [ ‘viewangle’, [alpha,theta]] — (UpdateRobot) add/replace view angle (in degrees) in spherical coordinate. This is used to set up rotation_angle property of a graphic window when the robot is plotted or animated.
  • [ ‘base’, Tb] — (UpdateRobot) add/replace a base frame for the robot, Tb must be a 4 x 4 homogeneous transformation matrix
  • [ ‘tool’, Tt] — (UpdateRobot) add/replace a tool frame for the robot, Tt must be a 4 x 4 homogeneous transformation matrix
  • [ ‘gravity’, value] — (UpdateRobot) add/replace direction of gravity [gx gy gz]
  • [ ‘link’, value] — (UpdateRobot) select a particular link for update
  • [ ‘RP’, (0,’R’ /1,’P’)] — add/change joint type. Pur 0 or ‘R’ for revolute, 1 or ‘P’ for prismatic.
  • [ ‘qlim’, [qmin qmax]] — add/change joint variable limits. Pass minimum and maximum values in a 1×2 vector as shown.
  • [ ‘linkparm’, [theta d a alpha (offset)]] — update whole DH parameters with a 1×4 or 1×5 parameter vector
  • [ ‘theta’, value] — update theta (joint angle)
  • [ ‘d’, value] — update d (link offset)
  • [ ‘a’, value] — update a (link length)
  • [ ‘alpha’, value] — update alpha (link twist angle)
  • [ ‘offset’, value] — update joint variable offset
  • [ ‘dynparm’, [r I m Jm G B Tc]] — update whole dynamic parameters with a 1 x 15 parameter vector
  • [ ‘r, [1 x 3]] — update link center of gravity, 1 x 3 vector
  • [ ‘I’, [1 x 6]] — update link inertia matrix, 1 x 6 vector
  • [ ‘m’, value] — update link mass
  • [ ‘Jm’, value] — update motor inertia
  • [ ‘G’, value] — update gear ratio
  • [ ‘B’, value] — update link viscous friction
  • [ ‘Tc’, [1 x 2]] — update link Coulomb friction, 1 x 2 vector

Description

Use UpdateRobot( ) or UpdateRobotLink( ) to add/change data in a robot model. While it is possible to access any data in the model directly, we advise against that error-prone practice. These two functions provide some data type and consistency check. Fields such as number of joints and joint configuration are also automatically updated.

Examples

L(1)=Link([0 0 1.2 0]);
L(2)=Link([0 0 1 0]);
twolink=SerialLink(L); // a 2-link manipulator
twolink=UpdateRobot(twolink,'name','Robo2'); // add name
twolink=UpdateRobot(twolink,'base',transl([1 1 0]),'tool',troty(pi/2)); // add base & tool frame
twolink=UpdateRobot(twolink,'link',1,'a',1.5);  // change link 1 length to 1.5
twolink=UpdateRobotLink(twolink,1, 'a',1.5); // same operation as above

See Also