Drake
drake::systems Namespace Reference

Namespaces

 analysis
 
 analysis_test
 
 controllers
 
 controllers_test
 
 detail
 
 estimators
 
 implicit_integrator_test
 
 internal
 
 lcm
 
 plants
 
 rendering
 
 scalar_conversion
 
 sensors
 
 system_base_test_detail
 
 test
 
 trajectory_optimization
 

Classes

class  AbstractValue
 A fully type-erased container class. More...
 
class  AbstractValues
 AbstractValues is a container for non-numerical state and parameters. More...
 
class  AccelerometerTestLogger
 A sink block that logs the most recent plant state and the accelerometer reading. More...
 
class  ActuatorEffortToRigidBodyPlantInputConverter
 
class  Adder
 An adder for arbitrarily many inputs of equal size. More...
 
class  AffineLinearSystemTest
 
class  AffineSystem
 A discrete OR continuous affine system (with constant coefficients). More...
 
class  AntiderivativeFunction
 A thin wrapper of the ScalarInitialValueProblem class that, in concert with Drake's ODE initial value problem solvers ("integrators"), provide the ability to perform quadrature on an arbitrary scalar integrable function. More...
 
class  BarycentricMeshSystem
 A (stateless) vector system implemented as a multi-linear (barycentric) interpolation on a mesh over the inputs. More...
 
class  BasicVector
 BasicVector is a semantics-free wrapper around an Eigen vector that satisfies VectorBase. More...
 
class  Cache
 Stores all the CacheEntryValue objects owned by a particular Context, organized to allow fast access using a CacheIndex as an index. More...
 
class  CacheEntry
 A CacheEntry belongs to a System and represents the properties of one of that System's cached computations. More...
 
class  CacheEntryValue
 This is the representation in the Context for the value of one of a System's CacheEntry objects. More...
 
class  CompliantContactModel
 This class encapsulates the compliant contact model force computations as described in detail in Compliant Contact in Drake. More...
 
struct  CompliantContactModelParameters
 The set of parameters for the compliant contact model. More...
 
class  CompliantMaterial
 The set of per-object compliant material parameters with one material applied to each collision object. More...
 
class  CompositeEventCollection
 This class bundles an instance of each EventCollection<EventType> into one object that stores the heterogeneous collection. More...
 
class  ConstantValueSource
 A source block that always outputs a constant value. More...
 
class  ConstantVectorSource
 A source block with a constant output port at all times. More...
 
class  ContactDetail
 The base class for defining a contact detail. More...
 
class  ContactForce
 The data for a single contact force applied to one body of a contacting pair. More...
 
class  ContactInfo
 A class containing information regarding contact response between two bodies including: More...
 
class  ContactResultantForceCalculator
 This is a utility class for replacing a set of force/torques by an equivalent force/torque (defined by the ContactForce class). More...
 
class  ContactResults
 A class containing the contact results (contact points and response spatial forces for each colliding pair of collision elements) as well as the sum of all JᵀF for all contact, where J is the contact point Jacobian, and F is the contact force. More...
 
class  ContactResultsToLcmSystem
 A System that encodes ContactResults into a lcmt_contact_results_for_viz message. More...
 
class  Context
 Context is an abstract class template that represents all the typed values that are used in a System's computations: time, numeric-valued input ports, numerical state, and numerical parameters. More...
 
class  ContextBase
 Provides non-templatized Context functionality shared by the templatized derived classes. More...
 
class  ContinuousState
 ContinuousState is a view of, and optionally a container for, all the continuous state variables xc of a Drake System. More...
 
class  Demultiplexer
 This system splits a vector valued signal on its input into multiple outputs. More...
 
class  DenseOutput
 An interface for dense output of ODE solutions, to efficiently approximate them at arbitrarily many points when solving them numerically (see IntegratorBase class documentation). More...
 
class  DependencyGraph
 Represents the portion of the complete dependency graph that is a subgraph centered on the owning subcontext, plus some edges leading to other subcontexts. More...
 
class  DependencyTracker
 Manages value interdependencies for a particular value or set of values in a Context. More...
 
class  Diagram
 Diagram is a System composed of one or more constituent Systems, arranged in a directed graph where the vertices are the constituent Systems themselves, and the edges connect the output of one constituent System to the input of another. More...
 
class  DiagramBuilder
 DiagramBuilder is a factory class for Diagram. More...
 
class  DiagramCompositeEventCollection
 CompositeEventCollection for a Diagram. More...
 
class  DiagramContext
 The DiagramContext is a container for all of the data necessary to uniquely determine the computations performed by a Diagram. More...
 
class  DiagramContinuousState
 DiagramContinuousState is a ContinuousState consisting of Supervectors xc, q, v, z over the corresponding entries in a set of referenced ContinuousState objects, which may or may not be owned by this DiagramContinuousState. More...
 
class  DiagramDiscreteValues
 DiagramDiscreteValues is a DiscreteValues container comprised recursively of a sequence of child DiscreteValues objects. More...
 
class  DiagramEventCollection
 A concrete class that holds all simultaneous homogeneous events for a Diagram. More...
 
class  DiagramOutputPort
 Holds information about a subsystem output port that has been exported to become one of this Diagram's output ports. More...
 
class  DiagramState
 DiagramState is a State, annotated with pointers to all the mutable substates that it spans. More...
 
class  DiscreteDerivative
 System that outputs the discrete-time derivative of its input: y(t) = (u[n] - u[n-1])/h, where n = floor(t/h), where h is the time period. More...
 
class  DiscreteUpdateEvent
 This class represents a discrete update event. More...
 
class  DiscreteValues
 DiscreteValues is a container for numerical but non-continuous state and parameters. More...
 
class  DrakeVisualizer
 This is a Drake System block that takes a RigidBodyTree and publishes LCM messages that are intended for drake-visualizer. More...
 
class  Event
 Abstract base class that represents an event. More...
 
class  EventCollection
 There are three concrete event types for any System: publish, discrete state update, and unrestricted state update, listed in order of increasing ability to change the state (i.e., zero to all). More...
 
class  EventData
 Base class for storing trigger-specific data to be passed to event handlers. More...
 
class  ExplicitEulerIntegrator
 A first-order, explicit Euler integrator. More...
 
class  FirstOrderLowPassFilter
 An element-wise first order low pass filter system that filters the i-th input uáµ¢ into the i-th output záµ¢. More...
 
class  FixedInputPortValue
 A FixedInputPortValue encapsulates a vector or abstract value for use as an internal value source for one of a System's input ports. More...
 
class  FrameVisualizer
 This is a Drake System block that takes in a state vector, and outputs a drake::lcmt_viewer_draw message that contains information about the frames for visualization. More...
 
class  Gain
 An element-wise gain block with input u and output y = k * u with k a constant vector. More...
 
class  HermitianDenseOutput
 A StepwiseDenseOutput class implementation using Hermitian interpolators, and therefore a continuous extension of the solution 𝐱(t) (see [Engquist, 2105]). More...
 
class  ImplicitEulerIntegrator
 A first-order, fully implicit integrator with second order error estimation. More...
 
class  InitialValueProblem
 A general initial value problem (or IVP) representation class, that allows evaluating the 𝐱(t; 𝐤) solution function to the given ODE d𝐱/dt = f(t, 𝐱; 𝐤), where f : t ⨯ 𝐱 → ℝⁿ, t ∈ ℝ, 𝐱 ∈ ℝⁿ, 𝐤 ∈ ℝᵐ, provided an initial condition 𝐱(t₀; 𝐤) = 𝐱₀. More...
 
class  InputPort
 This extends InputPortBase with some scalar type-dependent methods. More...
 
class  InputPortBase
 An InputPort is a System resource that describes the kind of input a System accepts, on a given port. More...
 
class  Integrator
 An integrator for a continuous vector input. More...
 
class  IntegratorBase
 An abstract class for an integrator for ODEs and DAEs as represented by a Drake System. More...
 
class  KinematicsResults
 A class containing the kinematics results from a RigidBodyPlant system. More...
 
class  LcmDecoderSystem
 A decoding system that converts a Lcm message of MsgTypedata to data of DataType. More...
 
class  LcmEncoderSystem
 An encoding system that converts data of DataType to a Lcm message of MsgType. More...
 
class  LeafCompositeEventCollection
 A CompositeEventCollection for a LeafSystem. More...
 
class  LeafContext
 LeafContext contains all prerequisite data necessary to uniquely determine the results of computations performed by the associated LeafSystem. More...
 
class  LeafEventCollection
 A concrete class that holds all simultaneous homogeneous events for a LeafSystem. More...
 
class  LeafOutputPort
 Implements an output port whose value is managed by a cache entry in the same LeafSystem as the port. More...
 
class  LeafSystem
 A superclass template that extends System with some convenience utilities that are not applicable to Diagrams. More...
 
class  LinearSystem
 A discrete OR continuous linear system. More...
 
struct  LinearTimeVaryingData
 Stores matrix data necessary to construct a linear time varying system as a piecewise polynomial trajectory. More...
 
class  MatrixGain
 A system that specializes LinearSystem by setting coefficient matrices A, B, and C to all be zero. More...
 
class  Multiplexer
 This system combines multiple vector-valued inputs into a vector-valued output. More...
 
class  MyVector
 A simple subclass of BasicVector<T> for testing, particularly for cases where BasicVector subtyping must be preserved through the framework. More...
 
class  OutputPort
 An OutputPort belongs to a System and represents the properties of one of that System's output ports. More...
 
class  OutputPortBase
 OutputPortBase handles the scalar type-independent aspects of an OutputPort. More...
 
class  Parameters
 Parameters is a container for variables that parameterize a System so that it can represent a family of related models. More...
 
class  PassThrough
 A pass through system with input u and output y = u. More...
 
class  PeriodicEventData
 A token describing an event that recurs on a fixed period. More...
 
struct  PeriodicEventDataComparator
 Structure for comparing two PeriodicEventData objects for use in a map container, using an arbitrary comparison method. More...
 
class  PidControlledSpringMassSystem
 A model of a one-dimensional spring-mass system controlled to achieve a given target position using a PID controller. More...
 
class  PiecewisePolynomialAffineSystem
 A continuous- or discrete-time Affine Time-Varying system described by a piecewise polynomial trajectory of system matrices. More...
 
class  PiecewisePolynomialLinearSystem
 A continuous- or discrete-time Linear Time-Varying system described by a piecewise polynomial trajectory of system matrices. More...
 
class  PointContactDetail
 An implementation of the ContactDetail where the contact details consist of a single ContactForce. More...
 
class  PublishEvent
 This class represents a publish event. More...
 
class  RigidBodyPlant
 This class provides a System interface around a multibody dynamics model of the world represented by a RigidBodyTree. More...
 
class  RigidBodyPlantBridge
 This class provides backwards compatibility between the old RigidBodyPlant and the new SceneGraph. More...
 
class  RobotCommandToDesiredEffortConverter
 Converts an atlas_command_t message into desired efforts, presented on one output port per actuator. More...
 
class  RobotStateDecoder
 Converts a robot_state_t LCM message into a KinematicsCache object. More...
 
class  RobotStateEncoder
 Assembles information from various input ports into a robot_state_t LCM message, presented on an output port. More...
 
class  RungeKutta2Integrator
 A second-order, explicit Runge Kutta integrator. More...
 
class  RungeKutta3Integrator
 A third-order Runge Kutta integrator with a third order error estimate. More...
 
class  Saturation
 An element-wise hard saturation block with inputs signal u, saturation values \( u_{min} \) and/or \( u_{max} \), and output y respectively as in: More...
 
class  ScalarDenseOutput
 A DenseOutput class interface extension to deal with scalar ODE solutions. More...
 
class  ScalarInitialValueProblem
 A thin wrapper of the InitialValueProblem class to provide a simple interface when solving scalar initial value problems i.e. More...
 
class  ScalarViewDenseOutput
 A ScalarDenseOutput class implementation that wraps a DenseOutput class instance and behaves as a view to one of its elements. More...
 
class  SemiExplicitEulerIntegrator
 A first-order, semi-explicit Euler integrator. More...
 
class  SignalLog
 This class serves as an in-memory cache of time-dependent vector values. More...
 
class  SignalLogger
 A sink block which logs its input to memory. More...
 
class  Simulator
 A class for advancing the state of hybrid dynamic systems, represented by System<T> objects, forward in time. More...
 
class  Sine
 A sine system which outputs y = a * sin(f * t + p) and first and second derivatives w.r.t. More...
 
class  SingleOutputVectorSource
 A base class that specializes LeafSystem for use with no input ports, and only a single, vector output port. More...
 
class  SpringMassStateVector
 The state of a one-dimensional spring-mass system, consisting of the position and velocity of the mass, in meters and meters/s. More...
 
class  SpringMassSystem
 A model of a one-dimensional spring-mass system. More...
 
class  State
 State is a container for all the data comprising the complete state of a particular System at a particular moment. More...
 
class  StateInterpolatorWithDiscreteDerivative
 Supports the common pattern of combining a (feed-through) position with a velocity estimated with the DiscreteDerivative into a single output vector with positions and velocities stacked. More...
 
struct  StepInfo
 Contains information about the independent variable including time and step number. More...
 
class  StepwiseDenseOutput
 A DenseOutput class interface extension, geared towards step-wise construction procedures. More...
 
class  Subvector
 Subvector is a concrete class template that implements VectorBase by providing a sliced view of a VectorBase. More...
 
class  Supervector
 Supervector is a concrete class template that implements VectorBase by concatenating multiple VectorBases, which it does not own. More...
 
class  System
 Base class for all System functionality that is dependent on the templatized scalar type T for input, state, parameters, and outputs. More...
 
class  SystemBase
 Provides non-templatized functionality shared by the templatized System classes. More...
 
class  SystemConstraint
 A SystemConstraint is a generic base-class for constraints on Systems. More...
 
class  SystemOutput
 Conveniently stores a snapshot of the values of every output port of a System. More...
 
class  SystemScalarConverter
 Helper class to convert a System<U> into a System<T>, intended for internal use by the System framework, not directly by users. More...
 
class  SystemSymbolicInspector
 The SystemSymbolicInspector uses symbolic::Expressions to analyze various properties of the System, such as time invariance and input-to-output sparsity, along with many others. More...
 
struct  SystemTypeTag
 A tag object that denotes a System subclass S in function signatures. More...
 
class  TimeVaryingAffineSystem
 Base class for a discrete- or continuous-time, time-varying affine system, with potentially time-varying coefficients. More...
 
struct  TimeVaryingData
 Stores matrix data necessary to construct an affine time varying system as a piecewise polynomial trajectory. More...
 
class  TimeVaryingLinearSystem
 Base class for a discrete or continuous linear time-varying (LTV) system. More...
 
class  TrajectorySource
 A source block that generates the value of a Trajectory for a given time. More...
 
class  UnrestrictedUpdateEvent
 This class represents an unrestricted update event. More...
 
class  ValkyriePDAndFeedForwardController
 
class  Value
 A container class for an arbitrary type T. More...
 
class  VectorBase
 VectorBase is an abstract base class that real-valued signals between Systems and real-valued System state vectors must implement. More...
 
class  VectorSystem
 A base class that specializes LeafSystem for use with only zero or one vector input ports, and only zero or one vector output ports. More...
 
class  ViewerDrawTranslator
 Specializes LcmAndVectorBaseTranslator to handle LCM messages of type drake::lcmt_viewer_draw. More...
 
class  WitnessFunction
 Class that stores a function that is able to help determine the time and state at which a step of the initial value problem integration of a System should end, which may be done for any number of purposes, including publishing or state reinitialization (i.e., event handling). More...
 
class  WitnessTriggeredEventData
 Class for storing data from a witness function triggering to be passed to event handlers. More...
 
class  WrapToSystem
 An element-wise wrapping block that transforms the specified indices of the input signal u into the interval [low, high). More...
 
class  ZeroOrderHold
 A ZeroOrderHold block with input u, which may be vector-valued (discrete or continuous) or abstract, and discrete output y, where the y is sampled from u with a fixed period. More...
 

Typedefs

typedef FixedInputPortValue FreestandingInputPortValue
 
using DependencyTicket = TypeSafeIndex< class DependencyTag >
 Identifies a particular source value or computation for purposes of declaring and managing dependencies. More...
 
using CacheIndex = TypeSafeIndex< class CacheTag >
 Serves as a unique identifier for a particular CacheEntry in a System and the corresponding CacheEntryValue in that System's Context. More...
 
using SubsystemIndex = TypeSafeIndex< class SubsystemIndexTag >
 Serves as a local index for a child subsystem within a parent Diagram, or a child subcontext within a parent DiagramContext. More...
 
using InputPortIndex = TypeSafeIndex< class InputPortTag >
 Serves as the local index for the input ports of a given System. More...
 
using OutputPortIndex = TypeSafeIndex< class OutputPortTag >
 Serves as the local index for the output ports of a given System. More...
 
using DiscreteStateIndex = TypeSafeIndex< class DiscreteStateTag >
 Serves as the local index for discrete state groups within a given System and its corresponding Context. More...
 
using AbstractStateIndex = TypeSafeIndex< class AbstractStateTag >
 Serves as the local index for abstract state variables within a given System and its corresponding Context. More...
 
using NumericParameterIndex = TypeSafeIndex< class NumericParameterTag >
 Serves as the local index for numeric parameter groups within a given System and its corresponding Context. More...
 
using AbstractParameterIndex = TypeSafeIndex< class AbstractParameterTag >
 Serves as the local index for abstract parameters within a given System and its corresponding Context. More...
 
typedef std::mt19937 RandomGenerator
 Defines the implementation of the stdc++ concept UniformRandomBitGenerator to be used by the Systems classes. More...
 
using SystemConstraintIndex = TypeSafeIndex< class SystemConstraintTag >
 
using MyVector1d = MyVector< 1, double >
 
using MyVector2d = MyVector< 2, double >
 
using MyVector3d = MyVector< 3, double >
 
using MyVector4d = MyVector< 4, double >
 
typedef internal::RandomSource< std::uniform_real_distribution< double > > UniformRandomSource
 Generates uniformly distributed random numbers in the interval [0,1]. More...
 
typedef internal::RandomSource< std::normal_distribution< double > > GaussianRandomSource
 Generates normally distributed random numbers with mean zero and unit covariance. More...
 
typedef internal::RandomSource< std::exponential_distribution< double > > ExponentialRandomSource
 Generates exponentially distributed random numbers with mean, standard deviation, and scale parameter (aka 1/λ) set to one. More...
 

Enumerations

enum  TriggerType {
  kUnknown, kInitialization, kForced, kTimed,
  kPeriodic, kPerStep, kWitness
}
 Predefined types of triggers for events. More...
 
enum  PortDataType { kVectorValued = 0, kAbstractValued = 1 }
 All system ports are either vectors of Eigen scalars, or black-box AbstractValues which may contain any type. More...
 
enum  SystemConstraintType { kEquality = 0, kInequality = 1 }
 
enum  WitnessFunctionDirection { kNone, kPositiveThenNonPositive, kNegativeThenNonNegative, kCrossesZero }
 

Functions

 TEST_F (RigidBodyPlantTimeSteppingDataTest, NormalJacobian)
 
 TEST_F (RigidBodyPlantTimeSteppingDataTest, TangentJacobian)
 
 GTEST_TEST (RigidBodyPlantTest, LinearizePendulumTest)
 
 GTEST_TEST (RigidBodyPlantTest, TimesteppingAutoDiffThrows)
 
 GTEST_TEST (RigidBodyPlantTest, BallAutoDiffThrowsTest)
 
 GTEST_TEST (RigidBodyPlantTest, BallAutoDiffTest)
 
 DEFINE_double (v, 12, "The ball's initial linear speed down the lane (m/s)")
 
 DEFINE_double (timestep, 2e-4, "The simulator time step (s)")
 
 DEFINE_double (w, 25, "The ball's initial angular speed (around [-1, 0 ,0] (rad/s).")
 
 DEFINE_double (youngs_modulus, 1e8, "The contact model's Young's modulus (Pa)")
 
 DEFINE_double (us, 0.4, "The static coefficient of friction")
 
 DEFINE_double (ud, 0.2, "The dynamic coefficient of friction")
 
 DEFINE_double (v_tol, 0.01, "The maximum slipping speed allowed during stiction (m/s)")
 
 DEFINE_double (dissipation, 2, "The contact model's dissipation (s/m)")
 
 DEFINE_double (contact_radius, 1e-3, "The characteristic scale of radius (m) of the contact area")
 
 DEFINE_double (sim_duration, 3, "The simulation duration (s)")
 
 DEFINE_int32 (pin_count, 10, "The number of pins -- in the range [0, 10]")
 
 DEFINE_string (system_type, "continuous", "The type of system to use: " "'continuous' or 'discretized'")
 
 DEFINE_double (dt, 1e-3, "The step size to use for " "'system_type=discretized' (ignored for " "'system_type=continuous'")
 
int main ()
 
 DEFINE_double (v, 0.1, "The initial speed of the second brick (m/s)")
 
 DEFINE_double (timestep, 1e-4, "The simulator time step (s)")
 
 DEFINE_double (push, 260, "The magnitude of the force pushing on the bricks (N)")
 
 DEFINE_double (dissipation, 1.0, "The contact model's dissipation (s/m)")
 
void run_valkyrie_pd_ff_controller ()
 
 DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS (class AntiderivativeFunction)
 
 DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS (class InitialValueProblem)
 
 DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS (class ScalarInitialValueProblem)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const BasicVector< T > &vec)
 
 TEST_F (SystemOutputTest, Access)
 
 TEST_F (SystemOutputTest, Mutation)
 
 TEST_F (SystemOutputTest, Copy)
 
template<typename T >
std::unique_ptr< AbstractValuePackValue (T value)
 Makes a new AbstractValue containing the value. More...
 
template<typename T >
T UnpackValue (const AbstractValue &value)
 Extracts data of type T from the given value, or aborts if the value does not contain type T. More...
 
int UnpackIntValue (const AbstractValue *value)
 Extracts an integer from the given value, or aborts if the value does not contain an integer. More...
 
int UnpackIntValue (const AbstractValue &value)
 Extracts an integer from the given value, or aborts if the value does not contain an integer. More...
 
template<template< typename > class S, typename Callback >
::testing::AssertionResult is_autodiffxd_convertible (const S< double > &dut, Callback callback)
 Tests whether the given device under test of type S<double> can be converted to use AutoDiffXd as its scalar type. More...
 
template<template< typename > class S>
::testing::AssertionResult is_autodiffxd_convertible (const S< double > &dut)
 Tests whether the given device under test of type S<double> can be converted to use AutoDiffXd as its scalar type. More...
 
template<template< typename > class S, typename Callback >
::testing::AssertionResult is_symbolic_convertible (const S< double > &dut, Callback callback)
 Tests whether the given device under test of type S<double> can be converted to use Expression as its scalar type. More...
 
template<template< typename > class S>
::testing::AssertionResult is_symbolic_convertible (const S< double > &dut)
 Tests whether the given device under test of type S<double> can be converted to use Expression as its scalar type. More...
 
std::unique_ptr< LinearSystem< double > > Linearize (const System< double > &system, const Context< double > &context, int input_port_index=kUseFirstInputIfItExists, int output_port_index=kUseFirstOutputIfItExists, double equilibrium_check_tolerance=1e-6)
 Takes the first-order Taylor expansion of a System around a nominal operating point (defined by the Context). More...
 
std::unique_ptr< AffineSystem< double > > FirstOrderTaylorApproximation (const System< double > &system, const Context< double > &context, int input_port_index=kUseFirstInputIfItExists, int output_port_index=kUseFirstOutputIfItExists)
 A first-order Taylor series approximation to a system in the neighborhood of an arbitrary point. More...
 
Eigen::MatrixXd ControllabilityMatrix (const LinearSystem< double > &sys)
 Returns the controllability matrix: R = [B, AB, ..., A^{n-1}B]. More...
 
bool IsControllable (const LinearSystem< double > &sys, optional< double > threshold)
 Returns true iff the controllability matrix is full row rank. More...
 
Eigen::MatrixXd ObservabilityMatrix (const LinearSystem< double > &sys)
 Returns the observability matrix: O = [ C; CA; ...; CA^{n-1} ]. More...
 
bool IsObservable (const LinearSystem< double > &sys, optional< double > threshold)
 Returns true iff the observability matrix is full column rank. More...
 
int AddRandomInputs (double sampling_interval_sec, DiagramBuilder< double > *builder)
 For each subsystem input port in builder that is (a) not yet connected and (b) labeled as random in the InputPort, this method will add a new RandomSource system of the appropriate type and connect it to the subsystem input port. More...
 
template<typename T >
SignalLogger< T > * LogOutput (const OutputPort< T > &src, systems::DiagramBuilder< T > *builder)
 Provides a convenience function for adding a SignalLogger, initialized to the correct size, and connected to another output in a DiagramBuilder. More...
 

Variables

constexpr int kAutoSize = -1
 Port type indicating a vector value whose size is not prespecified but rather depends on what it is connected to (not yet implemented). More...
 
constexpr const char * kUseDefaultName = "__use_default_name__"
 Name to use when you want a default one generated. More...
 
constexpr int kNumInputPorts = 2
 
constexpr int kInputSize [kNumInputPorts] = {1, 2}
 
constexpr int kNumOutputPorts = 3
 
constexpr int kContinuousStateSize = 5
 
constexpr int kGeneralizedPositionSize = 2
 
constexpr int kGeneralizedVelocitySize = 2
 
constexpr int kMiscContinuousStateSize = 1
 
constexpr double kTime = 12.0
 

Typedef Documentation

◆ AbstractParameterIndex

using AbstractParameterIndex = TypeSafeIndex<class AbstractParameterTag>

Serves as the local index for abstract parameters within a given System and its corresponding Context.

◆ AbstractStateIndex

using AbstractStateIndex = TypeSafeIndex<class AbstractStateTag>

Serves as the local index for abstract state variables within a given System and its corresponding Context.

◆ CacheIndex

using CacheIndex = TypeSafeIndex<class CacheTag>

Serves as a unique identifier for a particular CacheEntry in a System and the corresponding CacheEntryValue in that System's Context.

This is an index providing extremely fast constant-time access to both.

◆ DependencyTicket

using DependencyTicket = TypeSafeIndex<class DependencyTag>

Identifies a particular source value or computation for purposes of declaring and managing dependencies.

Unique only within a given subsystem and its corresponding subcontext.

◆ DiscreteStateIndex

using DiscreteStateIndex = TypeSafeIndex<class DiscreteStateTag>

Serves as the local index for discrete state groups within a given System and its corresponding Context.

◆ FreestandingInputPortValue

◆ InputPortIndex

using InputPortIndex = TypeSafeIndex<class InputPortTag>

Serves as the local index for the input ports of a given System.

The indexes used by a subsystem and its corresponding subcontext are the same.

◆ MyVector1d

using MyVector1d = MyVector<1, double>

◆ MyVector2d

using MyVector2d = MyVector<2, double>

◆ MyVector3d

using MyVector3d = MyVector<3, double>

◆ MyVector4d

using MyVector4d = MyVector<4, double>

◆ NumericParameterIndex

using NumericParameterIndex = TypeSafeIndex<class NumericParameterTag>

Serves as the local index for numeric parameter groups within a given System and its corresponding Context.

◆ OutputPortIndex

using OutputPortIndex = TypeSafeIndex<class OutputPortTag>

Serves as the local index for the output ports of a given System.

The indexes used by a subsystem and its corresponding subcontext are the same.

◆ RandomGenerator

typedef std::mt19937 RandomGenerator

Defines the implementation of the stdc++ concept UniformRandomBitGenerator to be used by the Systems classes.

This is provided as a work-around to enable the use of the generator in virtual methods (which cannot be templated on the generator type).

◆ SubsystemIndex

using SubsystemIndex = TypeSafeIndex<class SubsystemIndexTag>

Serves as a local index for a child subsystem within a parent Diagram, or a child subcontext within a parent DiagramContext.

A subsystem and its matching subcontext have the same SubsystemIndex. Unique only within a given subsystem or subcontext.

◆ SystemConstraintIndex

using SystemConstraintIndex = TypeSafeIndex<class SystemConstraintTag>

Enumeration Type Documentation

◆ PortDataType

All system ports are either vectors of Eigen scalars, or black-box AbstractValues which may contain any type.

Enumerator
kVectorValued 
kAbstractValued 

◆ SystemConstraintType

enum SystemConstraintType
strong
Enumerator
kEquality 

The constraint is of the form f(x)=0.

kInequality 

The constraint is of the form f(x)≥0.

◆ TriggerType

enum TriggerType
strong

Predefined types of triggers for events.

Used at run time to determine why the associated event has occurred.

Enumerator
kUnknown 
kInitialization 

This trigger indicates that an associated event is triggered at system initialization.

kForced 

This trigger indicates that an associated event is triggered by directly calling the corresponding public system API for event handling (e.g.

Publish(context)).

kTimed 

This trigger indicates that an associated event is triggered by the system proceeding to a single, arbitrary time.

Timed events are commonly created in System::CalcNextUpdateTime().

kPeriodic 

This type indicates that an associated event is triggered by the system proceeding to a time t ∈ {tᵢ = t₀ + p * i} for some period p, time offset t₀, and i is a non-negative integer.

See also
PeriodicEventData. Periodic events are commonly created in System::CalcNextUpdateTime().
kPerStep 

This trigger indicates that an associated event is triggered whenever a solver takes a step.

A solver is an abstract construct that controls the time and state evolution of a System. For example, a simulator is a solver. Its step advances time a finite duration by integrating a system, modifying its state accordingly. Per-step events are most commonly created in System::GetPerStepEvents(). A very common use of such per-step events is to update a discrete or abstract state variable that changes whenever the continuous state advances; examples are computing the "min" or "max" of some state variable, recording a signal in a delay buffer, or publishing. Per-step events are also useful to implement feedback controllers interfaced with physical devices; the controller can be implemented in the event handler, and the "step" would correspond to receiving sensory data from the hardware.

kWitness 

This trigger indicates that an associated event is triggered by the zero crossing of a witness function.

◆ WitnessFunctionDirection

Enumerator
kNone 

This witness function will never be triggered.

kPositiveThenNonPositive 

Witness function triggers when the function crosses or touches zero after an initial positive evaluation.

kNegativeThenNonNegative 

Witness function triggers when the function crosses or touches zero after an initial negative evaluation.

kCrossesZero 

Witness function triggers any time the function crosses/touches zero, except when the witness function evaluates to zero at the beginning of the interval.

Conceptually equivalent to kPositiveThenNonNegative OR kNegativeThenNonNegative.

Function Documentation

◆ AddRandomInputs()

int AddRandomInputs ( double  sampling_interval_sec,
DiagramBuilder< double > *  builder 
)

For each subsystem input port in builder that is (a) not yet connected and (b) labeled as random in the InputPort, this method will add a new RandomSource system of the appropriate type and connect it to the subsystem input port.

Parameters
sampling_interval_secinterval to be used for all new sources.
Returns
the total number of RandomSource systems added.
See also
Stochastic Systems

◆ DEFINE_double() [1/15]

drake::systems::DEFINE_double ( ,
0.  1,
"The initial speed of the second brick (m/s)"   
)

◆ DEFINE_double() [2/15]

drake::systems::DEFINE_double ( timestep  ,
1e-  4,
"The simulator time step (s)"   
)

◆ DEFINE_double() [3/15]

drake::systems::DEFINE_double ( push  ,
260  ,
"The magnitude of the force pushing on the bricks (N)"   
)

◆ DEFINE_double() [4/15]

drake::systems::DEFINE_double ( dissipation  ,
1.  0,
"The contact model's dissipation (s/m)"   
)

◆ DEFINE_double() [5/15]

drake::systems::DEFINE_double ( ,
12  ,
"The ball's initial linear speed down the lane (m/s)"   
)

◆ DEFINE_double() [6/15]

drake::systems::DEFINE_double ( timestep  ,
2e-  4,
"The simulator time step (s)"   
)

◆ DEFINE_double() [7/15]

drake::systems::DEFINE_double ( ,
25   
)

◆ DEFINE_double() [8/15]

DEFINE_double ( youngs_modulus  ,
1e8  ,
"The contact model's Young's modulus (Pa)"   
)

◆ DEFINE_double() [9/15]

DEFINE_double ( us  ,
0.  4,
"The static coefficient of friction"   
)

◆ DEFINE_double() [10/15]

DEFINE_double ( ud  ,
0.  2,
"The dynamic coefficient of friction"   
)

◆ DEFINE_double() [11/15]

DEFINE_double ( v_tol  ,
0.  01,
"The maximum slipping speed allowed during stiction (m/s)"   
)

◆ DEFINE_double() [12/15]

drake::systems::DEFINE_double ( dissipation  ,
,
"The contact model's dissipation (s/m)"   
)

◆ DEFINE_double() [13/15]

DEFINE_double ( contact_radius  ,
1e-  3,
"The characteristic scale of radius (m) of the contact area"   
)

◆ DEFINE_double() [14/15]

DEFINE_double ( sim_duration  ,
,
"The simulation duration (s)"   
)

◆ DEFINE_double() [15/15]

DEFINE_double ( dt  ,
1e-  3 
)

◆ DEFINE_int32()

drake::systems::DEFINE_int32 ( pin_count  ,
10  ,
"The number of pins -- in the range "  [0, 10] 
)

◆ DEFINE_string()

DEFINE_string ( system_type  ,
"continuous"  ,
"The type of system to use: " "'continuous' or 'discretized'"   
)

◆ DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS() [1/3]

drake::systems::DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS ( class AntiderivativeFunction  )

◆ DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS() [2/3]

drake::systems::DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS ( class InitialValueProblem  )

◆ DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS() [3/3]

drake::systems::DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS ( class ScalarInitialValueProblem  )

◆ GTEST_TEST() [1/4]

drake::systems::GTEST_TEST ( RigidBodyPlantTest  ,
LinearizePendulumTest   
)

◆ GTEST_TEST() [2/4]

drake::systems::GTEST_TEST ( RigidBodyPlantTest  ,
TimesteppingAutoDiffThrows   
)

◆ GTEST_TEST() [3/4]

drake::systems::GTEST_TEST ( RigidBodyPlantTest  ,
BallAutoDiffThrowsTest   
)

◆ GTEST_TEST() [4/4]

drake::systems::GTEST_TEST ( RigidBodyPlantTest  ,
BallAutoDiffTest   
)

◆ is_autodiffxd_convertible() [1/2]

::testing::AssertionResult drake::systems::is_autodiffxd_convertible ( const S< double > &  dut,
Callback  callback 
)

Tests whether the given device under test of type S<double> can be converted to use AutoDiffXd as its scalar type.

If the test passes, additional checks on the converted object of type const S<AutoDiffXd>& can be passed via a lambda into callback. The Callback must take an const S<AutoDiffXd>& and return void; a typical value would be a lambda such as [](const auto& converted) { EXPECT_TRUE(converted.thing()); }.

◆ is_autodiffxd_convertible() [2/2]

::testing::AssertionResult drake::systems::is_autodiffxd_convertible ( const S< double > &  dut)

Tests whether the given device under test of type S<double> can be converted to use AutoDiffXd as its scalar type.

◆ is_symbolic_convertible() [1/2]

::testing::AssertionResult drake::systems::is_symbolic_convertible ( const S< double > &  dut,
Callback  callback 
)

Tests whether the given device under test of type S<double> can be converted to use Expression as its scalar type.

If the test passes, additional checks on the converted object of type const S<Expression>& can be passed via a lambda into callback. The Callback must take an const S<Expression>& and return void; a typical value would be a lambda such as [](const auto& converted) { EXPECT_TRUE(converted.thing()); }.

◆ is_symbolic_convertible() [2/2]

::testing::AssertionResult drake::systems::is_symbolic_convertible ( const S< double > &  dut)

Tests whether the given device under test of type S<double> can be converted to use Expression as its scalar type.

◆ LogOutput()

SignalLogger<T>* drake::systems::LogOutput ( const OutputPort< T > &  src,
systems::DiagramBuilder< T > *  builder 
)

Provides a convenience function for adding a SignalLogger, initialized to the correct size, and connected to another output in a DiagramBuilder.

DiagramBuilder<double> builder;
auto foo = builder.AddSystem<Foo>("name", 3.14);
auto logger = LogOutput(foo->get_output_port(), &builder);

◆ main()

int main ( )

◆ operator<<()

std::ostream& drake::systems::operator<< ( std::ostream &  os,
const BasicVector< T > &  vec 
)

◆ PackValue()

std::unique_ptr<AbstractValue> drake::systems::PackValue ( T  value)

Makes a new AbstractValue containing the value.

◆ run_valkyrie_pd_ff_controller()

void drake::systems::run_valkyrie_pd_ff_controller ( )

◆ TEST_F() [1/5]

drake::systems::TEST_F ( SystemOutputTest  ,
Access   
)

◆ TEST_F() [2/5]

drake::systems::TEST_F ( SystemOutputTest  ,
Mutation   
)

◆ TEST_F() [3/5]

drake::systems::TEST_F ( SystemOutputTest  ,
Copy   
)

◆ TEST_F() [4/5]

drake::systems::TEST_F ( RigidBodyPlantTimeSteppingDataTest  ,
NormalJacobian   
)

◆ TEST_F() [5/5]

drake::systems::TEST_F ( RigidBodyPlantTimeSteppingDataTest  ,
TangentJacobian   
)

◆ UnpackIntValue() [1/2]

int drake::systems::UnpackIntValue ( const AbstractValue value)

Extracts an integer from the given value, or aborts if the value does not contain an integer.

◆ UnpackIntValue() [2/2]

int drake::systems::UnpackIntValue ( const AbstractValue value)

Extracts an integer from the given value, or aborts if the value does not contain an integer.

◆ UnpackValue()

T drake::systems::UnpackValue ( const AbstractValue value)

Extracts data of type T from the given value, or aborts if the value does not contain type T.

Variable Documentation

◆ kAutoSize

constexpr int kAutoSize = -1

Port type indicating a vector value whose size is not prespecified but rather depends on what it is connected to (not yet implemented).

◆ kContinuousStateSize

constexpr int kContinuousStateSize = 5

◆ kGeneralizedPositionSize

constexpr int kGeneralizedPositionSize = 2

◆ kGeneralizedVelocitySize

constexpr int kGeneralizedVelocitySize = 2

◆ kInputSize

constexpr int kInputSize[kNumInputPorts] = {1, 2}

◆ kMiscContinuousStateSize

constexpr int kMiscContinuousStateSize = 1

◆ kNumInputPorts

constexpr int kNumInputPorts = 2

◆ kNumOutputPorts

constexpr int kNumOutputPorts = 3

◆ kTime

constexpr double kTime = 12.0

◆ kUseDefaultName

constexpr const char* kUseDefaultName = "__use_default_name__"

Name to use when you want a default one generated.

This is set to an ugly string that no one will want to use as an actual name. You should normally give meaningful names to all Drake System entities you create rather than using this.