Drake
 All Classes Files Functions Variables
LeggedRobotPlanningProblem Class Reference

Factory class for motion planning problems involving robots that implement the 'LeggedRobot' interface. More...

Collaboration diagram for LeggedRobotPlanningProblem:

Public Member Functions

function LeggedRobotPlanningProblem (robot, options)
 
function addSupport (obj, body_id, pts, tspan, constraints)
 obj = addSupport(obj,body_id,pts,tspan,constraints) adds an element to the support_struct for this problem. More...
 
function addConstraint (obj, constraint, tspan)
 obj = addConstraint(obj,constraint,tspan) adds an element to the constraint_struct for this problem. More...
 
function addRigidBodyConstraint (obj, constraint)
 obj = addRigidBodyConstraint(obj,constraint) adds an element to the constraint_struct of this problem where the active time of the constraint is taken from the tspan property of the RigidBodyConstraintObject constraint. More...
 
function addSupportOnFlatGround (obj, body_id, pts, tspan)
 obj = addSupportOnFlatGround(obj,body_id,pts,tspan) adds an element to the support_struct of this problem for which the points on(in) the specified body(frame) are in static contact with flat ground at z = 0. More...
 
function generateComDynamicsFullKinematicsPlanner (obj, N, durations, q_nom_traj, q0, Q_comddot, Qv, Q_contact_force, options)
 prog = generateComDynamicsFullKinematicsPlanner(obj,N,durations,q_nom_traj,q0,Q_comddot, Qv, % Q_contact_force,options) returns a ComDynamicsFullKinematicsPlanner object corresponding to this problem. More...
 
function generateQuasiStaticPlanner (obj, N, durations, q_nom_traj, q0, varargin)
 prog = generateQuasiStaticPlanner(obj,N,durations,q_nom_traj,q0,varargin) returns a KinematicDirtran object corresponding to this problem with quasi-static motion constraints (COM must remain above the convex hull of the active support points at all times). More...
 

Public Attributes

Property mu
 
Property min_distance
 
Property quasistatic_shrink_factor
 
Property n_interp_points
 
Property excluded_collision_groups
 
Property fixed_initial_state
 
Property start_from_rest
 
Property end_at_rest
 
Property Q
 
Property v_max
 

Protected Member Functions

function addQuasiStaticConstraintsToPlanner (obj, prog)
 
function addCollisionConstraintsToPlanner (obj, prog)
 
function addConstraintsToPlanner (obj, prog)
 
function addSupportConstraintsToPlanner (obj, prog)
 
function activeKnots (structure, N)
 
function finalCost (k, h, xf)
 

Protected Attributes

Property robot
 
Property support_struct
 
Property constraint_struct
 

Detailed Description

Factory class for motion planning problems involving robots that implement the 'LeggedRobot' interface.

Allows us to represent problems in a way that's not tied to a specific solution method. This is still a work in progress - at present it supports quasi-static planning with the 'KinematicDirtran' class and dynamic planning with the 'ComDynamicsFullKinematicsPlanner'.

The bulk of the problem is represented by two structures

  • constraint_struct - Constraint objects, each with an associated tspan indicating the portion of the plan (between 0 and 1) for which the constraint is active.
  • support_struct - Points on the robot which can provide support and an associated tspan indicating the portion of the plan (between 0 and 1) for which those points support the robot. These are stored stored separately fron the rest of the constraints to allow for the generation of planners that treat contacts differently (e.g. quasi-static planning vs. dynamic planning) from the same problem specification. These properties are set via the addSupport and addConstraint methods.

There are also several publicly set-able properties that affect the planning problem:

  • mu - Coefficient of friction for all support contacts
  • min_distance - Minimum allowable difference between collision geometries that are eligible for collision. See RigidBodyManipulator/collisionDetect for more details on which collision geometries are eligible to collide with each other.
  • quasistatic_shrink_factor - Shrink factor to be used in all QuasiStaticConstraint objects contained in generated planners.
  • n_interp_points - Number of intermediate points between knots at which collision avoidance constraints should be evaluated.
  • excluded_collision_groups - Structure array with two fields
    • name: String containing the name of the collision geometry group to be ignored
    • tspan: Portion of the plan between 0 and 1 for which the group should be ignored
  • fixed_inital_state - If 'true', then the intial state will be fixed to a value specified at the time the planner is generated.
  • start_from_rest - If 'true', then the robot will have zero velocity in all coordinates at the beginning of the plan.
  • end_at_rest - If 'true', then the robot will have zero velocity in all coordinates at the end of the plan.
  • Q - Weighting matrix used in planners that impose a quadratic cost on deviation from a nominal position trajectory
  • v_max - Upper bound on the velocities at all times. We currently assume that the velocity limits are symmetric.

Constructor & Destructor Documentation

function LeggedRobotPlanningProblem ( robot  ,
options   
)
Return values
obj

Member Function Documentation

function activeKnots ( structure  ,
 
)
protected
Return values
active_knots
function addCollisionConstraintsToPlanner ( obj  ,
prog   
)
protected
Return values
prog
function addConstraint ( obj  ,
constraint  ,
tspan   
)

obj = addConstraint(obj,constraint,tspan) adds an element to the constraint_struct for this problem.

Parameters
objLeggedRobotPlanningProblem object
constraintsConstraint or RigidBodyConstraint object that defines a kinematic constraint on the robot. Can also be a cell array of such objects. In that case tspan must be a cell array of the same size.
tspan– Two element vector indicating the portion of the plan for which this constraint is active, between 0 and 1. Can also be a cell array of such vectors.
Return values
obj
function addConstraintsToPlanner ( obj  ,
prog   
)
protected
Return values
prog
function addQuasiStaticConstraintsToPlanner ( obj  ,
prog   
)
protected
Return values
prog
function addRigidBodyConstraint ( obj  ,
constraint   
)

obj = addRigidBodyConstraint(obj,constraint) adds an element to the constraint_struct of this problem where the active time of the constraint is taken from the tspan property of the RigidBodyConstraintObject constraint.

Parameters
objLeggedRobotPlanningProblem object
constraintRigidBodyConstraint object
Return values
obj
function addSupport ( obj  ,
body_id  ,
pts  ,
tspan  ,
constraints   
)

obj = addSupport(obj,body_id,pts,tspan,constraints) adds an element to the support_struct for this problem.

Parameters
objLeggedRobotPlanningProblem object
body_id– Name or body index / frame id of the body or frame which provides support
pts– Points on the body (or in the frame) specified by body_id that provide support
tspan– Portion of the plan for which this support is active, between 0 and 1.
constraints– Cell array of kinematic constraints imposed by this contact
Return values
obj
function addSupportConstraintsToPlanner ( obj  ,
prog   
)
protected
Return values
prog
function addSupportOnFlatGround ( obj  ,
body_id  ,
pts  ,
tspan   
)

obj = addSupportOnFlatGround(obj,body_id,pts,tspan) adds an element to the support_struct of this problem for which the points on(in) the specified body(frame) are in static contact with flat ground at z = 0.

Parameters
objLeggedRobotPlanningProblem object
body_id– Name or body index / frame id of the body or frame which provides support
pts– Points on the body (or in the frame) specified by body_id that provide support
tspan– Portion of the plan for which this support is active, between 0 and 1.
Return values
obj
function finalCost ( ,
,
xf   
)
protected
Return values
f
df
function generateComDynamicsFullKinematicsPlanner ( obj  ,
,
durations  ,
q_nom_traj  ,
q0  ,
Q_comddot  ,
Qv  ,
Q_contact_force  ,
options   
)

prog = generateComDynamicsFullKinematicsPlanner(obj,N,durations,q_nom_traj,q0,Q_comddot, Qv, % Q_contact_force,options) returns a ComDynamicsFullKinematicsPlanner object corresponding to this problem.

Parameters
objLeggedRobotPlanningProblem object
N– Number of knot points
durations– Two element vector giving the lower and upper bounds on the final time of the plan. The initial time is always t = 0.
q_nom_traj– Nominal position trajectory
q0– Initial position. Only used if fixed_initial_state is set to true
Q_comddot– Weight on center of mass acceleration penalty
Qv– Weight on joint velocity penalty
Q_contact_force– Weight on contact force penalty
options– Structure containing additional options to be passed to the ComDynamicsFullKinematicsPlanner constructor
Return values
progComDynamicsFullKinematicsPlanner object
function generateQuasiStaticPlanner ( obj  ,
,
durations  ,
q_nom_traj  ,
q0  ,
varargin   
)

prog = generateQuasiStaticPlanner(obj,N,durations,q_nom_traj,q0,varargin) returns a KinematicDirtran object corresponding to this problem with quasi-static motion constraints (COM must remain above the convex hull of the active support points at all times).

Parameters
objLeggedRobotPlanningProblem object
N– Number of knot points
durations– Two element vector giving the lower and upper bounds on the final time of the plan. The initial time is always t = 0.
q_nom_traj– Nominal position trajectory
q0– Initial position. Only used if fixed_initial_state is set to true
varargin– All additional arguments are passed directly to the KinematicDirtran constructor
Return values
progKinematicDirtran object

Member Data Documentation

Property constraint_struct
protected
Property end_at_rest
Property excluded_collision_groups
Property fixed_initial_state
Property min_distance
Property mu
Property n_interp_points
Property Q
Property quasistatic_shrink_factor
Property robot
protected
Property start_from_rest
Property support_struct
protected
Property v_max

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