Drake
 All Classes Files Functions Variables
TimeSteppingRigidBodyManipulator Class Reference

A discrete time system which simulates (an Euler approximation of) the manipulator equations, with contact / limits resolved using the linear complementarity problem formulation of contact in Stewart96. More...

Inheritance diagram for TimeSteppingRigidBodyManipulator:
Collaboration diagram for TimeSteppingRigidBodyManipulator:

Public Member Functions

function TimeSteppingRigidBodyManipulator (manipulator_or_urdf_filename, timestep, options)
 
function checkDirty (obj)
 
function getManipulator (obj)
 
function output (obj, t, x, u)
 
function enableIdealizedPositionControl (model, flag)
 
function compile (model)
 
function getInitialState (obj)
 
function update (obj, t, x, u)
 
function cacheHit (obj, t, x, u, num_args_out)
 
function solveMexLCP (obj, t, x, u)
 
function solveLCP (obj, t, x, u)
 
function addSensor (obj, sensor)
 
function addFrame (obj, frame)
 
function pdcontrol (sys, Kp, Kd, index)
 
function getB (obj)
 
function getGravity (obj)
 
function getNumPositions (obj)
 
function getNumVelocities (obj)
 
function setStateFrame (obj, fr)
 
function setTerrain (obj, varargin)
 
function getTerrain (obj)
 
function getTerrainHeight (obj, varargin)
 
function setJointLimits (obj, varargin)
 
function addRobotFromURDF (obj, varargin)
 
function addRobotFromSDF (obj, varargin)
 
function doKinematics (obj, varargin)
 
function forwardKin (obj, varargin)
 
function bodyKin (obj, varargin)
 
function approximateIK (obj, varargin)
 
function inverseKin (obj, varargin)
 
function inverseKinPointwise (obj, varargin)
 
function inverseKinTraj (obj, varargin)
 
function inverseKinWrapup (obj, varargin)
 
function findFixedPoint (obj, x0, varargin)
 
function collisionDetect (obj, varargin)
 
function collisionDetectTerrain (obj, varargin)
 
function addStateConstraint (obj, con)
 keep two copies of the constraints around :( % todo: re-evaluate whether that is really necessary More...
 
function updateStateConstraint (obj, id, con)
 
function removeAllStateConstraints (obj)
 
function positionConstraints (obj, varargin)
 
function velocityConstraints (obj, varargin)
 
function manipulatorDynamics (obj, varargin)
 
function contactConstraints (obj, varargin)
 
function contactConstraintsBV (obj, varargin)
 
function pairwiseContactConstraints (obj, varargin)
 
function pairwiseContactConstraintsBV (obj, varargin)
 
function resolveConstraints (obj, x0, varargin)
 
function getMass (obj, varargin)
 
function getCOM (obj, varargin)
 
function centerOfMassJacobianDotTimesV (obj, varargin)
 
function centroidalMomentumMatrixDotTimesV (obj, varargin)
 
function centroidalMomentumMatrix (obj, varargin)
 
function parseBodyOrFrameID (obj, varargin)
 
function findJointId (model, varargin)
 
function findLinkId (model, varargin)
 
function findPositionIndices (model, varargin)
 
function findLink (model, varargin)
 
function findFrameId (model, varargin)
 
function findAncestorBodies (obj, body_index)
 
function findKinematicPath (obj, start_body, end_body)
 
function weldJoint (obj, body_ind_or_joint_name, robot)
 
function getBody (model, varargin)
 
function getFrame (model, varargin)
 
function getBodyOrFrameName (obj, varargin)
 
function setBody (model, varargin)
 
function constructVisualizer (obj, varargin)
 
function getNumContacts (ignoredArg)
 
function getNumContactPairs (obj)
 
function getBodyContacts (obj, body_idx)
 
function addContactShapeToBody (varargin)
 
function addCollisionGeometryToBody (obj, varargin)
 
function addVisualShapeToBody (varargin)
 
function addVisualGeometryToBody (obj, varargin)
 
function addShapeToBody (varargin)
 
function addGeometryToBody (obj, varargin)
 
function replaceContactShapesWithCHull (varargin)
 
function replaceCollisionGeometryWithConvexHull (obj, body_indices, varargin)
 
function getContactShapeGroupNames (varargin)
 
function getCollisionGeometryGroupNames (obj)
 
function computeFrictionForce (obj, qd)
 
function removeCollisionGroups (obj, contact_groups)
 
function removeCollisionGroupsExcept (obj, varargin)
 
function getLinkName (obj, body_ind)
 
function getLinkNames (obj)
 
function getJointNames (obj)
 
function getNumBodies (obj)
 
function getJointLimits (obj)
 
function jointLimitConstraints (obj, varargin)
 
function getActuatedJoints (obj)
 
function getMexModelPtr (obj)
 
function closestDistance (obj, varargin)
 
function addLinksToCollisionFilterGroup (obj, linknames, collision_fg_name, robotnums)
 
function name (obj)
 
function getParamFrame (model)
 
function setParams (model, p)
 
function getTerrainContactPoints (obj, varargin)
 
function terrainContactPositions (obj, varargin)
 
function terrainContactJacobianDotTimesV (obj, varargin)
 
function collisionRaycast (obj, kinsol, origin, point_on_ray, use_margins)
 
- 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 dynamics (obj, t, x, u)
 Placeholder for the dynamics 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 addStateConstraint (obj, con, xind)
 
function updateStateConstraint (obj, id, con, xind)
 
function displayStateConstraints (obj)
 
function removeAllStateConstraints (obj)
 
function addStateConstraintsToProgram (obj, prog, indices)
 adds state constraints and unilateral constraints to the program on the specified indices. More...
 
function addInputConstraintsToProgram (obj, prog, indices)
 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...
 
function cascade (sys1, sys2)
 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)
 deprecated method (due to refactoring): please use extractTrigPolySystem instead More...
 
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...
 
function cascade (sys1, sys2)
 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...
 
function addStateConstraintsToProgram (obj, prog, indices)
 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 setSimulinkParam (obj, varargin)
 Sets parameters of the simulink model Syntax setSimulinkParam(obj,param_name,param_value[,param_name,param_value,]) % Se. 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 Attributes

Property manip
 
Property sensor
 
Property dirty
 
Property timestep
 
Property twoD
 
Property position_control
 
Property LCP_cache
 
Property enable_fastqp
 
Property lcmgl_contact_forces_scale
 <=0 implies no lcmgl More...
 
Property z_inactive_guess_tol
 
Property multiple_contacts
 
Property gurobi_present
 

Additional Inherited Members

- Public Attributes inherited from DynamicalSystem
Property warning_manager
 
- 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...
 

Detailed Description

A discrete time system which simulates (an Euler approximation of) the manipulator equations, with contact / limits resolved using the linear complementarity problem formulation of contact in Stewart96.

Constructor & Destructor Documentation

function TimeSteppingRigidBodyManipulator ( manipulator_or_urdf_filename  ,
timestep  ,
options   
)
Return values
obj

Member Function Documentation

function addCollisionGeometryToBody ( obj  ,
varargin   
)
Return values
obj
function addContactShapeToBody ( varargin  )
function addFrame ( obj  ,
frame   
)
Return values
obj
frame_id
function addGeometryToBody ( obj  ,
varargin   
)
Return values
obj
function addLinksToCollisionFilterGroup ( obj  ,
linknames  ,
collision_fg_name  ,
robotnums   
)
Return values
obj
function addRobotFromSDF ( obj  ,
varargin   
)
Return values
obj
function addRobotFromURDF ( obj  ,
varargin   
)
Return values
obj
function addSensor ( obj  ,
sensor   
)
Return values
obj
function addShapeToBody ( varargin  )
function addStateConstraint ( obj  ,
con   
)

keep two copies of the constraints around :( % todo: re-evaluate whether that is really necessary

Return values
obj
id
function addVisualGeometryToBody ( obj  ,
varargin   
)
Return values
obj
function addVisualShapeToBody ( varargin  )
function approximateIK ( obj  ,
varargin   
)
Return values
varargout
function bodyKin ( obj  ,
varargin   
)
Return values
varargout
function cacheHit ( obj  ,
,
,
,
num_args_out   
)
Return values
hit
function centerOfMassJacobianDotTimesV ( obj  ,
varargin   
)
Return values
varargout
function centroidalMomentumMatrix ( obj  ,
varargin   
)
Return values
varargout
function centroidalMomentumMatrixDotTimesV ( obj  ,
varargin   
)
Return values
varargout
function checkDirty ( obj  )
function closestDistance ( obj  ,
varargin   
)
Return values
phi
Jphi
function collisionDetect ( obj  ,
varargin   
)
Return values
varargout
function collisionDetectTerrain ( obj  ,
varargin   
)
Return values
varargout
function collisionRaycast ( obj  ,
kinsol  ,
origin  ,
point_on_ray  ,
use_margins   
)
Return values
distance
function compile ( model  )
Return values
model
function computeFrictionForce ( obj  ,
qd   
)
Return values
f_friction
function constructVisualizer ( obj  ,
varargin   
)
Return values
v
function contactConstraints ( obj  ,
varargin   
)
Return values
varargout
function contactConstraintsBV ( obj  ,
varargin   
)
Return values
varargout
function doKinematics ( obj  ,
varargin   
)
Return values
varargout
function enableIdealizedPositionControl ( model  ,
flag   
)
Return values
model
function findAncestorBodies ( obj  ,
body_index   
)
Return values
ancestor_bodies
function findFixedPoint ( obj  ,
x0  ,
varargin   
)
Return values
varargout
function findFrameId ( model  ,
varargin   
)
Return values
frame_id
function findJointId ( model  ,
varargin   
)
Return values
joint_ind
function findKinematicPath ( obj  ,
start_body  ,
end_body   
)
Return values
body_path
joint_path
signs
function findLink ( model  ,
varargin   
)
Return values
body
function findLinkId ( model  ,
varargin   
)
Return values
body_ind
function findPositionIndices ( model  ,
varargin   
)
Return values
indices
function forwardKin ( obj  ,
varargin   
)
Return values
varargout
function getActuatedJoints ( obj  )
Return values
index
function getB ( obj  )
Return values
B
function getBody ( model  ,
varargin   
)
Return values
body
function getBodyContacts ( obj  ,
body_idx   
)
Return values
c
function getBodyOrFrameName ( obj  ,
varargin   
)
Return values
str
function getCollisionGeometryGroupNames ( obj  )
Return values
groups
function getCOM ( obj  ,
varargin   
)
Return values
varargout
function getContactShapeGroupNames ( varargin  )
function getFrame ( model  ,
varargin   
)
Return values
frame
function getGravity ( obj  )
Return values
g
function getInitialState ( obj  )
virtual
Return values
x0

Reimplemented from DrakeSystem.

function getJointLimits ( obj  )
Return values
jl_min
jl_max
function getJointNames ( obj  )
Return values
joint_names
function getLinkName ( obj  ,
body_ind   
)
Return values
str
function getLinkNames ( obj  )
Return values
link_names
function getManipulator ( obj  )
Return values
manip
function getMass ( obj  ,
varargin   
)
Return values
varargout
function getMexModelPtr ( obj  )
Return values
ptr
function getNumBodies ( obj  )
Return values
num_bodies
function getNumContactPairs ( obj  )
Return values
n
function getNumContacts ( ignoredArg  )
function getNumPositions ( obj  )
Return values
num_q
function getNumVelocities ( obj  )
Return values
num_v
function getParamFrame ( model  )
Return values
fr
function getTerrain ( obj  )
Return values
terrain
function getTerrainContactPoints ( obj  ,
varargin   
)
Return values
terrain_contact_point_struct
function getTerrainHeight ( obj  ,
varargin   
)
Return values
varargout
function inverseKin ( obj  ,
varargin   
)
Return values
varargout
function inverseKinPointwise ( obj  ,
varargin   
)
Return values
varargout
function inverseKinTraj ( obj  ,
varargin   
)
Return values
varargout
function inverseKinWrapup ( obj  ,
varargin   
)
Return values
varargout
function jointLimitConstraints ( obj  ,
varargin   
)
Return values
varargout
function manipulatorDynamics ( obj  ,
varargin   
)
Return values
varargout
function name ( obj  )
Return values
out
function output ( obj  ,
,
,
 
)
virtual
Return values
y

Reimplemented from DrakeSystem.

function pairwiseContactConstraints ( obj  ,
varargin   
)
Return values
varargout
function pairwiseContactConstraintsBV ( obj  ,
varargin   
)
Return values
varargout
function parseBodyOrFrameID ( obj  ,
varargin   
)
Return values
varargout
function pdcontrol ( sys  ,
Kp  ,
Kd  ,
index   
)
Return values
varargout
function positionConstraints ( obj  ,
varargin   
)
Return values
varargout
function removeAllStateConstraints ( obj  )
Return values
obj
function removeCollisionGroups ( obj  ,
contact_groups   
)
Return values
obj
function removeCollisionGroupsExcept ( obj  ,
varargin   
)
Return values
obj
function replaceCollisionGeometryWithConvexHull ( obj  ,
body_indices  ,
varargin   
)
Return values
obj
function replaceContactShapesWithCHull ( varargin  )
function resolveConstraints ( obj  ,
x0  ,
varargin   
)
Return values
varargout
function setBody ( model  ,
varargin   
)
Return values
model
function setJointLimits ( obj  ,
varargin   
)
Return values
obj
function setParams ( model  ,
 
)
Return values
model
function setStateFrame ( obj  ,
fr   
)
Return values
obj
function setTerrain ( obj  ,
varargin   
)
Return values
obj
function solveLCP ( obj  ,
,
,
 
)
Return values
obj
z
Mvn
wvn
dz
dMvn
dwvn
function solveMexLCP ( obj  ,
,
,
 
)
Return values
obj
z
Mqdn
wqdn
function terrainContactJacobianDotTimesV ( obj  ,
varargin   
)
Return values
varargout
function terrainContactPositions ( obj  ,
varargin   
)
Return values
varargout
function update ( obj  ,
,
,
 
)
virtual
Return values
xdn
df

Reimplemented from DrakeSystem.

function updateStateConstraint ( obj  ,
id  ,
con   
)
Return values
obj
function velocityConstraints ( obj  ,
varargin   
)
Return values
varargout
function weldJoint ( obj  ,
body_ind_or_joint_name  ,
robot   
)
Return values
obj

Member Data Documentation

Property dirty
protected
Property enable_fastqp
protected
Property gurobi_present
protected
Property lcmgl_contact_forces_scale
protected

<=0 implies no lcmgl

Property LCP_cache
protected
Property manip
protected
Property multiple_contacts
protected
Property position_control
protected
Property sensor
protected
Property timestep
protected
Property twoD
protected
Property z_inactive_guess_tol
protected

The documentation for this class was generated from the following file: