Question setting up Environment by Driving an AnyRefNode...

As I mentioned previously, I am new to using the c3d2any converter to
drive models directly with motion data - what I used to do was
process and physically manipulate data on my own and drive the models
that way. Obviously this new way of creating and running a model is
superior, but I am a little behind the learning curve and I apologize
for that.

What I am writing to ask is: I have a wheelchair in space, and I have
wheelchair hub marker data (in addition to other body marker data).
I am looking to use AnyFloat to essentially drive the hub markers in
the environment. Is there a better way to do this? i.e. should I
ground one wheel, and then drive the other’s movements relative to
the grounded wheel (I did something similar using my old technique)?
Below is an excerpt from my Environment file where I have defined the
wheels and the push rim, and upon loading the model, the wheels (and
push rims) are centered at the origin. At that point (further below),
I have posted an excerpt from my JointsAndDrivers file in which I try
to drive the hubs in space. Once I get them “grounded” (using
AnyFloat to drive the marker position), I will then proceed to put
the chair in place, and then the body adjust the body in space. Am I
going about this the right way? I’m uploading the file I have so far…
(Axle-Adjustment_Study_c3d2any_Trial_20).

Thanks in advance for your help,
Sarah

/* **********************************************************
This folder contains the definition of the Environment

  • GlobalRefFrame

********************************************************** */

AnyFixedRefFrame GlobalRef = {
Origin = {0, 0, 0};
AnyDrawRefFrame dw =
{
RGB = {1, 0, 0};
ScaleXYZ = .1*{1, 1, 1};
Transparency = 1;
};
};

AnyFolder Wheelchair = {
AnyFloat RHUB = Main.C3DFileData.Markers.AAAR_RHUB.Pos;
AnyFloat LHUB = Main.C3DFileData.Markers.AAAR_LHUB.Pos;

 AnySeg WheelRight =
 {
   Mass = 2.5;
   Jii = {1, 2, 1}*0.01;
   AnyDrawSurf Wheel = {
     RGB = {0.65, 0.65, 0.65};
     ScaleXYZ = {1,1,1}*Main.ChairParameters.WheelRad;
     Transparency = 1;
     FileName = "CAD/wheel";
     AnyFunTransform3DLin Wheel = {
       ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
       Offset = {0,0,0};
     };
   };
   AnyRefNode HubRight = {};
   AnyDrawSurf PushRimWheel = {
     RGB = {0, 0, 1};
     ScaleXYZ = {1,1,1}*Main.ChairParameters.PushRimRad;
     Transparency = 1;
     FileName = "CAD/wheel";
     AnyFunTransform3DLin Wheel = {
       ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
       Offset = {0,0,0};
     };
   };
 };
 AnySeg WheelLeft =
 {
   Mass = 2.5;
   Jii = {1, 2, 1}*0.01;
   AnyDrawSurf Wheel = {
     RGB = {0.65, 0.65, 0.65};
     ScaleXYZ = {1,1,1}*Main.ChairParameters.WheelRad;
     Transparency = 1;
     FileName = "CAD/wheel";
     AnyFunTransform3DLin Wheel = {
       ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
       Offset = {0,0,0};
     };
   };
   AnyRefNode HubLeft = {};
   AnyDrawSurf PushRimWheel = {
     RGB = {0, 0, 1};
     ScaleXYZ = {1,1,1}*Main.ChairParameters.PushRimRad;
     Transparency = 1;
     FileName = "CAD/wheel";
     AnyFunTransform3DLin Wheel = {
       ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
       Offset = {0,0,0};
     };
   };
 };

/* **********************************************************
This folder contains the definition of the Joints and Drivers

  • JointsAndDrivers

    ********************************************************** */
    AnyKinEqSimpleDriver RHubDrv = {
    AnyKinLinear RHub ={
    Ref=0;
    AnyRefFrame &ref1=Main.Model.EnvironmentModel.GlobalRef;
    AnyRefFrame &ref2=Main.Model.Markers.AAAR_RHUB.Seg;
    };
    MeasureOrganizer={0,1,2};
    DriverPos={0,0,0};
    DriverVel={0,0,0};
    Reaction.Type={Off,Off,Off};
    };

    AnyKinEqSimpleDriver LHubDrv = {
    AnyKinLinear LHub ={
    Ref=0;
    AnySeg &ref1=Main.Model.EnvironmentModel.GlobalRef;
    AnyRefFrame &ref2=Main.Model.Markers.AAAR_LHUB.Seg;
    };
    MeasureOrganizer={0,1,2};
    DriverPos={0,0,0};
    DriverVel={0,0,0};
    Reaction.Type={Off,Off,Off};
    };

AnyFolder EnvironmentModel = {

Hi Sarah

No problem

I have looked into your model and there are a few things that look strange
to me.

In the JointAndDriver.any file, it looks like you trying to drive the
recorded marker named AAAR_RHUB and AAAR_LHUB to be located at origo.

This is done through these following two drivers.

AnyKinEqSimpleDriver RHubDrv = {

 AnyKinLinear RHub ={

   Ref=0;

   AnyRefFrame &ref1=Main.Model.EnvironmentModel.GlobalRef;

   AnyRefFrame &ref2=Main.Model.Markers.AAAR_RHUB.Seg;

 };

 MeasureOrganizer={0,1,2};

 DriverPos={0,0,0};

 DriverVel={0,0,0};

 Reaction.Type={Off,Off,Off};

};

AnyKinEqSimpleDriver LHubDrv = {

 AnyKinLinear LHub ={

   Ref=0;

   AnySeg &ref1=Main.Model.EnvironmentModel.GlobalRef;

   AnyRefFrame &ref2=Main.Model.Markers.AAAR_LHUB.Seg;

 };

 MeasureOrganizer={0,1,2};

 DriverPos={0,0,0};

 DriverVel={0,0,0};

 Reaction.Type={Off,Off,Off};

};

The problem is that these markers are already driven by the data, and the
global ref is a fixed ref system that will not move so these drivers will
create constraints which are unsolvable, maybe you where trying to add this
constraint on the wheels instead. If you look in the file
“ARPreInt20.MarkerListMover.any” you will find a list of all the driven
markers each of them includes a file named “MarkerMover.any”. In this file
the markers are driven by the measured data, which it taken from the c3d
section.

It is difficult to say what will be the best solution in terms of driving
the model using a fixed chair position or a moving one. If think the
simplest solution will be using the moving one, if you are using a fixed
wheel chair position it may create problems is the chair rotates wrt global
ref since these rotations can not easily be subtracted or added onto the
marker placed on the human, but if you know from the experiment that there
are no such rotations it might be ok to simply subtract the wheelhub motion
from the markers.

I think the best procedure would be to exclude the human from the model
initially and only have the wheelchair in the model and then start by
driving this, once this is running, then add the human model. This will
ensure that you have a running model. I think it will be a good idea to look
at the drivers from the Ranch wheelchair model in the repository and try to
replicate the drivers used, with the new markers. It should not matter if
the wheelchair is fixed or not it will just be a matter of subtracting the
position of the wheelhub from the marker data, basically the drivers should
be the same.

Best regards

Søren, AnyBody Support


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of Sarah R. Sullivan
Sent: 17 October 2008 14:18
To: anyscript@yahoogroups.com
Subject: [AnyScript] Question setting up Environment by Driving an
AnyRefNode…

As I mentioned previously, I am new to using the c3d2any converter to
drive models directly with motion data - what I used to do was
process and physically manipulate data on my own and drive the models
that way. Obviously this new way of creating and running a model is
superior, but I am a little behind the learning curve and I apologize
for that.

What I am writing to ask is: I have a wheelchair in space, and I have
wheelchair hub marker data (in addition to other body marker data).
I am looking to use AnyFloat to essentially drive the hub markers in
the environment. Is there a better way to do this? i.e. should I
ground one wheel, and then drive the other’s movements relative to
the grounded wheel (I did something similar using my old technique)?
Below is an excerpt from my Environment file where I have defined the
wheels and the push rim, and upon loading the model, the wheels (and
push rims) are centered at the origin. At that point (further below),
I have posted an excerpt from my JointsAndDrivers file in which I try
to drive the hubs in space. Once I get them “grounded” (using
AnyFloat to drive the marker position), I will then proceed to put
the chair in place, and then the body adjust the body in space. Am I
going about this the right way? I’m uploading the file I have so far…
(Axle-Adjustment_Study_c3d2any_Trial_20).

Thanks in advance for your help,
Sarah

/* **********************************************************
This folder contains the definition of the Environment

  • GlobalRefFrame

********************************************************** */

AnyFixedRefFrame GlobalRef = {
Origin = {0, 0, 0};
AnyDrawRefFrame dw =
{
RGB = {1, 0, 0};
ScaleXYZ = .1*{1, 1, 1};
Transparency = 1;
};
};

AnyFolder Wheelchair = {
AnyFloat RHUB = Main.C3DFileData.Markers.AAAR_RHUB.Pos;
AnyFloat LHUB = Main.C3DFileData.Markers.AAAR_LHUB.Pos;

AnySeg WheelRight =
{
Mass = 2.5;
Jii = {1, 2, 1}*0.01;
AnyDrawSurf Wheel = {
RGB = {0.65, 0.65, 0.65};
ScaleXYZ = {1,1,1}*Main.ChairParameters.WheelRad;
Transparency = 1;
FileName = “CAD/wheel”;
AnyFunTransform3DLin Wheel = {
ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
Offset = {0,0,0};
};
};
AnyRefNode HubRight = {};
AnyDrawSurf PushRimWheel = {
RGB = {0, 0, 1};
ScaleXYZ = {1,1,1}*Main.ChairParameters.PushRimRad;
Transparency = 1;
FileName = “CAD/wheel”;
AnyFunTransform3DLin Wheel = {
ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
Offset = {0,0,0};
};
};
};
AnySeg WheelLeft =
{
Mass = 2.5;
Jii = {1, 2, 1}*0.01;
AnyDrawSurf Wheel = {
RGB = {0.65, 0.65, 0.65};
ScaleXYZ = {1,1,1}*Main.ChairParameters.WheelRad;
Transparency = 1;
FileName = “CAD/wheel”;
AnyFunTransform3DLin Wheel = {
ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
Offset = {0,0,0};
};
};
AnyRefNode HubLeft = {};
AnyDrawSurf PushRimWheel = {
RGB = {0, 0, 1};
ScaleXYZ = {1,1,1}*Main.ChairParameters.PushRimRad;
Transparency = 1;
FileName = “CAD/wheel”;
AnyFunTransform3DLin Wheel = {
ScaleMat = {{-1,0,0},{0,0,1},{0,1,0}};
Offset = {0,0,0};
};
};
};

/* **********************************************************
This folder contains the definition of the Joints and Drivers

  • JointsAndDrivers

********************************************************** */
AnyKinEqSimpleDriver RHubDrv = {
AnyKinLinear RHub ={
Ref=0;
AnyRefFrame &ref1=Main.Model.EnvironmentModel.GlobalRef;
AnyRefFrame &ref2=Main.Model.Markers.AAAR_RHUB.Seg;
};
MeasureOrganizer={0,1,2};
DriverPos={0,0,0};
DriverVel={0,0,0};
Reaction.Type={Off,Off,Off};
};

AnyKinEqSimpleDriver LHubDrv = {
AnyKinLinear LHub ={
Ref=0;
AnySeg &ref1=Main.Model.EnvironmentModel.GlobalRef;
AnyRefFrame &ref2=Main.Model.Markers.AAAR_LHUB.Seg;
};
MeasureOrganizer={0,1,2};
DriverPos={0,0,0};
DriverVel={0,0,0};
Reaction.Type={Off,Off,Off};
};

AnyFolder EnvironmentModel = {

[Non-text portions of this message have been removed]