Box weight included in GaitFullBody 1.5

Hi

In my experiments the subject is placing a box onto a shelf, and as they do this they take a few steps. The hands hold the box by squeezing it with the palms, left hand on left side of box, and right hand on right side of box. As the box is being held during the lift the percentage of weight between left and right hand varies, as well as the moments for each hand. Also, the hands do not always grasp the box at the center, i.e., the hands are sometimes more forward or backward. This can affect the moment of the box. For the study I am measuring comparing the L5/S1 for spine forces and moments.

The model being used to collect the L5/S1 data is basically the GaitFullModel, and the input to this model is from motion capture markers and also the ground forces from the feet are derived by using 3 force plates. In another forum string it was recommended to try adding the box weight to the GaitFullModel 5.1 by using AnyForce3D.

During the motion capture of the trails, there were markers on the box, so I was wondering could the marker definition of the box be used to help AnyForce3D to better model this set up?, Or is there a better approach than AnyForce 3D, which can make use of the marker definition of the box.

Sincerely thanks
Damon

Hi Damon,

  1. As you can guess, the easiest way is to model an AnyForce3D object in each hand of the model. In this case you don’t need to create the box in your model. Two AnyForce3D object will replicate the weight of the box. But the problem is that in this case the direction of force which is acting on the hand will be constant.

  2. The other way is to create a box in your model. And you can drive the box using the marker information. Then you can define ‘AnyReacForce’ (3 forces, 3 moments) between both hands and the box. Then this AnyReacForce will replicate the forces and moments between the hand and the box.

If possible, I would try both case 1 and 2 and would compare the results.

Best regards,
Moonki

Hi Moonki

It sounds like creating a box in the model is more realistic. I really don’t know where to start; can you help me with this please?

Sincerely thanks
Damon

Hi Damon,

  1. In the ‘\AMMR\Body\AAUHuman\ToolBox\SolidModeling’ folder, there is a class template which can be used for solid modeling. In the folder there is a main file for its example. You can use this class template to create your box.

  2. If you have enough marker information(at least 3 markers) for the box, you can drive the box by those markers. You can use the AnyKinDriverMarker class.

  3. Finally, you should define the AnyReacForce object between your box and the hand segments.

Best regards,
Moonki

Hi Moonki

  • So I would update the SolidModelingTestDemo so it has the correct specs for my box. Then I think I would add code into the GaitFullBody.main file, that points to SolidModelingTestDemo? If so what Kind of code do I put in GaitFullBody.main file to point to SolidModelingTestDem? And where in the GaitFullBody.main file should I add this code?

-Then in the GaitFullBody.main file I add in code for AnyKinDriverMarker class, and update this with the marker specs. Again where should this code go in GaitFullBody.main file?

-Then I define AnyReaction in GaitFullBody.main file? Again where should this code go in GaitFullBody.main file?

Sincerely thanks
Damon

Hi Damon,

There is no limitation about where you should define your own code. It’s your decision.

  1. For modelling your box object, I would recommend you to use ‘EnvironmentModel’ folder.

  2. For defining AnyKinDriverMarker and AnyReacForce class objects, I would recommend you to use ‘ModelEnvironmentConnection’ folder. In that folder you can define your own code.

Best regards,
Moonki

Hi Moonki

I was thinking about the torso and how the two arms are attached to it. Would you recommend to replicate the code of the torso to create a new segment for the box?

For example
-I copy the torso code and modify it to be box, call it t-box.
-Then in this t-box segment, I attach the hands to the t-box, by modifying the code that was for the upper arms that were attached to the torso, so now each hand is attached to the t-box.
-The other code in the t-box, that was for the torso to neck and pelvis I remove.

What do you think?

Sincerely
Damon

Hi Damon,

Before creating a box into your GaitFullBody model,
I would recommend you to practice several things in advance using a single AnyScript test file.

  1. Create a box using the Solid Modeling class template.
  2. Importing the C3D file using AnyInputC3D class object.
  3. Then, driving the box using the markers in the C3D file by AnyKinDriverMarker class object.

After testing all above things then you can put your own code into your existing GaitFullBody model.

I would recommend you to review the ‘Making things move’ chapter in the tutorial.

Best regards,
Moonki

Hi Moonki

Hope all is going well with you.

I’m able to get back to adding the box to the model now. The lessons are working out great, but in lesson 4, about 1/3 of the page completed with the code, I’m getting this error.

‘R1’ : Unresolved object

This is happening at this paragraph section, "[SIZE=1]"It is now possible to run the Kinematics operation and see the leg segment move with the markers. The actual markers are not visible because they disappear inside the segment, but if we make the segment semi-transparent, they become visible: “” within this page found by this link, http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/Making_things_move/lesson4.html [/SIZE]

[SIZE=3]Its probably something simple, but I’m not getting it, so would you have a suggestion why this is happening. I’ve tried recreating the code a few times from the start but it still is happening.[/SIZE]
Sincerely
Damon

Hi Damon,

I think you just made some mistakes while following the tutorial.

As I tested the tutorial just before, there is no problem.

You can just try the attached files and I hope that you can find which mistakes you had made…

Best regards,
Moonki

Hi Moonki
Thanks for help. I discovered what happened, explained below. btw, is there a way to look at the finished code for each lesson? That way I won’t need to ask you for help as much.

For the below section in the instructions, It appear the new code would go directly after “AnyInputC3D C3D = {” And the instructions were not clear where to insert it. So maybe adding a note explaining were to insert, would improve the instruction here.

///////////////////////////////////////////////////////

[COLOR=blue]AnyInputC3D C3D = {

Now we just need to use AnyKinDriverMarker objects to tie the marker trajectories to the three points we have defined on the segment and select the solvers for over-determinate problems exactly as we did in the previous lesson (dont forget to also select the over-determinate kinematics solver in the study section):
AnyKinDriverMarker C3Dmotion1 = { AnyRefFrame &Marker = .Leg.R1; AnyParamFun &Trajectory= Main.MyModel.C3D.Points.Markers.L000.PosInterpol; AnyDrawKinMeasure drw = { Label = Off;Size = 0.03;Line = Off; }; }; AnyKinDriverMarker C3Dmotion2 = { AnyRefFrame &Marker = .Leg.R2; AnyParamFun &Trajectory = Main.MyModel.C3D.Points.Markers.L001.PosInterpol; AnyDrawKinMeasure drw = { Label = Off;Size = 0.03;Line = Off; }; }; AnyKinDriverMarker C3Dmotion3 = { AnyRefFrame &Marker = .Leg.R3; AnyParamFun &Trajectory = Main.MyModel.C3D.Points.Markers.L002.PosInterpol; AnyDrawKinMeasure drw = { Label = Off;Size = 0.03;Line = Off; }; };[/COLOR]
Hope this helps
Sincerely
Damon

Hi Damon,

I’m sorry but I’m not sure what your problem is at the moment.
Couldn’t you finish the example even though I gave you my code?

Or, are you testing a piece of new code ?

If you have any problem in your model, then try to upload it in the debug section.
http://forum.anyscript.org/forumdisplay.php?f=21

If not then we can’t figure out what the problem is.

Best regards,
Moonki

Hi Moonki

Sorry if I wasn’t that clear with the last note, and thanks for the previous help to get me on track. Everything went well in lesson 4, and I’m starting lesson 5 now.

My last note was to try to help AB with feedback to improve the lesson 4. Which is (in that one spot of lesson 4 it was not very clear where to insert the new code). So for the next revision AB may want to look at that section for improvement.

Sincerely
Damon

Hi Moonki

i’ll start from the end of the string with a reply instead of a quote

Sincerely
Damon

Hi Moonki

Should I use the AnySeg class template, or is there a better class template to use for a box?

Sincerely
Damon

Hi Damon,

Of course you can create your own AnySeg object with a proper STL file which may represent a box geometry.

Also you can user our Solid Modeling class template which is prepared in the toolbox folder in the AMMR repository:
“\AMMR\Body\AAUHuman\ToolBox\SolidModeling”

By using the SolidModelingTestDemo.Main.any file in that folder, you can learn how to use the solid modeling class templates.

Best regards,
Moonki

Hi Moonki

Thanks, this SolidModeling is really cool. I’ll start trying to make it work with the C3D example now.

Sincerely
Damon

Hi Moonki

Hope all is going well with you,

Getting close to getting the box to move,

The class_template is holding me up. In the pendulum example the AnySeg was within the Main code, but with the Box code there is a class_template that has the AnySeg for box, this code is before the main code. So Im not sure how to adapt the pendulum instructions to the box. Any suggestions how to do this?

So since were getting close to the holidays, I wanted to ask you for some help now, with the next steps of advice on how to include the box code into the full model? This is as we discussed previously, including the box so the mass transfers through each hand.

Sincerely
Damon

Hi Damon,

Definition of a class template should be located before the start of the Main folder.

As I told already, ‘SolidModelingTestDemo.Main.any’ file shows exactly how to use the class template to create your model.

In that file, you should see the ‘SolidModelingOperations’ folder.

Best regards,
Moonki

Hi Moonki

Yes I have it set up this way, I removed the cylinder, and its just the box. I wasn’t able to get the box to move, so I’m going through more lessons. After this I’ll give it another try with your instructions for ‘SolidModelingTestDemo.Main.any’ file

Sincerely
Damon