Drake
PlanarRigidBodyManipulator Class Reference

This class wraps the planar pieces of the spatial vector library (v1) provided by Roy Featherstone on his website: http://users.cecs.anu.edu.au/~roy/spatial/documentation.html. More...

Inheritance diagram for PlanarRigidBodyManipulator:
Collaboration diagram for PlanarRigidBodyManipulator:

Public Member Functions

function PlanarRigidBodyManipulator (urdf_filename, options)
Constructs a PlanarRigidBodyManipulator. More...

function addRobotFromURDF (model, urdf_filename, xyz, rpy, options)

just add RPY (intrisic), because the out-of-plane joints will be welded More...

function constructVisualizer (obj, options)

function surfaceTangents (obj, normal)
Follows surfaceTangents in RigidBodyManipulator, but produces only a single tangent for each normal (instead of m), and restricts this to the x-y plane. More...

function setGravity (obj, grav)

function bodyKin (obj, kinsol, body_ind, pts)
computes the position of pts (given in the global frame) in the body frame (see documentation for bodyKin in RigidBodyManipulator) More...

function forwardKin (obj, kinsol, body_ind, pts, rotation_type)
computes the position of pts (given in the body frame) in the global frame More...

function getCOM (model, kinsol)

function implicitDynamics (obj, t, x, u, lambda, cLambda)
Compute the implicit dynamics for trajectory optimization. More...

Public Member Functions inherited from RigidBodyManipulator
function RigidBodyManipulator (filename, options)
Construct a new rigid body manipulator object with a single (empty) RigidBody (called 'world'), and optionally load a first robot from urdf (see documentation for addRobotFromURDF for details on the inputs). More...

function qdotToV (obj, kinsol)

function vToqdot (obj, kinsol)

function output (obj, t, x, u)
The outputs of this dynamical system are concatenated from each of the sensors. More...

function setTerrain (obj, terrain)
Set the ground height profile which the contact points on the robot may not penetrate. More...

function removeTerrainGeometries (varargin)

function removeTerrainGeometry (obj)

function getTerrainHeight (obj, contact_pos)
Access method for querying the terrain height from the RigidBodyTerrain object assigned to this manipulator. More...

function getB (obj, q, qd)
Note: getB(obj) is ok iff there are no direct feedthrough force elements. More...

function setGravity (obj, grav)

function getRandomConfiguration (obj)

function getZeroConfiguration (obj)

function getInitialState (obj)

function setJointLimits (obj, jl_min, jl_max)

function getGravity (obj, grav)

function computeFrictionForce (model, v)
Note: gradient is with respect to v, not q! More...

function getMexModelPtr (obj)
Please do note use this. More...

function cartesianForceToSpatialForce (obj, kinsol, body_ind, point, force)

Adds a sensor to the RigidBodyManipulator. More...

function compile (model)
After parsing, compute some relevant data structures that will be accessed in the dynamics and visualization. More...

function findJointIndices (model, str)

function findPositionIndices (model, str)
findPositionIndices Returns position indices in the state vector for joints whose name contains a specified string. More...

function findVelocityIndices (model, str)
findJointVelocityIndices Returns velocity indices in the state vector for joints whose name contains a specified string. More...

function findFrameId (model, name, robotnum)

function setForce (model, force_ind, force)

function getBodyOrFrameName (model, body_or_frame_id)

function setParams (model, p)

function getParams (model)

function findJointInd (model, varargin)

function getTerrainContactPoints (obj, body_idx, contact_groups)
terrain_contact_point_struct = getTerrainContactPoints(obj) returns a structure array containing the terrain contact points on all bodies of this manipulator. More...

function getContactShapeGroupNames (varargin)

function getCollisionGeometryGroupNames (model)

function removeCollisionGroups (model, contact_groups, robotnum)
model = removeCollisionGroups(model,contact_groups,robotnum) returns the model with the specified contact groups removed More...

function removeCollisionGroupsExcept (model, contact_groups, robotnum, body_ids)
model = removeCollisionGroups(model,contact_groups,robotnum) returns the model with all contact groups removed except for those specified More...

function parseBodyOrFrameID (obj, body_or_frame, robotnum)
body_idx = parseBodyOrFrameID(obj,body_or_frame) returns the body index or frame id associated with the input. More...

function addCollisionGeometryToBody (obj, body_id, geometry, varargin)

function addGeometryToBody (obj, body_id, geometry, varargin)

function removeShapeFromBody (varargin)

function removeVisualGeometryFromBody (obj, body_id, geometry_name)
Removes all geometry from a given body that match a name. More...

function replaceContactShapesWithCHull (varargin)

function replaceCollisionGeometryWithConvexHull (model, body_indices, varargin)

function drawLCMGLAxes (model, lcmgl, q, body_indices)

function drawLCMGLClosestPoints (model, lcmgl, kinsol, varargin)

function drawLCMGLGravity (model, q, gravity_visual_magnitude)
draws a vector centered at the robot's center of mass having the direction of the gravitational force on the robot. More...

function drawLCMGLForces (model, q, qd, gravity_visual_magnitude)
draws the forces and torques on the robot. More...

function getMass (model, robotnum)
todo: write total_mass to class and simply return it instead of looping every time (since the result is a constant between compiles) More...

function energy (model, x)

function constructCOMFrame (model)

function constructVisualizer (obj, options)

function pdcontrol (sys, Kp, Kd, index)
creates new blocks to implement a PD controller, roughly illustrated by q_d —>[ Kp ]–>(+)–—>[ sys ]----——> yout | - | -——[ Kp,Kd ]<-— More...

function findFixedPoint (obj, x0, u0, options)

Removes links from the specified collision filter group. More...

Adds the specified collision filter groups to the "ignored" list of another collision filter group. More...

function removeFromIgnoredListOfCollisionFilterGroup (model, ignored_collision_fgs, collision_fg_name)
Removes the specified collision filter groups from the "ignored" list of another collision filter group. More...

function surfaceTangents (obj, normal)
% compute tangent vectors, according to the description in the last paragraph of Stewart96, p.2678 More...

function getNumContactPairs (obj)

function unilateralConstraints (obj, x)

function getNumUnilateralConstraints (obj)
Returns the number of unilateral constraints, currently only contains the contact pairs. More...

function getPositionFrame (obj, robotnum)
if robotnum is not specified, then it returns a position frame including all position variables (for all robots) More...

function getVelocityFrame (obj, robotnum)
if robotnum is not specified, then it returns a velocity frame including all velocity variables (for all robots) More...

function getStateFrame (obj, robotnum)
if robotnum is not specified, then it returns a state frame including all state variables (for all robots) More...

function analyticalJacobian (obj, kinsol, base, endEffector, points, rotationType)
NOTE: even though geometricJacobian is mexed, I need kinsol.T in what follows, so I can't use a mex kinsol. More...

function approximateIK (obj, q_seed, q_nom, varargin)
Please refer to the interface of inverseKin The inputs are the same as inverseKin, except current implementation does not accept QuasiStaticConstraint object. More...

function bodyKin (obj, kinsol, body_or_frame_ind, pts)
computes the position of pts (given in the global frame) in the body frame More...

function centerOfMassJacobianDotTimesV (obj, kinsol, robotnum)
computes the quantity Jd * v, where J is the center of mass Jacobian in terms of v, i.e. More...

function centroidalMomentumMatrix (robot, kinsol, robotnum, in_terms_of_qdot)
function [A, dA] = centroidalMomentumMatrix(robot, kinsol, robotnum, in_terms_of_qdot) Computes the centroidal momentum matrix (CMM), i.e. More...

function centroidalMomentumMatrixDotTimesV (obj, kinsol, robotnum)

Changes the root link of the kinematic tree. More...

function collidingPoints (obj, kinsol, points, collision_threshold)
idx = collidingPoints(obj, kinsol, points, collision_threshold) returns the indices of the points in collision with any element in the manipulator More...

function collidingPointsCheckOnly (obj, kinsol, points, collision_threshold)
is_in_collision = collidingPoints(obj, kinsol, points, collision_threshold) returns true if any point in points is in collision with the manipulator More...

function collisionDetectTerrain (obj, xA_in_world)

function collisionRaycast (obj, kinsol, origins, ray_endpoints, use_margins)
function distance = collisionRaycast(obj,kinsol, origin, point_on_ray) More...

function compositeRigidBodyInertias (manipulator, inertias_world, dinertias_world)
Computes composite rigid body inertias expressed in world frame. More...

function contactConstraintDerivatives (obj, normal, kinsol, idxA, idxB, xA, xB, d)

function contactConstraints (obj, kinsol, allow_multiple_contacts, active_collision_options)
function [phi,normal,d,xA,xB,idxA,idxB,mu,n,D,dn,dD] = contactConstraints(obj,kinsol,body_idx) Compute the contact constraints for a manipulator, and relevent bases. More...

function contactConstraintsBV (obj, varargin)
function [phi,B,JB,mu] = contactConstraintsBV(obj,kinsol,allow_multiple_contacts,active_collision_options) a variation on the contactConstraints function that uses a different representation of the friction cone–basis vectors are the extreme rays of the cone (no basis for the normal force) More...

function doKinematics (model, q, v, options, qd_old)
kinsol=doKinematics(model, q, v, options, qd_old) Precomputes information necessary to compute kinematic and dynamic quantities such as Jacobians ( More...

function extractFrameInfo (obj, body_or_frame_index)

function findAncestorBodies (obj, body_index)
findAncestorBodies Find indices of ancestors of a body More...

function findKinematicPath (obj, start_body, end_body, use_mex)
findKinematicPath computes the shortest path from one robot link to another More...

function forwardJacDotTimesV (obj, kinsol, body_or_frame_id, points, rotation_type, base_or_frame_id)
Computes Jd * v, where J is a matrix that maps from the joint velocity vector v to the time derivative of x (x and J of format specified in forwardKinV). More...

function forwardKin (obj, kinsol, body_or_frame_id, points, options)
Transforms points given in a frame identified by body_or_frame_id to a frame identified by options.base_or_frame_id, and also computes a representation of the relative rotation (of type specified by rotation_type), stacked in a matrix x. More...

function geometricJacobian (obj, kinsol, base, end_effector, expressed_in, in_terms_of_qdot)
GEOMETRICJACOBIAN Computes the geometric Jacobian from base to end_effector expressed in frame expressed_in. More...

function geometricJacobianDotTimesV (obj, kinsol, base, end_effector, expressed_in)
geometricJacobianDotTimesV computes the `convective term' d/dt(J) * v, where J is a geometric Jacobian and v is the vector of joint velocities across the joints on the path from base to end_effector. More...

function geometricJacobianDotV (obj, kinsol, base, endEffector, expressedIn)
GEOMETRICJACOBIANDOTV computes the 'convective term' d/dt(J) * v, where J is a geometric Jacobian and v is the vector of joint velocities across the same joints that the geometric Jacobian spans. More...

function getCMM (varargin)

function getCMMdA (varargin)

function getCOM (model, kinsol, robotnum, in_terms_of_qdot)

function inertiasInWorldFrame (manipulator, kinsol)
Transforms 6x6 inertia matrices from body frame to world frame. More...

function inverseKin (obj, q_seed, q_nom, varargin)
inverseKin(obj,q_seed,q_nom,constraint1,constraint2,constraint3,,options) % solve IK min_q (q-q_nom)'Q(q-q_nom) subject to constraint1 at t constraint2 at t More...

function inverseKinBackend (obj, mode, t, q_seed, q_nom, varargin)
inverseKin(obj,mode,q_seed,q_nom,t,constraint1,constraint2,,options) % Two modes, mode 1 – solve IK min_q (q-q_nom'Q(q-q_nom) subject to constraint1 at t constraint2 at t More...

function inverseKinPointwise (obj, t, q_seed, q_nom, varargin)
inverseKin(obj,t,q_seed,q_nom,constraint1,constraint2,constraint3,,options) % solve IK at each sample time t(i) seperately min_q(:,i) (q(:,i)-q_nom(:,i))'Q(q(:,i)-q_nom(:,i)) subject to constraint1 at t(i) constraint22 at t(i) More...

function inverseKinTraj (obj, t, q_seed_traj, q_nom_traj, varargin)
inverseKinSequence(obj,t,q_seed_traj,q_nom_traj,constraint1,constraint2,constraint3,,options) % If options.fixInitialState = true solve IK min_q sum_i qdd(:,i)'Qa*qdd(:,i)+qd(:,i)'*Qv*qd(:,i)+(q(:,i)-q_nom(:,i))'*Q(q(:,i)-q_nom(:,i))] subject to constraint1 at t_samples(i) constraint2 at t_samples(i) % constraint(k) at [t_samples(2) t_samples(3) t_samples(nT)] % constraint(k+1) at [t_samples(2) t_samples(3) t_samples(nT)] % . More...

function inverseKinWrapup (obj, q0, varargin)
[q_seed,q_nom,constraint,ikoptions] = inverseKinWrapup(obj,q0, body1,body1_pts,body1_pos, % body1,body2_pts,body2_pos, % body1,body3_pts,body3_pos, % % bodyN,bodyN_pts,bodyN_pos, % options use_mex_constraint) The input to the function is the same input list used in the deprecated IK call, except the last one, which determines whether to construct the constraint in mex only or not. More...

function isBodyPartOfRobot (model, body, robotnum)
determines whether a given body is part of a robot specified by robotnum. More...

function relativeTransform (obj, kinsol, base, body)
Computes the transform that maps vectors from body to base. More...

function spatialAccelerations (obj, kinsol, vd, root_accel)
Computes the spatial accelerations (time derivatives of twists) of all bodies in the RigidBodyManipulator, expressed in world. More...

function terrainContactJacobianDotTimesV (obj, kinsol, varargin)
Computes dJ/dt * v, where J is the matrix that maps the velocity vector v to a stacked vector of terrain contact point velocities. More...

function terrainContactPositions (obj, kinsol, varargin)
x_in_world = terrainContactPositions(obj,kinsol) returns the world-frame position of all terrain contact points on the manipulator. More...

function twists (obj, transforms, q, v)

function getNumBodies (obj)

str = getLinkName(obj,body_ind) returns a string containing the link name the specified body if body_ind is a scalar. More...

function addJoint (model, name, type, parent_ind, child_ind, xyz, rpy, axis, damping, coulomb_friction, static_friction, coulomb_window, limits)

note that the case matters. More...

function getBody (model, body_ind)

function setBody (model, body_ind, body)

function getFrame (model, frame_id)

function setFrame (model, frame_id, frame)

function weldJoint (model, body_ind_or_joint_name, robot)

function findJointId (model, jointname, robot_num, error_level)

function leastCommonAncestor (model, body1, body2)
recursively searches for the lowest body in the tree that is an ancestor to both body1 and body2 More...

function drawKinematicTree (model)
depends on having graphviz installed todo: make that a dependency in configure? More...

function newBody (model)

function getActuatedJoints (model)

function findJoint (model, jointname, robot)

function parseParamString (model, robotnum, str)
Parses parameter strings from URDFs and returns either the value or a msspoly expression for later use with RigidBodyElement.bindParams(). More...

function addRobotFromURDF (model, urdf_filename, xyz, rpy, options)
Parses URDF. More...

Parses URDF from a string. More...

function parseMaterial (node, options)

function addRobotFromSDF (model, sdf_filename, xyz, rpy, options)
Parses SDF and/or Gazebo WORLD file The spec is here: http://sdformat.org/spec A nice trove of models is here: https://bitbucket.org/osrf/gazebo_models/. More...

function allCollisions (obj, kinsol)
[ptsA,ptsB,idxA,idxB] = allCollisions(obj,kinsol) uses Bullet's collision checking (including their broad-phase) to give a fast report of all points of collision in the manipulator with the following exceptions: More...

function closestDistance (obj, kinsol, varargin)
function [phi,Jphi] = closestDistance(obj,kinsol,active_collision_options) More...

function collisionDetect (obj, kinsol, allow_multiple_contacts, active_collision_options)
[distance,normal,xA,xB,idxA,idxB] = collisionDetect(obj,kinsol) returns the points of closest approach between all pairs of collision elements in the manipulator, with the following exceptions: More...

function collisionDetectFromPoints (obj, kinsol, points, use_margins)
Given a set of points in global frame, returns the signed distance of each point to the closest surface of the RBM. More...

function pairwiseClosestDistance (obj, kinsol, bodyA_idx, bodyB_idx)
Uses bullet to find the minimum distance between bodies A and B. More...

function pairwiseClosestPoints (obj, kinsol, bodyA_idx, bodyB_idx)
Uses bullet to find the points of closest approach between bodies A and B. More...

function pairwiseContactConstraints (obj, kinsol, body_indA, body_indB, body_collision_indA)
Uses bullet to perform collision detection between rigid body A and rigid body B, and returns a single penetration constraint. More...

function pairwiseContactConstraintsBV (obj, kinsol, body_indA, body_indB, body_collision_indA)
Uses bullet to perform collision detection between rigid body A and rigid body B, and returns a single penetration constraint. More...

function pairwiseContactDistance (obj, kinsol, body_indA, body_indB)
Uses bullet to perform collision detection between rigid body A and rigid body B, and returns a single penetration constraint. More...

function pairwiseContactTest (obj, kinsol, body_indA, body_indB, body_collision_indA)
Uses bullet to perform collision detection between rigid body A and rigid body B. More...

Public Member Functions inherited from Manipulator
function Manipulator (num_q, num_u, num_v)

virtual function manipulatorDynamics (obj, q, v)
H(q)vdot + C(q,v,f_ext) = Bu. More...

function manipulatorEquations (obj, q, v)
extract the alternative form of the manipulator equations: H(q)vdot + C(q,v)v + G(q) = B(q)u More...

function dynamics (obj, t, x, u)
Provides the DrakeSystem interface to the manipulatorDynamics. More...

function qdotToV (obj, kinsol)
defines the linear map v = Vq * qdot default relationship is that v = qdot More...

function vToqdot (obj, kinsol)
defines the linear map qdot = Vqinv * v default relationship is that v = qdot More...

Adds a position constraint of the form phi(q) = constant which can be enforced directly in the manipulator dynamics. More...

function updatePositionEqualityConstraint (obj, id, con, position_ind)

Adds a velocity constraint of the form psi(q,v) = constant (with dpsidv~=0) which can be enforced directly in the manipulator dynamics. More...

function updateVelocityEqualityConstraint (obj, id, con, velocity_ind)

function removeAllStateConstraints (obj)

function setNumDOF (obj, num)

function getNumDOF (obj)

function setNumPositions (obj, num_q)
Guards the num_positions variable to make sure it stays consistent with num_x. More...

function getNumPositions (obj)

function setNumVelocities (obj, num_v)
Guards the num_velocities variable to make sure it stays consistent with num_x. More...

function getNumVelocities (obj)

function positionConstraints (obj, q)
Implements position constraints of the form phi(q) = 0. More...

function velocityConstraints (obj, q, v)
Implements velocity constraints of the form psi(q,v) = 0 Note: dphidv must not be zero. More...

function getNumJointLimitConstraints (obj)
returns number of constraints imposed by finite joint limits More...

function jointLimitConstraints (obj, q)
constraint function (with derivatives) to implement unilateral constraints imposed by joint limits More...

function num_contacts (obj)

function getNumContacts (obj)

function feedback (sys1, sys2)
Attempt to produce a new manipulator system if possible. More...

Attempt to produce a new manipulator system if possible. More...

function extractTrigPolySystem (obj, options)
Creates a (rational) polynomial system representation of the dynamics. More...

function pdcontrol (sys, Kp, Kd, index)
creates new blocks to implement a PD controller, roughly illustrated by q_d —>[ Kp ]–>(+)–—>[ sys ]----——> yout | - | -——[ Kp,Kd ]<-— More...

function getJointLimits (obj)
Returns lower and upper joint limit vectors. More...

function setJointLimits (obj, jl_min, jl_max)

function doKinematics (q, v)

function parameterEstimation (obj, data, varargin)
Parameter estimation algorithm for manipulators. More...

Public Member Functions inherited from DrakeSystem
function DrakeSystem (num_xc, num_xd, num_u, num_y, direct_feedthrough_flag, time_invariant_flag)
Construct a DrakeSystem. More...

function update (obj, t, x, u)
Placeholder for the update method. More...

function zeroCrossings (obj, t, x, u)
Placeholder for the zeroCrossings method: a method phi = zeroCrossings(t,x,u) which triggers a zero crossing event when phi transitions from positive to negative. More...

function getNumContStates (obj)
Returns the number of continuous states. More...

function getNumDiscStates (obj)
Returns the number of discrete states. More...

function getNumInputs (obj)
Returns the number of inputs to the system. More...

function getNumOutputs (obj)
Returns the number of outputs from the system. More...

function getInitialStateWInput (obj, t, x, u)
Hook in case a system needs to initial state based on current time and/or input. More...

function getSampleTime (obj)
As described at http://www.mathworks.com/help/toolbox/simulink/sfg/f6-58760.html to set multiple sample times, specify one column for each sample time/offset pair. More...

function getInputSampleTimes (obj)
Returns getSampleTime - a DrakeSystem can only have a single same time associated with it. More...

function getOutputSampleTimes (obj)
Returns getSampleTime - a DrakeSystem can only have a single same time associated with it. More...

function setSampleTime (obj, ts)
robust method for setting default sample time More...

function isDirectFeedthrough (obj)
Check if the system is direct feedthrough (e.g., if the output depends on the immediate input) More...

function setDirectFeedthrough (obj, tf)
Set the direct feedthrough flag. More...

function getModel (obj)
Constructs a simulink system block for this system to be used by the simulink engine. More...

function findFixedPoint (obj, x0, u0)
attempts to find a fixed point (xstar,ustar) which also satisfies the constraints, using (x0,u0) as the initial guess. More...

function getDefaultInput (obj)
Define the default initial input so that behavior is well-defined if no controller is specified or if no control messages have been received yet. More...

function setNumContStates (obj, num_xc)
Guards the num_states variable. More...

function setNumDiscStates (obj, num_xd)
Guards the num_states variable. More...

function setNumInputs (obj, num_u)
Guards the num_u variable. More...

function setInputLimits (obj, umin, umax)
Guards the input limits to make sure it stay consistent. More...

function setNumOutputs (obj, num_y)
Guards the number of outputs to make sure it's consistent. More...

function getNumZeroCrossings (obj)
Returns the number of zero crossings. More...

function setNumZeroCrossings (obj, num_zcs)
Guards the number of zero crossings to make sure it's valid. More...

function getNumStateConstraints (obj)

function getNumUnilateralConstraints (obj)

function updateStateConstraint (obj, id, con, xind)

function displayStateConstraints (obj)

function removeAllStateConstraints (obj)

adds state constraints and unilateral constraints to the program on the specified indices. More...

add bounding box constraint todo: consider whether it makes sense to a list of constraints objects instead of just input limits. More...

function stateConstraints (obj, x)
Provides the old interface of a single constraint function which evaluates all of the equality constraints on the state (which should be == 0) More...

function linearize (obj, t0, x0, u0)
Uses the geval engine to linearize the model around the nominal point, at least for the simple case. More...

function simulate (obj, varargin)

function simulateODE (obj, tspan, x0, options)
Simulates the system using the ODE45 suite of solvers instead of the simulink solvers. More...

function feedback (sys1, sys2)
Constructs a feedback combination of sys1 and sys2. More...

Constructs a cascade combination of sys1 and sys2. More...

function extractPolynomialSystem (obj)
Attempts to symbolically extract the extra structure of a polynomial system from the Drake system Will throw an error if the system is not truly polynomial. More...

function extractAffineSystem (obj)
Attempts to symbolically extract the extra structure of an affine system from the Drake system Will throw an error if the system is not truly affine. More...

function extractLinearSystem (obj)
Attempts to symbolically extract the extra structure of a linear system from the Drake system Will throw an error if the system is not truly linear. More...

function makeTrigPolySystem (obj, options)

function systemGradTest (obj, t, x, u, options)
Compare numerical and analytical derivatives of dynamics,update,and output. More...

function extractAffineSystem (obj)

function extractTrigPolySystem (sys, options)
tries to convert the current system into a trig-poly system More...

function taylorApprox (sys, varargin)
performs a taylorApproximation around a point or trajectory usage: taylorApprox(sys,t0,x0,u0,order[,ignores]) or taylorApprox(sys,x0traj,u0traj,order[,ignores]) it returns a polynomial system (or polynomial trajectory system) More...

function transverseLQR (obj, xtraj, utraj, Q, R, Qf, transSurf)
Compute LQR control for transversal system. More...

function transverseLQRClosedLoop (obj, xtraj, utraj, Q, R, Vf, transSurf)

function tvlqr (obj, xtraj, utraj, Q, R, Qf, options)
implements the time-varying linear (or affine) quadratic regulator More...

Public Member Functions inherited from DynamicalSystem
function DynamicalSystem ()

function inInputFrame (sys, frame)
Ensures that sys has the specified input frame, by searching for and cascading a coordinate transformation to the existing input if necessary. More...

function inStateFrame (sys, frame)
Ensures that sys has the specified state frame. More...

function inOutputFrame (sys, frame)
Ensures that sys has the specified output frame, by searching for and cascading a coordinate transformation to the existing output if necessary. More...

Creates a new system with the output of system 1 connected to the input of system 2. More...

function feedback (sys1, sys2)
Creates a new systems with sys1 and sys2 in a feedback interconnect (with sys1 on the forward path, and sys2 on the return path). More...

function parallel (sys1, sys2)
Creates a new system that takes the inputs to both sys1 and sys2 as a single input (which is "demux"ed and passed independently to the two systems), and outputs the "mux"ed output of the two systems. More...

function sampledData (sys, tsin, tsout)
Creates a new system which is a sampled data (e.g. More...

function resolveConstraints (obj, x0, v, constraints)
attempts to find a x which satisfies the constraints, using x0 as the initial guess. More...

adds state constraints and unilateral constriants to the program on the specified indices. More...

function getNumStates (obj)
Returns the total number of states (discrete + continuous) in the system. More...

function getInputSampleTimes (obj)
Returns the sample time of the input See getSampleTime for more details about sample times. More...

function getOutputSampleTimes (obj)
Returns the sample time of the output See getSampleTime for more details about sample times. More...

function isDT (obj)
Returns true if the system has no states, or has states and only one sample time [a b], with a>0. More...

function isCT (obj)
Returns true if the system has only one sample time [a b], with a==0. More...

function isInheritedTime (obj)
Returns true if the system has only one sample time [a b], with b==-1. More...

function isTI (obj)
Returns true if the system is time-invariant. More...

function setTIFlag (obj, bval)
Sets the time invariant flag. More...

function getInputFrame (obj)
Access the CoordinateFrame object that defines the input to this system. More...

function setInputFrame (obj, fr)
Set the CoordinateFrame object that defines the input of this system. More...

function getStateFrame (obj)
Access the CoordinateFrame object that defines the state of this system. More...

function setStateFrame (obj, fr)
Set the CoordinateFrame object that defines the state of this system. More...

function getOutputFrame (obj)
Access the CoordinateFrame object that defines the output to this system. More...

function setOutputFrame (obj, fr)
Set the CoordinateFrame object that defines the output of this system. More...

function getNumStateConstraints (obj)
Returns the scalar number of state constraints (of the form phi(x)=0) More...

function stateConstraints (obj, x)
defines state equality constraints in the form phi(x)=0 More...

function unilateralConstraints (obj, x)
defines state unilateral constraints in the form phi(x)>=0 More...

function getNumUnilateralConstraints (obj)
Returns the scalar number of state constraints (of the form phi(x)>=0) More...

function linearize (obj, t0, x0, u0)
Linearize the system about an operating point (continuous time) More...

function dlinearize (obj, ts, t0, x0, u0)
Linearize the system about an operating point (discrete time) More...

function setParams (obj, p)
This default setParams method attempts to set class properties of the system according to the coordinate names in the parameter frame. More...

function getParams (obj)
This default getParams method attempts to get class properties of the system according to the coordinate names in the parameter frame. More...

function getNumParams (obj)

function setParamFrame (obj, fr)
Set the CoordinateFrame object which describes any system parameters. More...

function getParamFrame (obj)
Returns the CoordinateFrame object which describes any system parameters. More...

function setParamLimits (obj, pmin, pmax)
Set lower and upper bounds on the system parameters. More...

function getParamLimits (obj)
Returns the current lower and upper bounds on the system parameters. More...

function parameterEstimation (obj, data, options)
Estimate parameter values from input-output data. More...

function runLCM (obj, x0, options)
Runs the system as an lcm node. More...

function simulate (obj, tspan, x0, options)
Simulates the dynamical system (using the simulink solvers) More...

function tiHinf (obj, x0, u0, Q, R, Bw, gamma)
Suboptimal state-feedback H-infinity controller for LTI system with bound gamma. More...

function tilqr (obj, x0, u0, Q, R, options)
Computes an LQR controller to stabilize the system around (x0,u0) More...

function tilyap (obj, x0, Q)
Linearizes the system about the state x0 and returns a candidate LyapunovFunction generated by solving the quadratic Lyapunov equation. More...

function tvlyap (obj, xtraj, Q, Qf)
Linearizes the system about the state trajectory xtraj and returns a candidate LyapunovFunction generated by integrating backwards the quadratic differential Lyapunov equation. More...

Protected Member Functions

function parseLoopJoint (model, robotnum, node, options)

Protected Member Functions inherited from RigidBodyManipulator
function checkDirty (obj)

function createMexPointer (obj)

function constructStateFrame (model)

function constructParamFrame (model)

function constructInputFrame (model)
inputparents is an array of the parent RigidBodies of each joint. More...

model = adjustCollisionGeometry(model) returns the model with adjusted collision geometry, according to the setings in model.contact_options. More...

function removeFixedJoints (model)
takes any fixed joints out of the tree, adding their visuals and inertia to their parents, and connecting their children directly to their parents More...

Protected Member Functions inherited from DynamicalSystem
function stateIndicesForCombination (sys1, sys2)
Helper method to figure out the indices of the discrete and continuous states after sys1 and sys2 have been combined into a single system. More...

function stateVectorToStructure (obj, xv, mdl)
Converts the vector state xv to the structure xs for simulink state. More...

function stateStructureToVector (obj, xs)
Converts the simulink state structure representation back to the vector state. More...

Protected Attributes

Property x_axis_label

Property y_axis_label

Property x_axis

Property y_axis

Property view_axis

Property T_2D_to_3D

Protected Attributes inherited from RigidBodyManipulator
Property name
names of the objects in the rigid body system More...

Property urdf
names of the urdf files loaded More...

Property body
array of RigidBody objects More...

Property actuator
array of RigidBodyActuator objects More...

Property param_db
cell of structures (one per robot) containing parsed parameter info More...

Property loop
array of RigidBodyLoop objects More...

Property sensor
cell array of RigidBodySensor objects More...

Property force
cell array of RigidBodyForceElement objects More...

Property gravity
note: need {} for arrays that will have multiple types (e.g. More...

Property dim

Property terrain

Property num_contact_pairs

Property contact_options

Property contact_constraint_id

Property cached_terrain_contact_points_struct
struct containing the output of 'obj.getTerrainContactPoints()'. More...

Property quat_norm_constraint_id
indices of state constraints asserting that the quaternion coordinates have norm=1 More...

default kinematics caches; temporary way to make it easy to avoid creating and destroying DrakeMexPointers to KinematicsCache every time doKinematics is called More...

Property frame
array of RigidBodyFrame objects More...

Property robot_state_frames

Property robot_position_frames

Property robot_velocity_frames

Static Public Member Functions inherited from RigidBodyManipulator

static function parseContactOptions (options)
contact_options = parseContactOptions(options) returns a struct containing settings for contact/collision detection. More...

Public Attributes inherited from RigidBodyManipulator
Property B

Property mex_model_ptr

Property dirty

Property collision_filter_groups

Public Attributes inherited from DynamicalSystem
Property warning_manager

Detailed Description

This class wraps the planar pieces of the spatial vector library (v1) provided by Roy Featherstone on his website: http://users.cecs.anu.edu.au/~roy/spatial/documentation.html.

Constructor & Destructor Documentation

 function PlanarRigidBodyManipulator ( urdf_filename , options )

Constructs a PlanarRigidBodyManipulator.

Parameters
urdf_filenamestring path+filename for a .urdf file to parse
Options:
 view is a string which must be one of 'right','front', or 'top'.
see also the options described in RigidBodyManipulator/parseURDF (the options for this function call are passed through to parseURDF)
Return values
 obj

Member Function Documentation

 function addFloatingBase ( model , parent , rootlink , xyz , rpy , type )

just add RPY (intrisic), because the out-of-plane joints will be welded

Return values
 model
 function addRobotFromURDF ( model , urdf_filename , xyz , rpy , options )
Return values
 model
 function bodyKin ( obj , kinsol , body_ind , pts )

computes the position of pts (given in the global frame) in the body frame (see documentation for bodyKin in RigidBodyManipulator)

Note: if pts are 2xm, then x will be 2xm (e.g., planar) but if pts are 3xm, then the underlying 3D kinematics will be used (and returned).

Return values
 x P J dP dJ
 function constructVisualizer ( obj , options )
Return values
 v
 function forwardKin ( obj , kinsol , body_ind , pts , rotation_type )

computes the position of pts (given in the body frame) in the global frame

Parameters
 kinsol solution structure obtained from doKinematics body_ind,an integer index for the body. if body_ind is a RigidBody object, then this method will look up the index for you. rotation_type boolean flag indicated whether rotations and derivatives should be computed Default: false
Return values
 x the position of pts (given in the body frame) in the global frame J the Jacobian, dxdq dJ the gradients of the Jacobian, dJdq

if pts is a 2xm matrix, then x will be a 2xm matrix and (following our gradient convention) J will be a ((2xm)x(nq)) matrix, with [J1;J2;;Jm] where Ji = dxidq % and dJ will be a (2xm)x(nq^2) matrix

Note: if pts are 2xm, then x will be 2xm (e.g., planar) but if pts are 3xm, then the underlying 3D kinematics will be used (and returned).

 function getCOM ( model , kinsol )

Return values
 com J dJ
 function implicitDynamics ( obj , t , x , u , lambda , cLambda )

Compute the implicit dynamics for trajectory optimization.

This function is fully implemented for joint limits and contact contraints

Parameters
 obj The Manipulator object t Time x State u Input lambda Non-contact constraint forces cLambda Contact constraint forces
Returns
Hqddot H(q)*qddot from the dynamics equations
dHqddot d/dq and d/qdot of H*qddot
phi phi(q) the contact point positions
psi psi(q) the contact point velocities
dPhi dphi/dq
dPsi [dpsi/dq dpsi/dqdot]
Return values
 Hqddot dHqddot phi psi dPhi dPsi H dH
 function parseLoopJoint ( model , robotnum , node , options )
protected
Return values
 model
 function setGravity ( obj , grav )
Return values
 obj
 function surfaceTangents ( obj , normal )

Follows surfaceTangents in RigidBodyManipulator, but produces only a single tangent for each normal (instead of m), and restricts this to the x-y plane.

Return values
 t

Member Data Documentation

 Property T_2D_to_3D
protected
 Property view_axis
protected
 Property x_axis
protected
 Property x_axis_label
protected
 Property y_axis
protected
 Property y_axis_label
protected

The documentation for this class was generated from the following file:
• /home/ubuntu/workspace/linux-gcc-continuous-matlab-documentation/drake/matlab/systems/plants/@PlanarRigidBodyManipulator/PlanarRigidBodyManipulator.m