About failing to add a PrescribedController

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
zhou zhou
Posts: 1
Joined: Mon Feb 26, 2018 6:47 am

About failing to add a PrescribedController

Post by zhou zhou » Sat Mar 20, 2021 5:43 am

Dear All,

I plan to add a TorqueActuator to the ankle joint, the follows are related codes in the *.osim file:

Part 1

Code: Select all

<ForceSet name="forceset">
			<objects>
            <TorqueActuator name="right_ankle_torque"><!--Flag indicating whether the force is disabled or not. Disabled means that the force is not active in subsequent dynamics realizations.-->
               <isDisabled>false</isDisabled><!--Minimum allowed value for control signal. Used primarily when solving for control values.-->
               <min_control>-Inf</min_control><!--Maximum allowed value for control signal. Used primarily when solving for control values.-->
               <max_control>Inf</max_control><!--Name of Body to which the torque actuator is applied.-->
               <bodyA>talus_r</bodyA><!--Name of Body to which the equal and opposite torque is applied.-->
               <bodyB>tibia_r</bodyB><!--Interpret axis in Ground frame if true; otherwise, body A's frame.-->
               <torque_is_global>false</torque_is_global><!--Fixed direction about which torque is applied, in Ground or body A frame depending on 'torque_is_global' property.-->
               <axis>0 0 1</axis><!--The maximum torque produced by this actuator when fully activated.-->
               <optimal_force>1</optimal_force>
            </TorqueActuator>
.....

Part 2

Code: Select all

	<ControllerSet name="Controllers">
         <objects>
            <PrescribedController name="motor_controller"><!--The list of model actuators that this controller will control.The keyword ALL indicates the controller will controll all the acuators in the model-->
               <actuator_list>right_ankle_torque</actuator_list><!--Functions (one per control) describing the controls for actuatorsspecified for this controller.-->
               <FunctionSet name="ControlFunctions">
                  <objects>
                    <PiecewiseConstantFunction>
                        <x> 0.6 1.1 1.2 1.9</x>
			<y> 0 10 10 0</y>
		    </PiecewiseConstantFunction>
                  </objects>
                  <groups/>
               </FunctionSet>
            </PrescribedController>
         </objects>
         <groups/>
      </ControllerSet>
However, when I load the *.osim file in Opensim, in the nevigator bar, 'motor_controller' is not shown below the item 'Controllers'; details are shown in the attachment

Obviously, the TorqueActuator 'right_ankle_torque' fails to be added to the model. May I know the cause(s)? Thanks a lot.
Attachments
20200623_142022.jpg
20200623_142022.jpg (11.34 KiB) Viewed 225 times

Tags:

POST REPLY