Issues in Coordinate Systems ( MOCAP and ANYBODY)

We have MOCAP data with a person in a recumbent position. The X-axis is chest to back and the Z- axis is butt to head. We need to change the ANYBODY model to reflect the same orientation. Then, we need to place the three markers on the acromion, lateral epicondyle and styloid process. As a result, the right arm of the ANYBODY model should follow the movement from the C3D file.

Please be of assistance.

Additionally, is there literature and/or videos that can help train a greenhorn to the ANYBODY application? The tutorials do not use the mannequin, so(hands in the air):confused:.

Thank you!

Hi Stephany,

I had a look at the model you uploaded, but unfortunately the file baseline.main.any is missing, so a bit difficult to say something. Could you upload that file?

Best regards

Hi Daniel,

Thanks for your reply. I apologize for not attaching the file in the first upload. I have uploaded it here.

Thank you for your help

Hi Daniel,

I have changed my approach to a modification of the example file MoCap FullBody. I have been able to have the model on his back in a relatively correct initial position. I am trying to essentially have only the right arm move based on input from the C3D mocap data. Everything else is static. I also do not have any force plates, so I just commented out that portion of the AnyBodyScript in the Environment.any file.

My issue lies in configuring the drivers. I seem to be missing 17 drivers, and I do not think I properly indicated that only the right arm is driven by the C3D data. There are other issues as well, such as the fact that the global coordinate system is not the same as the mocap data, and that certain body parts have not been grounded (such as the heels, buttocks and shoulder blades), but that wouldn’t necessarily contribute to my issue with the drivers, would it?

Thank you so much for your help. This is my first time using AnyBody. Even after completing all of the tutorials there are still basic concepts I am missing.

The file is attached. Thanks again

Hi Stephany,

I only had a quick look at your model, so I cannot give you a full solution to your problem.

There are several things you can do.
Since you are only driving the right arm, you could reduce your model to only having the trunk and the right arm and switch left arm and legs off using the BM statements.
Next, you removed all markers which include the drivers of the model. You have to replace these drivers by other drivers, which would be the pelvis, trunk, head and the rest of the arm if you can get rid of the other parts. I can probably modify drivers from the standing model and add them to your model.

As an example, you can also look at the model WheelChair Rancho from the repository. It is a model of a wheelchair driven by MoCap data. Maybe you could do similar things.

If you have the feeling that you have the feeling that you would like to know more about AMS, there is a PhD course at Aalborg University in spring. I think up to know there are still some vacant places left [FONT=Verdana](PhD course on AnyBody). It is a great course given a good insight of techniques using AMS with a lot of hints and tricks which are difficult to get from only reading the tutorials. But you shouldn’t wait too long, it has been booked up quite early the last years.

Best regards

Hi Daniel

Thanks for your help! I will definitely try to implement your suggestions and look into the course.
I noticed that the MoCap example does not have a JointsAndDrivers.any file, but instead has ExtraDrivers.any. Are all of the drivers the model uses here then? Thus the modifications would be here as well? Or should I create a JointsAndDrivers.any file.

Also, does the Markers.any file create the driver so that that particular joint is driven by the motion of the marker?

Hi Stephany,

the best way to figure out which drivers are there where they are located is to open the object description of the study (double-click the study in the model tree) which lists all DoF for the study and also the drivers. There you can have a look in the model which drivers are defined and using the links you can also figure out easily where to find them.

For the additional drivers, I would create a new file containing these, just to keep track of the changes you make.

Best regards

In the Studies section where they list the drivers, there appear to be two types.

  1. Main.Studies.HumanModel…
  2. Main.Studies.KinematicStudyForParameterIdentification…

Does this mean that the drivers categorized as group (2) are going to always be kinematically optimized every time I run the study? If this is the case, should everything that is not attached/driven by a marker be in group (1)?

I’ve attached an updated folder with my program if it helps.


Unfortunately I cannot open your attached file. It looks somehow corrupted. Could you try uploading it again?

Best regards,

I cannot see the model, so I am just guessing what is in your model. But I assume that you have not done too many changes to the MoCap model.

The folder you mentioned as 1) is a folder containing the body model, i.e. all definitions of segments, joints, drivers etc.
The folder 2) is an AnyBodyStudy, i.e. an object that has an operation to perform an analysis with a given setting. This study contains a reference to the body model (if you are not familiar with references e.g. from C++ programming, you can think of it as an object pointing to another object so that you can use it the same way as it would be the original one; the same as shortcuts to folders on the Windows desktop). The study is performing the analysis on all objects that are defined in the study or referenced in the study.

In the MoCap model, you also find two folders more: ParameterIdentification and MotionOptimization. The MotionOptimization is quite similar to the KinematicStudyForParameterIdentification, so it is also an AnyBodyStudy just with slightly modified settings.
The ParameterIdentification is an OptKinStudy referencing an operation of the KinematicStudyForParameterIdentification. This Study is using the mentioned study to perform the optimization.

I hope this helps you understanding the model a little bit better. For more advice it would be helpful to see your model.

Best regards,

Hello Daniel,

I have attached a new file.


Hi Stephany,

There have been some problem with the forum webpage which caused these problems downloading your model. These have been fixed now. Unfortunately the second file you uploaded was still incomplete due to this issue. Could you upload your model once more so that I can finally have a look at it?


Daniel, Thanks for your help.

As an AnyBodyScript formatting question.

The first line of the main file is #include “…/libdef.any” which eventually brings me to BodyModel.constants.any. In this file, it states #inndef BM_CONSTANTS_DECLARED and then several #define statements pertaining to the BM definition.

My question is, if I add in code in the main file for the BodyModel such as #define BM_Leg_Left… AFTER the #include libdef.any, does this mean my added statement with the constants I wish the bodymodel to have is not used, or will the settings be overwritten when the code reads my #define statements afterward?


Hello Stephany,

I had a look at your model and have some comments.

[li]You started your model from the MoCap model from repository 1.6. This model is not using the BM statements to configure the body model (this will be changed in the next versions). Therefore, if you want to switch off legs and the left arm, you have to modify the file BodyPartsSetup.any. If you switch off some of the body parts, you also don’t need to define drivers for them.[/li][li]Are you sure about the mapping of nodes to landmarks? I have the impression that you mixed them up since the shoulder marker moves quite a lot.[/li][li]You only have three markers which might be enough to describe the position of shoulder, elbow and wrist. But you have to drive the rotations of the separately since they are not determined in this case.[/li][/ul]
To your question: after the #include “…/libdef.any” is the right place to put the #define BM_* statements, but unfortunately, these are not used in this model as I said before.

Best regards,