Multiple Axis Accelerations

Hello AnyBody Technology forum,

I am attempting to mimic like a theme park ride by applying an acceleration vector to the SeatedHumanFullwithNeck. The past questions and answers on the forum on this topic have been super helpful. I have applied a moving reference frame and successfully tested it by making gravity = 0.

However, I want to ultimately create accelerations in all axis x, y, z simultaneously. Not just one which I have successfully been able to do. When I copy and recreate the code for the y axis for the x or z axis I run into trouble because there is only one reference frame to refer to. Is there a work around for this?

When simulating just one axis I have used a prismatic joint for the moving frame. Would it be possible to use a different joint/constraint which allows coding for translations in 3 axis?

Rotations arent relevant to my work, so I wonder if constraining these would mean the 3 translations could be used?

Thank you for any help,
Tim

Hi Tim,

It's great that you have found the previous posts helpful!

I think the simplest way for you to specify this motion will be to use AnyKinMeasureOrg:

AnyKinEqSimpleDriver Drv = {
  AnyKinMeasureOrg MeasOrg = {
    AnyKinLinear Lin = {
       ...
    };
    AnyKinRotational Rot = {
    ...
    };
  };
  DriverPos = {...}; // lin_x, lin_y, lin_z, rot_z, rot_y, rot_x
  DriverVel = {...}; // lin_x, lin_y, lin_z, rot_z, rot_y, rot_x
  DriverAcc = {...}; // lin_x, lin_y, lin_z, rot_z, rot_y, rot_x
};

You should remove the prismatic joint, and start with this. Here you can set your rotational values to 0 and linear values to whatever you want. This will add all the drivers in the 6 degrees of freedom. But you can always use MeasureOrganizer in AnyKinMeasureOrg to select the dof's of your interest.

Then, depending on the complexity of the motion, you may need to think about using another type of driver. For example, you can consider keeping only the rotational drivers as 0 in the code above and for the linear drivers, you can have another driver that uses a marker in space prescribing the translations in the 3 axes.

I hope this helps.

Best regards,
Dave

Hi Dave,

Thank you for this helpful response.

I would like to prescribe linear accelerations which vary with time for each of the 3 axes. I will have equations for these accelerations. If I keep this code for the rotations, what sort of driver and how could I apply these equations to prescribe varied linear motion?

Kind regards,
Tim

Hi Tim,

Maybe the AnyKinMotion can help you out. Please see this tutorial and the reference manual.

I hope this helps.

Best regards,
Dave