-
Notifications
You must be signed in to change notification settings - Fork 10
/
migration.md
176 lines (109 loc) · 5.24 KB
/
migration.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Update models to AMMR 3
Models created in earlier versions of AnyBody may need to be updated to work with
AnyBody 8 and the new model repository (AMMR 3.0).
This document outlines important changes which may break
older models or change results.
:::{tip}
See the last part of this document for a list of concrete errors and deprecation
warnings and how to fix them.
:::
## Model changes
### Trunk and pelvis neutral posture
The trunk model in AMMR 3.0 changes which posture is considered
neutral. This was done in preparation for a new [detailed thoracic
model](#thoracic-model) which will be available in [AMMR 4.0](https://github.com/anybody/ammr). Pelvic tilt for the model has been updated as well as the the neutral orientation of the thoracic segment.
::: {warning}
These postural changes will affect older applications. Especially, in models
where trunk joint angles are driven directly and in models where a driver is applied directly on the pelvis segmental reference frame.
:::
### MoCap models
#### Pelvic markers
Changes to the pelvic tilt mean that pelvic markers located relative to the
pelvis anatomical frame will appear to have moved slightly. This is most
noticeable for markers on the posterior part of the pelvis, such as the PSIS
markers. The Y component of the marker position may need to be adjusted to
achieve the same marker position and joint angle output.
If markers are placed relative to bony landmarks (using the `PlaceMarkerAt=`
argument) this problem will often not occur.
#### Foot markers
Changes to the anatomical frame of the foot and talus segment may have resulted
in slight movement of markers. Adjust the Y component as necessary to maintain
the desired marker position and joint angle output.
## Load time errors
:::{dropdown} `Scale_Leg_Pelvis : Unresolved object`
```
ERROR(SCR.PRS9) : some-file.any(##) : 'Scale_Leg_Pelvis' : Unresolved object
```
The functions `Scale_Leg_Pelvis` and `Scale_Trunk_Pelvis` on the pelvis segment have been moved inside the `AnatomicalFrame` folder.
Update your code to `AnatomicalFrame.Scale_Leg_Pelvis`.
:::
:::{dropdown} `MusPar : Unresolved object`
```
ERROR(SCR.PRS9) : some-file.any(##) : 'MusPar' : Unresolved object
```
The `MusPar` folder have been renamed to `MuscleModels`.
:::
:::{dropdown} `PCSAfactor : Unresolved object`
```
ERROR(SCR.PRS9) : xxx.any(##) : 'PCSAfactor' : Unresolved object
```
This could be cause by the fact that the `MuscleParameters.Muscles.PCSAfactor` is now located at `MuscleModels.DefaultMusPar.PCSAfactor`
:::
:::{dropdown} `StringMesh : Error in expression`
```
ERROR(SCR.EXP0) : Ligaments.any(18) : Defined at : Class_CreateLigament.any(47) : StringMesh : Error in expression. Please refer to the following error messages for details ...
ERROR(SCR.EXP1) : Ligaments.any(18) : Defined at : Class_CreateLigament.any(47) : Operator '=' : Illegal operation for given argument types : 'AnyInt[Undefined]' '=' 'AnyFloatVar'
```
The `StringMesh` variable have changed type from `AnyVar` to `AnyInt`. So if `StringMesh` is assigned from an other variable, make sure that it has the type `AnyInt`.
:::
## Deprecation warnings
Below is a set of possible errors you may encounter if old models are used with AMMR 3.0.
:::{dropdown} `AnyViaPointMuscle : Deprecated class`
```
WARNING(SYS3) : ... : AnyViaPointMuscle : Deprecated class : Class 'AnyViaPointMuscle' was renamed to 'AnyMuscleViaPoint'
```
Some class names for `AnyMuscle` have been deprecated. Just rename them.
* `AnyViaPointMuscle` --> `AnyMuscleViaPoint`
* `AnyShortestPathMuscle` --> `AnyMuscleShortestPath`
:::
:::{dropdown} `AnyShortestPathMuscle : Deprecated class`
```
WARNING(SYS3) : ... : AnyShortestPathMuscle : Deprecated class : Class 'AnyShortestPathMuscle' was renamed to 'AnyMuscleShortestPath'
```
Some class names for `AnyMuscle` have been deprecated. Just rename them.
* `AnyViaPointMuscle` --> `AnyMuscleViaPoint`
* `AnyShortestPathMuscle` --> `AnyMuscleShortestPath`
:::
:::{dropdown} `Deprecated use of AnySurf*Fit classes`
```
ERROR(OBJ.MCH.SURF4) : Custom_Seg_Shank.any(114) : Surf : Deprecated use of AnySurf*Fit classes identified. Compatibility mode entered.
> 1) Use new concept by remove initializations of sRel and ARel (Recommended).
> 2) Read the long error description to see how to maintain backwards compatibility of your model.
```
The class `AnySurfCylinderFit` now inherits directly from `AnyRefNode` and creates a reference frame directly.
So they should no longer be nested inside existing reference frames to calculate the position and orientation.
Imagine the following code:
```AnyScriptDoc
AnyRefNode Outer =
{
sRel = SurfFit.sRel;
ARel = SurfFit.ARel;
AnySurfCylinderFit SurfFit =
{
Points = ...;
Length = ...;
};
};
```
The `Outer` class gets the position and orientation from the inner `AnySurfCylinderFit` class.
This should be changed to:
```AnyScriptDoc
AnySurfCylinderFit Outer =
{
Points = ...;
Length = ...;
};
```
In fact, the original would no longer give the correct result given the new properties of `AnySurfCylinderFit` as reference frame.
So AnyBody detects the old usage pattern and reverts to a 'Compatibility' mode.
:::