Public Member Functions |
| OpenSim_DECLARE_PROPERTY (ControlFunctions, FunctionSet,"Functions (one per control) describing the controls for actuators""specified for this controller.") |
| FunctionSet of prescribed controls associated with each actuator.
|
| OpenSim_DECLARE_OPTIONAL_PROPERTY (controls_file, std::string,"Controls storage (.sto) file containing controls for individual ""actuators in the model. Column labels must match actuator names.") |
| (Optional) prescribed controls from a storage file
|
| OpenSim_DECLARE_OPTIONAL_PROPERTY (interpolation_method, int,"Interpolate the controls file data using piecewise: '0-constant', ""'1-linear', '3-cubic' or '5-quintic' functions.") |
| (Optional) interpolation method for controls in storage.
|
| PrescribedController () |
| Default constructor.
|
| PrescribedController (const std::string &controlsFileName, int interpMethodType=1) |
| Convenience constructor get controls from file.
|
virtual | ~PrescribedController () |
| Destructor.
|
void | computeControls (const SimTK::State &s, SimTK::Vector &controls) const override |
| Compute the control values for all actuators under the control of this Controller.
|
void | prescribeControlForActuator (int index, Function *prescribedFunction) |
| Assign a prescribe control function for the desired actuator identified by its index.
|
void | prescribeControlForActuator (const std::string actName, Function *prescribedFunction) |
| Assign a prescribe control function for the desired actuator identified by its name.
|
void | connectToModel (Model &model) override |
| Model component interface.
|
| OpenSim_DECLARE_PROPERTY (isDisabled, bool,"Flag (true or false) indicating whether or not the controller is disabled.") |
| OpenSim_DECLARE_LIST_PROPERTY (actuator_list, std::string,"The list of model actuators that this controller will control.""The keyword ALL indicates the controller will controll all the acuators in the model") |
| Controller () |
| Default constructor.
|
bool | isDisabled () const |
| Get whether or not this controller is disabled.
|
void | setDisabled (bool disableFlag) |
| Disable this controller.
|
void | setActuators (const Set< Actuator > &actuators) |
| replace the current set of actuators with the provided set
|
void | addActuator (const Actuator &actuator) |
| add to the current set of actuators
|
const Set< Actuator > & | getActuatorSet () const |
| get a const reference to the current set of actuators
|
Set< Actuator > & | updActuators () |
| get a writable reference to the set of actuators for this controller
|
int | getNumControls () const |
Additional Inherited Members |
static void | registerType (const Object &defaultObject) |
| Register an instance of a class; if the class is already registered it will be replaced.
|
static void | renameType (const std::string &oldTypeName, const std::string &newTypeName) |
| Support versioning by associating the current Object type with an old name.
|
static const Object * | getDefaultInstanceOfType (const std::string &concreteClassName) |
| Return a pointer to the default instance of the registered (concrete) Object whose class name is given, or NULL if the type is not registered.
|
template<class T > |
static bool | isObjectTypeDerivedFrom (const std::string &concreteClassName) |
| Return true if the given concrete object type represents a subclass of the template object type T, and thus could be referenced with a T*.
|
static Object * | newInstanceOfType (const std::string &concreteClassName) |
| Create a new instance of the concrete Object type whose class name is given as concreteClassName.
|
static void | getRegisteredTypenames (Array< std::string > &typeNames) |
| Retrieve all the typenames registered so far.
|
template<class T > |
static void | getRegisteredObjectsOfGivenType (ArrayPtrs< T > &rArray) |
| Return an array of pointers to the default instances of all registered (concrete) Object types that derive from a given Object-derived type that does not have to be concrete.
|
static void | PrintPropertyInfo (std::ostream &os, const std::string &classNameDotPropertyName) |
| Dump formatted property information to a given output stream, useful for creating a "help" facility for registered objects.
|
static void | PrintPropertyInfo (std::ostream &os, const std::string &className, const std::string &propertyName) |
| Same as the other signature but the class name and property name are provided as two separate strings.
|
static Object * | makeObjectFromFile (const std::string &fileName) |
| Create an OpenSim object whose type is based on the tag at the root node of the XML file passed in.
|
static const std::string & | getClassName () |
| Return the name of this class as a string; i.e., "Object".
|
static void | setSerializeAllDefaults (bool shouldSerializeDefaults) |
| Static function to control whether all registered objects and their properties are written to the defaults section of output files rather than only those values for which the default was explicitly overwritten when read in from an input file or set programmatically.
|
static bool | getSerializeAllDefaults () |
| Report the value of the "serialize all defaults" flag.
|
static bool | isKindOf (const char *type) |
| Returns true if the passed-in string is "Object"; each Object-derived class defines a method of this name for its own class name.
|
static void | setDebugLevel (int newLevel) |
| Set the debug level to get verbose output.
|
static int | getDebugLevel () |
| Get current setting of debug level.
|
static Object * | SafeCopy (const Object *aObject) |
| Use the clone() method to duplicate the given object unless the pointer is null in which case null is returned.
|
static void | RegisterType (const Object &defaultObject) |
| OBSOLETE alternate name for registerType().
|
static void | RenameType (const std::string &oldName, const std::string &newName) |
| OBSOLETE alternate name for renameType().
|
static const std::string | DEFAULT_NAME |
| Name used for default objects when they are serialized.
|
void | addToSystem (SimTK::MultibodySystem &system) const override |
| Model component interface that creates underlying computational components in the SimTK::MultibodySystem.
|
void | setNumControls (int numControls) |
| Only a Controller can set its number of controls based on its actuators.
|
virtual void | initStateFromProperties (SimTK::State &state) const |
| Transfer property values or other state-independent initial values into this component's state variables in the passed-in state argument.
|
virtual void | setPropertiesFromState (const SimTK::State &state) |
| Update this component's property values to match the specified State, if the component has created any state variable that is intended to correspond to a property.
|
virtual SimTK::Vector | computeStateVariableDerivatives (const SimTK::State &s) const |
| If a model component has allocated any continuous state variables using the addStateVariable() method, then computeStateVariableDerivatives() must be implemented to provide time derivatives for those states.
|
virtual void | generateDecorations (bool fixed, const ModelDisplayHints &hints, const SimTK::State &state, SimTK::Array_< SimTK::DecorativeGeometry > &appendToThis) const |
| Optional method for generating arbitrary display geometry that reflects this ModelComponent at the specified state.
|
virtual void | realizeTopology (SimTK::State &state) const |
| Obtain state resources that are needed unconditionally, and perform computations that depend only on the system topology.
|
virtual void | realizeModel (SimTK::State &state) const |
| Obtain state resources that may be needed, depending on modeling options, and perform computations that depend only on topology and selected modeling options.
|
virtual void | realizeInstance (const SimTK::State &state) const |
| Perform computations that depend only on instance variables, like lengths and masses.
|
virtual void | realizeTime (const SimTK::State &state) const |
| Perform computations that depend only on time and earlier stages.
|
virtual void | realizePosition (const SimTK::State &state) const |
| Perform computations that depend only on position-level state variables and computations performed in earlier stages (including time).
|
virtual void | realizeVelocity (const SimTK::State &state) const |
| Perform computations that depend only on velocity-level state variables and computations performed in earlier stages (including position, and time).
|
virtual void | realizeDynamics (const SimTK::State &state) const |
| Perform computations (typically forces) that may depend on dynamics-stage state variables, and on computations performed in earlier stages (including velocity, position, and time), but not on other forces, accelerations, constraint multipliers, or reaction forces.
|
virtual void | realizeAcceleration (const SimTK::State &state) const |
| Perform computations that may depend on applied forces.
|
virtual void | realizeReport (const SimTK::State &state) const |
| Perform computations that may depend on anything but are only used for reporting and cannot affect subsequent simulation behavior.
|
void | includeAsSubComponent (ModelComponent *aComponent) |
| Include another ModelComponent as a Subcomponent of this ModelComponent.
|
void | addModelingOption (const std::string &optionName, int maxFlagValue) const |
| Add a modeling option (integer flag stored in the State) for use by this ModelComponent.
|
void | addStateVariable (const std::string &stateVariableName, SimTK::Stage invalidatesStage=SimTK::Stage::Dynamics) const |
| Add a continuous system state variable belonging to this ModelComponent, and assign a name by which to refer to it.
|
void | addDiscreteVariable (const std::string &discreteVariableName, SimTK::Stage invalidatesStage) const |
| Add a system discrete variable belonging to this ModelComponent, give it a name by which it can be referenced, and declare the lowest Stage that should be invalidated if this variable's value is changed.
|
template<class T > |
void | addCacheVariable (const std::string &cacheVariableName, const T &variablePrototype, SimTK::Stage dependsOnStage) const |
| Add a state cache entry belonging to this ModelComponent to hold calculated values that must be automatically invalidated when certain state values change.
|
const int | getStateIndex (const std::string &name) const |
| Get the index of a ModelComponent's continuous state variable in the Subsystem for allocations.
|
const SimTK::DiscreteVariableIndex | getDiscreteVariableIndex (const std::string &name) const |
| Get the index of a ModelComponent's discrete variable in the Subsystem for allocations.
|
const SimTK::CacheEntryIndex | getCacheVariableIndex (const std::string &name) const |
| Get the index of a ModelComponent's cache variable in the Subsystem for allocations.
|
Model * | _model |
| The model this component belongs to.
|
#define | OpenSim_DECLARE_CONCRETE_OBJECT(ConcreteClass, SuperClass) |
| Macro to be included as the first line of the class declaration for any non-templatized, concrete class that derives from OpenSim::Object.
|
#define | OpenSim_DECLARE_ABSTRACT_OBJECT(ConcreteClass, SuperClass) |
| Macro to be included as the first line of the class declaration for any still-abstract class that derives from OpenSim::Object.
|
#define | OpenSim_DECLARE_CONCRETE_OBJECT_T(ConcreteClass, TArg, SuperClass) |
| Macro to be included as the first line of the class declaration for any templatized, concrete class that derives from OpenSim::Object, like Set<T>.
|
#define | OpenSim_DECLARE_ABSTRACT_OBJECT_T(ConcreteClass, TArg, SuperClass) |
| Macro to be included as the first line of the class declaration for any templatized, still-abstract class that derives from OpenSim::Object.
|