The AnyBodyTM Modeling System Tutorials Version 3.0.0, September 2007 Copyright © 2007, AnyBodyTM Technology A/S Home: www.anybodytech.com
9familiarize yourself with the options. Having loaded the model it is time to proceed to lesson 2: Controlling the posture. Lesson 2: Controlling th
99}; // ArmModel AnyFolder Drivers = { //--------------------------------- AnyKinEqSimpleDriver ShoulderMotion = { AnyRevoluteJoint &Jn
100The final step is to modify the calibration study to use the calibration drivers: // A new calibration study // A new calibration study AnyBodyCa
101Once again we need two drivers to put the model into the posture for calibration of the TricepsLong muscle: // ----------------------------------
102Muscle modeling Muscles are the actuators of living bodies. They are activated by the central nervous system (CNS) by a complicated electro-che
103length, pennation angle, tendon elasticity, and stiffness of passive tissues into account. Please refer to the reference manual for concise inform
104 AnyRevoluteJoint Jnt = { AnyRefFrame &ref1 = .GlobalRef; AnyRefFrame &ref2 = .Arm.Jnt; Axis = z; }; // Driv
105 Notice that this class has three derived classes. These are more advanced muscle models, and we shall get to those later. However for the time be
106The next step is to define a muscle that can use the model. This is actually the first of the two elements mentioned above: Muscle kinematics. Ag
107Notice that we have left only two points in the list of via points. This is obviously the minimal requirement and will create a muscle in a single
108InverseDynamicAnalysis. If you try it out and subsequently open a chart view, you are able to plot the muscle force: The muscle force is the ite
10AnyFolder Right = { //Arm AnyVar SternoClavicularProtraction=-23; //This value is not used for initial position AnyVar SternoClavicularElev
109 Let us play around with the settings a bit. An easy way to display all the settings is to discard our manually defined AnyDrawMuscle object and i
110 //Transparency = 1.000000; //DrawOnOff = 1.000000; //Bulging = 0.000000; //ColorScale = 0.000000; //RGBColorScale = {0.957031,
111up to an almost vertical position. If you plot the muscle force, Fm, again in a chart view, then you can see how the muscle force goes up drastica
112AnyDrawMuscle drw = { //RGB = {0.554688, 0.101563, 0.117188}; //Transparency = 1.000000; //DrawOnOff = 1.000000; Bulging = 1; ColorScale
113They are usually constrained by various obstacles on their way from origin to insertion, either by connective tissues or by the contact with bone
114 AnyRefNode Jnt = { sRel = {-0.5, 0.0, 0}; }; AnyRefNode M1Insertion = { sRel = {0.3, 0.05, 0}; }; AnyDrawSeg drw = {}; }; The ne
115 A muscle can pass through an unlimited number of via points, and the points can be attached to different segments. This can be used to create rat
116 AnyRefNode CylCenter = { sRel = {0, 0, -0.2}; }; }; // Global reference frame Having defined the point, we can proceed to create a sur
117 Radius = 0.15; Length = 0.4; AnyDrawParamSurf drv = {}; //CapRatio = 0.100000; }; }; Which causes the cylinder to rotate 20 deg
118 Jii = {0.100000, 1.000000, 1.000000}*0.1; AnyRefNode Jnt = { sRel = {-0.5, 0.0, 0}; }; AnyRefNode M1Insertion = { sRel = {0.3, 0.0
11 AnyVec3 Hand = {0.000, 0.000, 0.000}; AnyVec3 Hip = {0.000, 0.000, 0.000}; AnyVec3 Knee = {0.000, 0.000, 0.000}; An
119SPLine.StringMesh = 20; This line generates a sequence of 20 equidistant points on the shortest path muscle, and these are the points that are act
120 As you can see, both muscles are now wrapping over the cylinder, and we can run the InverseDynamicAnalysis. It seems to work, but the system prov
121measure that is really a string that wraps just like a muscle but does nothing else than measure its own length. These objects can be used outside
122to go with a simpler model where the approximations are clear. In short, AnyBody has the following muscle models available AnyMuscleModel This i
123 F0 = 0; Lfbar = 0; Lt0 = 0; Epsilonbar = 0; V0 = 0; }; Let us briefly review the parameters: Parameter Function F0 In the simple muscl
124}; The parameters here are more or less random. In a moment we shall explain the ones that are less random, but first we must assign the new model
125Now we can compare the variation of Lm and Lmdot to our settings of Lfbar and V0. Lm seems to vary between approximately 0.31 and 0.15. With an Lf
126 • Fin is a force, but it has not physiological significance for a muscle except for internal purposes. The reason why it is included in the outp
127muscle model. • EPOTmt is the total elastic potential energy in the muscle-tendon unit. • Pt is not relevant for this muscle model. • Pm is
128reducing Lt0: AnyMuscleModel2ELin Model2 = { F0 = 200; Lfbar = 0.3; Lt0 = 0.3; Epsilonbar = 0.05; V0 = -0.3; }; This reduction of the t
12 If you click once on InverseDynamicAnalysis and then on the Run button in the bottom of the window then the system will start analyzing the muscle
129 Definition of an external force requires two new elements in the model: The force itself and a new node on the arm, which we shall call hand, to
130 The interesting point here is that with the long tendon and the high load, the muscle no longer contracts uniformly. In fact, the muscle extends
131 The figure above is a schematic representation of the muscle model. We can get a complete impression of the parameters of the model if we pick th
132hence dimensionless. Jt and Jpe Jt and Jpe are elasticity factors for the tendon (serial-elastic) and parallel-elastic elements respectively. The
133 AnyRefFrame &Ins = .Arm.M2Insertion; SPLine.StringMesh = 20; SPLine.InitWrapPosVectors = {{-0.2, -0.2, 0},{-0.05,-0.2, 0}}; AnyDrawMus
134 From the time the passive force sets in, the tendon starts to elongate a little bit. The total origin-insertion length of the muscle-tendon un
135 }; AnyRefNode M1Insertion = { sRel = {0.3, 0.05, 0}; }; AnyRefNode M2Insertion = { sRel = {-0.2, 0.05, 0.05}; }; AnyRefNode Vi
136Lt The length of the tendon. This appears to be constant, but the tendon length actually changes slightly over the movement with the changes of mu
137Fm The force in the contractile element is decreasing throughout the movement because the moment arm of the external force is reducing and also be
138Pennation-Angle The pennation angle is the angle between the muscle fiber direction and the muscle line of action. This angle changes when the mus
13 Clicking the node produces an empty cordinate system in the large field. The reason why it is empty is that the standard setting of the ChartFX
139Pmt The mechanical power of the entire muscle-tendon unit, i.e. the rate of work performed on the skeleton. Notice that the power is negative beca
140 Not only is the shape of the graph different; the maximum activity is also significantly higher. An error of 10% in an anthropometric data value
141Try running the InverseDynamicAnalysis again and plot the Activity of Muscle2. You should see the following: As you can see, this is again very
142Detailed calibration There is a more accurate and detailed way of calibrating tendons, but it requires additional information. More precisely it
143muscles are disregarded and the body is balanced entirely by joint torques. This type of analysis can provide important information about the func
144 Reaction.Type = {0}; }; // Elbow driver }; // Driver folder AnyGeneralMuscle <ObjectName> = { //ForceDirection = -1; AnyKinMeasur
145Having provided torques for the shoulder and elbow it should be possible to run the inverse dynamic analysis. However, attempting to do so will pr
146Notice that in this case we have used the same strength (muscle model) for both joints. However, the maximum joint torque in physiological joints
147We are going to make a couple of changes to the simple arm model to investigate contact in more detail. We shall imagine that the hand of the mode
148 The muscle activity is rather constant which is the natural consequence of the moment arms being rather constant. The gravity as well as the appl
14 This tells you that to stand upright and carry the 50 N load in the right hand, the model is using 4.00e-001 = 40% of its maximum voluntary contra
149 F0 = 100.0; }; AnyMuscleModel ReacModel = { F0 = 10000.0; }; AnyGeneralMuscle WallReaction = { ForceDirection = -1; AnyKinMeasureOrg Org
150}; If you run the model again and plot the same graphs, you will see this: The wall is obviously useful in the initial stages of the movement wh
151 As you can see, the model is very simple. The blue structure is an "arm" that extends from the center of the yellow Ground reference fr
152It looks like the force development is slightly nonlinear. This would make sense because ligament elasticity is generally nonlinear, but in this c
153work with strain here rather than absolute length change? The reason is that ligaments are rather stiff structures, so small length changes can ca
154 The specification has created a continuous slope of 0 where the curve previously had a kink. Notice that the curve converges back to the "no
155 The significance of a1 is much the same, except it has its effect at the point (eps1,F1). Rather than at (L0,0). If, for instance you insert this
156the values of L0, eps1, and F1. You can similarly increase the slopes by increasing a1: Unlike normal fourth order polynomials, these curves wil
157 Clearly, this causes the curve to diverge after (eps1,F1), which is typical for higher order polynomials Unless you have some special reason for
158 Double-click it, and its value is shown in the Object Description Window. You should find a value of Main.LigModel.LigModel.L0 = 1.300000; This
15 This shows that the force in this muscle branch is roughly 18 N. Notice the specification line above the graphics pane marked with the red circle
159them you must have sound understanding of the laws of mechanics in general and of Newton's three laws of motion in particular. The mechanical
160 Segments do not have any particular shape associated with them. By default a segment is originated in its Center of Mass (CoM), but it is possibl
161 Please refer to the reference manual for further explanation. The Getting Started with AnyScript tutorial provides examples of segment definition
162 The different types are described in detail in the reference manual. For examples on how to use joints, please download and study the following t
163 But let us imagine that we wanted the hand to reach out an grab something at a specific position. It would probably be difficult to figure out pr
164 Click Pos, and you will get three graphs tracking the x, y, and z components of the WristPos kinematic measure. The z component (blue curve) of
165interpolation driver instead. AnyFolder Drivers = { AnyKinEqSimpleDriver HandMotionXY = { }; }; // Drivers folder We can now fill contents i
1660.00900900900 0.83799541478 -0.54567809793 0.00000000000 0.01001001000 0.83717626771 -0.54693420265 0.00000000000 0.01101101100 0.83626918423 -0.5
167We now have a linear measure that is in fact a three-dimensional vector from the origin of the global reference frame to the end point of the pend
168forces to realize this movement. So we need to switch the reaction forces of the new driver off like this: AnyKinEqInterPolDriver P1Driver = {
16All these branches have the same force, which is because they are assumed in the model to have the same strength. However, if you specify: Main.Stu
169afterwards. To directly drive just one coordinate we need a driver file with just one column of data in addition to the time column. Please downlo
170to the path of the pendulum regardless of which direction the pendulum has. But before we can make that shift, we shall implement the smart way of
171 Type = Bspline; BsplineOrder = 4; FileName = "P1.txt"; AnyKinMeasure &Lin = .M1Lin; // MeasureOrganizer = {0}; Reac
172 // MeasureOrganizer = {0}; Reaction.Type = {On, On, On}; }; The model now uses the new P2.txt file containing all three coordinates to dr
173 Notice that the accelerations are between approximately -500 and 600. Now, let us introduce some random noise. An easy way to do so is to simply
174 This appears to work very nicely. Plotting velocities produces this nice result: Still, there is not much indication that anything might be wro
175 Oops, something appears to have gone completely wrong here. The accelerations are noisy and several times larger than before. What could be the p
176The first example is a rather basic application of time-varying forces to the well-known 2-D arm model. The example shows forces defined directly
177The ampersand, '&', in front of the variable name specifies that this is a reference. What it means that MyFolderCopy will just poin
178 Right-click the files and save them in a directory of your choice. Then start AnyBody and load the main file, demo.include.any. Next up is Lesson
17complex modeling tasks. The syntax of AnyScript is much like a Java, JavaScript, or C++ computer program. If you already know one of these programm
179exchanging them, we shall end up with a very good supply of models that fit most purposes. The AnyBody Model Repository is an attempt to provide s
180and it is rather heavy computationally. For this reason the BRep directory is structured to enable the user to link applications to subsets of the
181 You can find more information on the structuring of the individual body part files in the Structure lesson. In the rest of this tutorial we shal
182The ARep branch of the repository contains a large amount of applications where different collections of body parts are hooked up to more or less
183//This file contains joint angles which are used at load time // for setting the initial positions #include "Mannequin.any" // This fil
184 AnyVar AnklePlantarFlexion =0.0; AnyVar AnkleEversion =0.0; }; AnyFolder Left = { This first section of the mannequin file c
185 #include "../../../BRep/Aalborg/BodyModels/FullBodyModel/BodyModel_NoMuscles.any" //This model uses the simple constant force musc
186AnyFolder EnvironmentModel = { /* ********************************************************** This folder contains the definition of the Envir
187 Jii = {0.003, 0.003, 0.3}; AnyRefNode rHandle = { sRel = {0.2, 0, 0.1}; }; AnyRefNode lHandle = { sRel = {-0.2, 0, -0.1}; }; A
188 Here's some emergency help if you are having problems making the model work: HandPump.2.zip contains the three modified files from this less
18 As you can see, the Main Frame window contains a smaller frame at the bottom. This frame provides much of your interaction with the system once yo
189we cannot leave the model with a specification of constant elbow angle. We also know that shoulder flexion and extension is going to vary through
190The natural position of this joint would be in the jointsanddrivers.any file, because that is where we put the elements that connect the body to t
191It is advisable when modifying models to make changes in small steps and verify that the model is working for each step. That way you can avoid ag
192 AnyKinMeasureOrg &ref1 =...HumanModel.Interface.Right.GlenohumeralAbduction; // AnyKinMeasureOrg &ref2 =...HumanModel.Interface.Rig
193 Ouch! How did that happen? Well, from a mechanical point-of-view, this solution is fully as good as the more anatomically compatible solution wit
194is set up to impose the same angles on the right and left hand sides. You can now run the KinematicAnalysis operation and see the model turning th
195 AnyVar GlenohumeralFlexion = 0; AnyVar GlenohumeralAbduction =.Right.GlenohumeralAbduction ; AnyVar GlenohumeralExternalRotation =.Right.Gl
196huge advantage when creating models like this one. In the real world, the muscles would be pulling on the bones, which causes the arms to exert fo
197This driver we replace by another driver that controls the two horizontal positions of the thorax with respect to the wheel hub. As you can see, t
198 AnyVar ElbowPronation = 50.0; Finally, to not have too large time steps, let us define a slightly higher resolution in the AnyBodyStudy in the m
1Tutorials The AnyBody tutorials are step by step introductions to the use of the AnyBody system and in particular to construction of models in AnySc
19 The new windows is basically a text editor. This main pane of the Editor window will contain the actual AnyScript text. The system has already cre
199 Modifications like these from an existing application to a new one probably accounts for 90% of the model development of AnyBody users. However,
200 The model is primarily divided into three folders (a folder is a container of different objects much like a directory can contain files) as sho
201 The model can be compiled, but it does not do much, and in any case we shall restructure it right away. As indicated above, we wish to separate t
202 AnyFixedRefFrame GlobalRef = { }; // Global reference frame AnySeg Pedal = { Mass = 2; Jii = {0.05, 0.001, 0.05}; AnyRefNode Hin
203A much simpler solution is to use a set of popular, pre-defined assemblies of body parts that come with the necessary interfaces to hook them up t
204 Each of these body models comes in three different forms: 1. BodyModel.any is the basic version including simple muscle models, i.e. muscles tha
205they were originally defined, i.e. roughly like a 50th percentile European male: AnyFolder HumanModel={ #include "../../../BRep/Aalborg/B
206 AnyFolder Muscle ={ AnyVec3 RGB = .Colors.AnyBodyRed; AnyVar DrawOnOff = 1.0; AnyVar Bulging = 1.0; AnyVar ColorScale =1.0;
207 AnyVar ScaleFactor=0.001; AnyVec3 RGB = {1,0,0}; AnyVar Thickness = 0.01; AnyVar HeadThickness = 2*Thickness; Any
208 The pedal seems to be located in the middle of the pelvis, which is really a symptom of the warning that the model contains too few kinematic con
20in the Main Frame toolbar and the key F7 is a convennient shortcut for this function. The script to model operation also saves your model files. T
2092. The foot will be connected to the pedal by a spherical joint having 3 constraints. This leaves us with 4 more constraints to specify. 3. The
210 AnyRefNode &Seat = Main.MyPedal.EnvironmentModel.GlobalRef.Hpoint; AnySeg &Pelvis = Main.MyPedal.HumanModel.Trunk.SegmentsLumbar.P
211When you load the model you will get an error in the InitialPositions.any file: ERROR(SCR.PRS9) : Repository.6.3/ARep/Aalborg/BBTutorial/Initial
212 We can now forget about the InitialPositions.any file. All positioning from now on takes place in the Mannquin.any file. Open it up and make the
213position AnyVar GlenohumeralFlexion =-0; AnyVar GlenohumeralAbduction = 10; AnyVar GlenohumeralExternalRotation = 0; AnyVar ElbowFlexion
214 Notice that the leg has moved slightly to honor the constraint that the foot must be on the pedal. 3. Setting the ankle angle The ankle in this
215two degrees of freedom is which. Fortunately, the model is already loaded, and we can get the current values for the ankle angles from the object
216The AnyKinLinear is really a vector between the two points it refers to, i.e. in this case the position of the knee in the global reference frame.
217 With the model kinematically determinate we can proceed and run the KinematicAnalysis operation. Doing so will show you the movement of the ent
218 The analysis runs in time from zero to one second, and the pedal angle develops in this time from 100 degrees (1.74 rad) to 145 degrees (2.53 rad
21may know it from C++ or the Java language. Notice also that lines are terminated by semicolon ';'. Even the lines with closing braces mus
219turned off inside the driver: AnyFolder Drivers = { AnyKinEqSimpleDriver AnkleDriver = { AnyUniversalJoint &Ankle = Main.MyPedal.HumanM
220 Notice that the muscle forces are illustrated by the bulging of the muscles. In the ChartFx view near the top of the tree you can find the MaxMus
221F = -10*.HingeJoint.Pos; This produces the activity curve: Obviously the level is much lower now starting at just 12%, so the spring really se
222This appears to be equally good in terms of activity level and has the added quality of increasing muscle activity or effort for increasing angle.
223 The idea behind this system is to make the human model and the environment model as independent of each other as possible. Some models also have
224Model data uncertainties In general, the models in the AnyScript Model Repository are based on data reported in the literature. They often come f
225very quick and the system predicts very rapid changes of muscle activation, then the result may not be realistic. Another possible source of error
226 To find velocities, the system automatically differentiates positional data with respect to time and we get the following: It still looks reason
227m/s^2 or 30 g. Notice that this is for the thorax and not a distal segment like a hand or a foot. It is not realistic, and it is in fact an artifa
228disadvantage is that the number of computations grows exponentially with the number of parameters. A two-parameter problem with five values of eac
22 We now assume that you have removed eventual errors and have loaded the model successfully. If you are up to it, let's continue onward to Le
229 As you can see the model is very simple. It has two legs and a pelvis that is rigidly fixed to the seat. The feet are attached to the crank mecha
230fact an AnyScript operation (AnyOperation), called Analysis, which is a member of all design studies. To state an optimization or a parameter stud
231 { //AnyOperation &<Insert name0> = <Insert object reference (or full object definition)>; };*/ nStep = ; AnyDesVar &&l
232The next specification deals with the parameters to vary: nStep = ; AnyDesVar SaddleHeight = { Val = Main.BikeParameters.SaddleHeight; Min =
233 AnyOutputFun MaxAct = { Val = .MaxMuscleActivity; }; }; This allows us to refer to Study.Output.MaxMuscleActivity before it actually get
234It is finally time try it out. If you have typed everything correctly, then you should be able to load the model and expand the Operations Tree in
235The toolbar of this window indicates a kinship with the Model View window. Indeed, if you select the rotation button in the toolbar and drag the m
236combinations you may notice muscles beginning to bulge more and momentarily attain the color of magenta. This is the system's way of demonstr
237 What this study reveals is that in terms of muscle activity to drive the bicycle a high seat is advantageous, but there seems to be a very shar
238 // Useful variables for the optimization AnyFolder &r = Main.Bike2D.Model.Leg2D.Right.Mus; AnyFolder &l = Main.Bike2D.Model.Leg2D.
23 // Todo: Add points for grounding // of the model here }; // Global reference frame // Segments AnyFolder Segs = { }; // Segs folde
239AnyFolder &l = Main.Bike2D.Model.Leg2D.Left.Mus; AnyVar Pmet = r.Ham.Pmet+r.BiFemSh.Pmet+r.GlutMax.Pmet+r.RectFem.Pmet+ r.Vasti.Pmet+r.Gas.Pme
240 We shall return to the capabilities of the AnyChart in more detail in the next lesson, which deals with the definition of optimization studies. O
241Minimize g0(x1..xn) Subject to gi(x1..xn) <= 0 Lj <= xj <= Uj where g0 is called the objective function, xj, j=1..n are the design vari
2421. Decide on a search direction. 2. Perform a linear search to find the minimum along the chosen direction. This means that it is only necessary
243 AnyOperation &Operation = ..Study.InverseDynamicAnalysis; }; AnyDesVar SaddleHeight = { Val = Main.BikeParameters.SaddleHeight;
244If the model loads you should get a screen picture similar to the one above this text. Expand the OptStudy branch in the operations tree, click Op
245 The graph confirms that the vast majority of the improvement is obtained in a couple of iterations and the final iteration contributes only by a
246select "New": This will give you a blank "Series 1". When you highlight it by clicking with the mouse you will see the li
247 Finally, in the Value field select OptStudy.Metab.Val and look carefully at the plot. You will see that an additional polyline has been added. It
248 This plot illustrates the convergence history in the "landscape" of the objective function. Here we can see the reasons for the conve
24 //rDot0 = {0, 0, 0}; //Axes0 = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; //omega0 = {0, 0, 0}; Mass = 0; Jii = {0, 0, 0}; //Jij =
249 This reveals a somewhat jacket surface and a distinct (local) valley of the objective function. Minor changes of the input to the optimization
250 Notice how the final objective function value is slightly higher than the previous optimization result. Notice also how only the first iteration
251segment velocities, and any other model property that the system can compute. Enough talk; let's try the optimization with the constraint add
252as in the unconstrained case. The path of the design values bounces off the constraint and finally it gets stuck on the constraint even though the
253This completes the introduction to optimization studies. Trouble shooting AnyScript models If you think mechanics is simple, it's probably ju
254always that nice. First of all, the error messages are not always very descriptive. This is a problem the AnyBody Modeling System shares with any
255you will get the error message: Folder assignment expected for this object. What the message means is that this type of assignment is not allowed.
25Reload the model, and then choose the menus Window -> Model View (new). This opens a graphics window and displays what looks like a long yellow
26 Try loading the model again and have a look at the graphical representation. If you zoom out enough, you should see your points floating around th
27will determine where everything is at every point in time. But we need to go through several steps of definitions and subsequently the system must
28corresponding to a given axis and rotation angle. Therefore, we can specify: AnySeg UpperArm = { r0 = {0, 0.3, 0}; Axes0 =RotMat(-90*pi/180, z
2 Getting Started...4 Lesson 1: Using
29 sRel = {0.05,0,0}; }; AnyRefNode DeltodeusB = { sRel = {-0.05,0,0}; }; AnyRefNode BicepsLong = { sRel = {0.1,0,0}; }; AnyRe
30The joint connects several segments, and it needs to know which point on each segment to attach to. For this purpose, we have lines like AnyRefNod
31 When you right-click the ElbowNode you can select "Insert object name" from the context menu. This writes the full path of the node into
32Lesson 4: Definition of movement Here's an AnyScript file to start on if you have not completed the previous lesson: demo.lesson4.any. If yo
33AnyRevoluteJoint &Jnt = ..Jnts.Shoulder; and AnyRevoluteJoint &Jnt = ..Jnts.Elbow; are the ones that affiliate the two drivers with the sh
34Try expanding the ArmStudy root. You will get a list of the study types that the system can perform. "Study" is a common name for operati
35shown in the figure to the right. Directly under the ArmModelStudy branch you find the Output branch where all computed results are stored. Notice
36Here's an AnyScript file to start on if you have not completed the previous lesson: demo.lesson5.any. We have seen that models in AnyBody can
37that it goes from its origin to insertion via a number of predefined points. The via-points are the AnyRefNodes defined in the second and third pro
38}; //--------------------------------- AnyViaPointMuscle TricepsShort = { AnyMuscleModel &MusMdl = ..Muscles.MusMdl; AnyRefNode &Org =
3Trouble shooting AnyScript models... 253
39 We now have enough muscles in the model to start computing the muscle forces that can drive the motion. But there is one more detail to take care
40InverseDynamicAnalysis in the study tree at the bottom left of the screen and then the Run button, and watch the model move. It should look exactly
41 This muscle grows in force during the movement. That is because it is influenced by the movement of two joints, namely the shoulder and the elbo
42That's all there is to it. Now you can analyze how the model will react to a downward force of 100 N (approximately 10 kg dumbbell weight). If
43very physiological. You may be wondering how you can add cool bones and other geometries that will impress your colleagues and look good in your pr
44 ScaleXYZ = {0.001, 0.001, 0.001}; }; When you reload the model, the picture you get should be similar to what you see below. The dumbbell is visi
45 We want to rotate the dumbbell 90 degrees about the y axis. We could do that by going back to the CAD system and modifying the dumbbell STL file,
46 This completes the Getting Started with AnyScript tutorial. The final result of the efforts is in demo.arm2d.any. Interface features This tutorial
47• Lesson 5: The Command Line Application Let us quickly proceed to the first lesson: Windows and workspaces. Lesson 1: Windows and workspaces When
48 This indicates that you are now working in the first of the three user-defined layouts. Each layout can contain a different user-defined window se
4 Getting Started This tutorial is the starting point for new users. Its purpose is to allow users to get the first model up and running fairly qui
49 It says "New Workspace" because you did not load a workspace when you started, and you have not yet saved the one you have created. Cli
50 This brings up a new editor window with an empty file, and we can go ahead typing anything we want. The first thing you have probably noticed abou
51You are not forced to accept this. You can easily backspace to the beginning of the line and start your typing there, if you like that better. You
52 What you see here is the Model Tree, which it the main tree view of AnyBody showing all objects in the loaded model in the structure they are crea
53The Model Tree offers you several options to go from the tree to associated places the AnyScript code. There are, however, also options to go the o
54The third tab in the tree view is named Classes. It gives you access to a tree of the predefined classes in the system. From this tree you can inse
55If the model is not too big and the computer is not too slow, the computation runs fast enough to create a dynamic animation in real time or close
56 This resolves the kinematical constraints and puts the model into the position defined by its drivers at time step 0. It produces the picture show
57 Notice that we are looking at the model directly from the side. The default viewing direction is the xy plane. This coincides well with the Inte
58 • On/Off: This button switches automatic update of the window on and off. When switched off, the window does not update when the model is movin
5easy to create a model of a gymnastic exercise on the floor this way. • Constructing a model from single predefined body parts in the repository.
59Recording video You may want to save a video file of you simulation for a presentation or simply to be able to show a large model running in real
60purpose. We at AnyBody Technology use a very good and inexpensive tool called VideoMach available from http://www.gromada.com/. Size matters Rega
61 Notice that the window like all other windows in the AnyBody Modeling System is divided into a tree pane on the left and the actual data area to t
62Try clicking Ekin, Epot, and Emech in turn. You will notice that Epot and Emech are very similar. This is because the movement in this model is rel
63 Having an item graphed you may want to investigate the results a little closer, and the toolbar above the graph gives you different options for do
64In some cases you can have curves with complicated shapes that you may want to investigate in details. The zoom tool is handy for that. When you pr
65 We have eight muscles in this model, so why do you only see two curves? The explanation is that all the muscles in this model have the same streng
66 User-defined abscissa The default abscissa in the chart view is time. However, you can in principle plot data against any scalar property the sys
67 The three graphs (of which one is constant zero) is because the hand node position is a vector with three coordinates. We want to extract the heig
68 As you can see, the tree has been extended with the new variable we have defined. The next step is to use this variable as the abscissa. Notice
6 When you open AnyBody for the first time, the Demo tab does not contain any models, but only a short guide on how to extract the demo models. Aft
69the .CHT file. .CHT files are a convenient way of storing analysis data because they can subsequently be reformatted and displayed in other ways t
70Lesson 5: The Command Line Application The AnyBody Modeling System comes with a command line version included. It is named AnyBodyCon.exe ("Co
71understands eight different commands. You also always get help by using the 'help' command or by calling AnyBodyCon with /? argument. The
72nearly as interesting as running the Windows version of the AnyBody Modeling System. So why bother? Well, the command line version of the AnyBody
73As you can see, the command line version can produce output data that can be formatted according to your desire and processed further by other type
74 where the classes with blue icons are the ones you can actually define. In this tutorial we shall focus on AnyBodyStudy and AnyBodyCalibrationStud
75tEnd Ah, you guessed it already. This is the time at which the study ends. Contrary to tStart, this often has to be set by the user. The standard v
76calculation of any sort of forces. This means that you can run KinematicAnalysis as soon as you have the movement defined uniquely. You don't
77In the following lessons we shall look in more detail at the different operations in an AnyBodyStudy and finally also at the AnyBodyCalibrationStud
78 When you press the run button you will see a whole lot of text scrolling over the message pane below the study tree. You can scroll up and down us
7 //This model is only for kinematic analysis and should be used when playing //around with the kinematics of the model since leaving the
790: Main.ArmModel.Drivers.ShoulderMotion (1constr.) 1: Main.ArmModel.Drivers.ElbowMotion (1constr.) Other: - none! Total number of constraints: Jo
80A few special cases are: 1. The number of reaction and driver forces is less than the number of rigid body degrees of freedom in the model as it i
81Drivers: 0: Main.ArmModel.Drivers.ElbowMotion (1constr.) Other: - none! Total number of constraints: Joints: 10 Drivers: 1 Other: 0 Total: 1
82And running the ModelInformation operation will give the following feedback: ------------------------------------------------------------- 3) List
83not do it automatically when you load the model. Running the SetInitialConditions operation produces a correctly assembled arm: The arm correct
84 Picking the step button. The first step re-establishes the load-time conditions. This means that it positions the modes as it was when you loaded
85An AnyBody model is really a collection of rigid segments. You can think of them as a bunch of potatoes floating around in space. Technically, each
86Running kinematic analysis Now that you know the basics of kinematic analysis, let us look at how it is performed. We need an example to work on,
87 Why would anything in a smoothly running model behave like this? The answer lies in the ordinate axis. You will notice that it has no values on it
88Lesson 4: Inverse Dynamic Analysis Inverse dynamic analysis is at the heart of what the AnyBody Modeling System does. An InverseDynamicAnalysis ope
8balance the extrnal forces. Please notice that it is possible to apply an external force large enough to require tension between the feet and the fl
89For use in this tutorial, a slightly modified version of the model is provided here: demo.diffmusarm2D.any. Please download it, save it, and load i
90Subject to • Equilibrium equations fulfilled • Muscles are not allowed to push In the standard setup of InverseDynamicAnalysis operations in the
91 So the very systematic activation pattern becomes much more complex when viewed as muscle forces. Let us for a moment return to the activities aga
92 This result is much different from the one we had before. The value of 1.0e+3 completely dominates the criterion, so here we are actually minimizi
93e2 in the criterion. This has two potentials: 1. Small values of e2 may regularize complex problems numerically much like e1 can do. 2. Large va
94 As you can see, the tendencies are much the same as before, but the muscular synergy is less outspoken in the quadratic case, and the maximum musc
95lengths in AnyBody is the assumption that each muscle-tendon unit has its optimal length at some particular position of the joints it spans. We sim
96What we have done here is to give BicepsLong a new and more advanced muscle model. Let's have a look at the consequences. Press the M<-S bu
97 The parallel-elastic force sets in when the muscle is stretched beyond its optimal fiber length. In the movement of this example, the elbow star
98Calibrating the muscle in a particular position requires a calibration study. It's basic definition is very simple: // ======================
Commentaires sur ces manuels