Draw COM in fullbodymain

Hello
can i visualize COM (center of mass) during analysis in fullbody main, I am not sure where to add the draw line in the code in full body main under mocap examples, could someone guide me through this.

Hi Bharathhs,

I think the code below would do the trick
you can add it in eg. Labspecific.any file

AnyFolder ShowCoM ={
 AnyKinCoM CoMMeasure =  {
          AnyFolder& ref = Main.HumanModel.BodyModel;
 };

AnyDrawSphere Sphere ={
RGB={0,0,1};
Position = .CoMMeasure.Pos;
ScaleXYZ={1,1,1}*0.2;
};
};

Best regards
Søren

2 Likes

Hello
the above code of yours works perfectly fine. and it is possible to visualize the COM sphere in the boy model. I want to also know how to get a line through the center of mass. I tried to draw a reference frame from the center of mass sphere but it doesnt move with the position of the sphere. is there a way to have a line from the COM sphere to the ground. So visually i could check the COM and COP lines overlap for a ballet dancers during turn movements.

AnyFolder Interface = {
AnyKinCoM CenterOfMass = {

  AnyFixedRefFrame GlobalRef ={
            Origin={0,0,0};
            AnyDrawRefFrame drw={
                ScaleXYZ=0.6*{0,0,-1};
             };
    
    AnyDrawSphere COM_ball ={
      RGB={1,0,0};
      Position = Main.HumanModel.BodyModel.Interface.CenterOfMass.Pos;
      ScaleXYZ={1,1,1}*0.1;
    };

};

};

If you have any solution for this. It would be a great help.
thank you

Hi Bharathhs,

Sorry for the slow answer, please see the object AnyDrawLine it can draw a line between two points "p0" and "p1" i think this will be the easiest way to do this.

Best regards
Søren

thank you so much
yes it works.

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.