HandCycling model

Hi, AnyBody support

I’m making a HandCycling model.
The motion moves like the youtube
https://www.youtube.com/watch?v=dLvfYnKyAgY (it’s a safe link)

The machine is always used by the disabled human.
And I use the model “FreePosture” in the repository to modify.
The model at the “Attached Files” moves succesfully now,
but the real machine’s saddle position is 0.1 meter behind the position we make now.
It’s in the “Main.Model.EnvironmentModel.GlobalRef.SaddlePos.s Rel”
The correct information should be :
sRel = {-0.1, Main.Model.EnvironmentModel.GlobalRef.SaddlePos.Sa ddlePos_Y, 0};

After modifying to the right value, when the wheel drive the handle to the front side, there will have an ERROR.
I think it’s because the hand is too short to connect the handle that far.
Actually in the real situation, people will rotate their pelvis or thorax to make their hand connect with the handle if their hand is too short.

Is that possible to make the model’s pelvis extension when the handle is at the front side, and turns back when the handle is at the nearer side?
I had try “StandingModel” to drive it, but I can not balance the freedom and the constraints, I don’t know if it is better to use than “FreePosture”.

Thanks for reading my question.
Best regards,
Yeh

Hi,

First, as I suggest, would you please update your personal information?
Attached snapshot may be helpful for you to understand…

Best regards,
Moonki

I’m very sorry misunderstanding what you mean.
But finally I just update my personal information already.
Thank you very much :slight_smile:

Should I need to post a new thread, or you will be able to help me when you have time :slight_smile:
If I need to do anything, please tell me, thank you :slight_smile:

Hi,

I tried to load your model.
But you should write here which version of AMS and AMMR you are using right now.

And it seems that you used a file which is not included in the zip file:

     #include "..\..\..\Body\AAUHuman\Scaling\ScalingLengthMassFat.any" 
     Scaling = {
       #include "..\..\..\Body\AAUHuman\Scaling\AnyFamily\[b]HandCycling.any[/b]"
     };

In this case, we can’t help you. Please include all the files that you used when you attach a file!

Best regards,
Moonki

Sorry, I’m so forgetful.
I use AMS for 5.0, and repository for AMMRV1.3 just like the Attach File.
And I make a new scaling of body length for this model
called “HandCycling” in “AAUHuman/Scaling/AnyFamily”

Sorry forgot to attach so many files, and thanks for helping.:slight_smile:

Hi,

Attached please find the modified version of your model.

  1. Now I included your new scaling file into the model folder.

  2. And I modified ‘TrunkDrivers.any’ file to control pelvis-thorax extension.

I hope this may help you.

Best regards,
Moonki

Hi,

Thank you, it helps me a lot:)
And I had read the AnyScript Refence Manual to see what the code
write for in the ‘TrunkDrivers.any’ you gave me, but can not really understand what it mean.

  AnyKinLinear Pelvis_Handle_Distance = 
  {
    AnyRefFrame& base = Main.Model.EnvironmentModel.GlobalRef.SaddlePos;
    AnyRefFrame& target = Main.HumanModel.BodyModel.Left.ShoulderArm.Seg.Glove.lHandleNode;
    Ref = 0;
  };

  AnyKinMeasureOrg Pelvis_Handle_Distance_x = 
  {
    AnyKinLinear& lin = .Pelvis_Handle_Distance;
    MeasureOrganizer = {0};
  };
 
  AnyKinEq PelvisThoraxExtension_control = 
  {
    AnyKinMeasureLinComb lin_comb = 
    {
      AnyKinMeasure& Pelvis_Handle_Distance_x = ..Pelvis_Handle_Distance_x ;
      AnyKinMeasure& PelvisThoraxExtension = ...HumanModel.Interface.Trunk.PelvisThoraxExtension;
      AnyVar alpha = 50;
      AnyVar dis_offset= 0.45;
      Coef = {{alpha, 180/pi}};
      Const = {(-1)*alpha*dis_offset};
    };
  };

Can you just explain how this three codes control the pelvis-thorax extension.
Thanks for the help :slight_smile:

Hi,

First, when we look your original ‘TrunkDrivers.any’ file, then we can see the following code:

  //Thorax pelvis rotation driver
  AnyKinEqSimpleDriver PostureDriver ={
    AnyKinMeasureOrg &Ref2 = ..HumanModel.Interface.Trunk.PelvisThoraxLateralBending;        
    AnyKinMeasureOrg &Ref3 = ..HumanModel.Interface.Trunk.PelvisThoraxRotation;   
    AnyKinMeasureOrg &Ref1 = ..HumanModel.Interface.Trunk.PelvisThoraxExtension;
   
    DriverPos = pi/180*{
      .JntPos.PelvisThoraxLateralBending,
      .JntPos.PelvisThoraxRotation
      .JntPos.PelvisThoraxExtension
    };
    DriverVel = pi/180*{
      .JntVel.PelvisThoraxLateralBending,
      .JntVel.PelvisThoraxRotation
      .JntVel.PelvisThoraxExtension
    };
    Reaction.Type = {Off,Off,Off};  
  };

So three joint angles such as PelvisThoraxLateralBending, PelvisThoraxRotation and PelvisThoraxExtension are controlled by the values in the ‘Mannequin.any’ file.

But I tried to change PelvisThoraxExtension according to handle cycle motion.

Following codes define the linear distance between two nodes and I only needed the horizontal distance. That’s the reason why I used AnyKinMeasureOrg from AnyKinLinear.

  AnyKinLinear Pelvis_Handle_Distance = 
  {
    AnyRefFrame& base = Main.Model.EnvironmentModel.GlobalRef.SaddlePos;
    AnyRefFrame& target = Main.HumanModel.BodyModel.Left.ShoulderArm.Seg.Glove.lHandleNode;
    Ref = 0;
  };

  AnyKinMeasureOrg Pelvis_Handle_Distance_x = 
  {
    AnyKinLinear& lin = .Pelvis_Handle_Distance;
    MeasureOrganizer = {0};
  };

AnyKinMeasureLinComb makes a linear combination of several different kinematic measures.
What I assumed is that there may be a linear relationship between the horizontal distance(between saddle position node and the handle node) and the PelvisThoraxExtension angle. The equation is:

alpha*(Pelvis_Handle_Distance_x -initial_pelvis_handle_distance_x) = (-1)*PelvisThoraxExtension 

I could see that the initial pelvis_handle_distance_x value was about 0.45m.
You have to see how AnyKinMeasureLinComb can be used.

  AnyKinEq PelvisThoraxExtension_control = 
  {
    AnyKinMeasureLinComb lin_comb = 
    {
      AnyKinMeasure& Pelvis_Handle_Distance_x = ..Pelvis_Handle_Distance_x ;
      AnyKinMeasure& PelvisThoraxExtension = ...HumanModel.Interface.Trunk.PelvisThoraxExtension;
      AnyVar alpha = 50;
      AnyVar dis_offset= 0.45;
      Coef = {{alpha, 180/pi}};
      Const = {(-1)*alpha*dis_offset};
    };
    Reaction.Type = {Off};
  };

If you increase ‘alpha’ value, then you may be able to see some changes.
You should remember that ‘Reation.Type’ of this constraint should be ‘Off’.

I hope that this explanation may be helpful to you.

And I attached two pictures for your better understanding.

Best regards,
Moonki

Hi,
It really helps me a lot,
thank you very much.:slight_smile: