ModelHfd
Model using the Hyfydy simulation engine.
The following models can be used:
ModelHyfydy
: Hyfydy model using single precision floating point computations (default)ModelHyfydyPrecise
: Hyfydy model using double precision floating point computations
The ModelHyfydyPrecise
model can be used for additional accuracy and stability. For complex models, using ModelHyfydyPrecise
may also improve performance, as it allows for larger integration step sizes.
Inherits from Model.
Public Attributes
Parameter | Type | Description |
---|---|---|
model_file | path | File containing the Hyfydy model. |
leg_upper_body | string | Name of the leg upper body; default = femur. |
leg_lower_body | string | Name of the leg lower body; default = calcn. |
enable_external_forces | bool | Must be set before external forces can be added to the model; default = 0. |
integration_accuracy | double | Accuracy parameter for integration; default = config dependent. |
min_integration_step_size | double | Minimum integration step size; default = config dependent. |
ground_velocity | Vec3 | Velocity of the ground frame, useful for simulating treadmills; default = [0, 0, 0]. |
gravity | xo::optional< hfd::vec3 > | Gravitational constant; default = [0, -9.81, 0]. |
use_omnidirectional_root_dofs | xo::optional< bool > | Use euler order yzx for root bodies (the sensible choice); default = 0. |
enable_dof_actuators | bool | Create Actuators for DOFs with joint_motor; default = 1. |
zero_velocity_equilibration | bool | Use zero target muscle CE velocity for more stable equilibration; default = 0. |
use_opensim_activation_dynamics | bool | Use OpenSim algorithm for muscle activation dynamics; default = 0. |
max_equilibrate_velocity_error | hfd::real | Maximum muscle equilibration error; default = 0.01. |
include_dofs_in_state | bool | Include DOF values and velocities in model state, useful for MimicMeasure; default = 0. |
relax_fixed_time_step_precision | bool | Relax precision of the fixed control and analysis step size to increase performance and step smoothness; default = 0. |
enforce_min_integration_step_size | bool | Always use min_integration_step_size, even in step redo; default = 0. |
enable_gyroscopic_forces | bool | Enable gyroscopic forces; default = 0. |
use_swing_twist_joint_limits | bool | Use swing-twist joint limits for all joints; default = 0. |
enable_collision_between_objects | bool | Always enable collision between objects; default = 0. |
move_static_bodies | bool | Move static bodies when they have a velocity; default = 1. |
enable_interaction | bool | Allow interaction with the model; default = 0. |
interaction_stiffness | hfd::real | Stiffness of the interaction spring;. |
interaction_damping | hfd::real | Damping of the interaction spring;. |
muscle_force_multiplier | OptionalPar | Muscle force multiplier to use, if not defined inside model file; default = 1. |
muscle_fiber_damping | OptionalPar | Muscle fiber damping, overrides the default when set; default = not set. |
activation_rate | OptionalPar | Muscle activation rate, overrides the default when set; default = not set. |
deactivation_rate | OptionalPar | Muscle deactivation rate, overrides the default when set; default = not set. |
v_max | OptionalPar | Muscle v_max, overrides the default when set; default = not set. |
transition_velocity | OptionalPar | Contact force transition_velocity, overrides the default when set; default = not set. |
viscous_friction_factor | OptionalPar | Factor used to compute viscous friction as a factor of dynamic friction; default = 1. |
model_scale | OptionalPar | Scale factor applied to the model, if not defined inside model file; default = 1. |
state_init_file | path | File containing the initial state (or pose) of the model. |
state_init_file_ignore_activations | bool | Ignore muscle activations from state_init_file (if present); default = 0. |
initial_state_offset | const PropNode * | Offset [rad] or [m] to apply to initial state; default = 0. |
initial_state_offset_symmetric | bool | Use symmetric offset for left and right; default = 0. |
initial_state_offset_include | String | Pattern matching the states to include in initial offset (semicolon seperated); default = “*”. |
initial_state_offset_exclude | String | Pattern matching the states to exclude in initial offset (semicolon seperated); default = “”. |
use_fixed_control_step_size | bool | Use fixed step size for controllers; default = true. |
fixed_control_step_size | double | Step size used for controllers; default = 0.001. |
fixed_measure_step_size | double | Step size used for measures (not supported by all model types); default = fixed_control_step_size . |
max_step_size | double | Maximum integration step size; default = fixed_control_step_size. |
initial_load | Real | Initial load [BW] at which to place the model initially; default = 0.2;. |
initial_load_dof | String | Name of the DOF that needs to be adjusted to find the required initial_load; default = pelvis_ty. |
sensor_delay_scaling_factor | Real | Scaling factor to apply to all sensor delays; default = 1. |
initial_equilibration_activation | Real | Activation used to equilibrate muscles before control inputs are known; default = 0.05. |
min_muscle_activation | Real | Minimum muscle activation, values below are clamped to this; default = 0.01. |
max_muscle_activation | Real | Maximum muscle activation, values above are clamped to this; default = 1. |
max_individual_muscle_activation | const PropNode * | Maximum individual muscle activation, allows for optimization of individual max activation; default = not set. |
muscle_input_soft_limits | std::pair< Real, Real > | Pair of values determining the RELATIVE lower and upper soft limit for muscle input; default = [0.0 1.0]. |
initialize_activations_from_controller | xo::optional< bool > | Initialize muscle activations from initial controller values; default = true unless state_init_file contains activations. |
neural_delays | xo::flat_map< String, TimeInSeconds > | Optional list of two-way neural delays, used by SpinalController. |
planar | xo::optional< bool > | Set to override automatic planar model detection; default = not set. |
user_input_file | path | File containing user input values, only for model with user inputs; default = “”. |
scone_version | xo::version | scone version; this is set automatically when running an optimization. |
signature_prefix | String | Prefix signature with custom string. Special tags: DATE_TIME, DATE_TIME_EXACT, SCONE_VERSION. |
signature_postfix | String | Append custom string to signature. Special tags: DATE_TIME, DATE_TIME_EXACT, SCONE_VERSION. |
signature | String | Set custom signature and omit the auto-generated signature. |
Converted from doxygen using dokugen