Hi Dieter
It is not possible to driver a pendulum with one marker if the joint is a
spherical joint.
The reason is that the pendulum will be able to rotate around it’s long
axis, there are not enough marker info there to drive this dof.
Furthermore the pendulum has a fixed length, and in reality the marker
trajectories will have introduced some amount of noise. If you impose all
three coordinates x,y,z on the pendulum you will effectively try to drive
the pendulum to be longer or shorter depending on the noise.
So with one marker you can maximally drive a universal joint, and you should
always try to avoid driving along the long axis on the pendulum.
Hope this made it clearer, otherwise please write again
Best regards
Søen, AnyBody Support
From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of dieterkassgim
Sent: 25 September 2008 10:45
To: anyscript@yahoogroups.com
Subject: [AnyScript] Re: 3D kinematics
Hello,
it’s me again. I’ve been through the “Driving models by motion capture
marker trajectories” tutorial chapter again to understand how that
basically works. Here’s the example:
// Model for the mocap tutorial
Main = {
// The actual body model goes in this folder
AnyFolder MyModel = {
// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
}; // Global reference frame
AnySeg Pendulum = {
Mass = 1;
Jii = {1, 0.01, 1}/10;
AnyRefNode Origin = {
sRel = {0, 0.5, 0};
};
AnyRefNode P1 = {
sRel = {0, -0.5, 0};
};
AnyDrawSeg drw = {};
};
AnySeg M1 = {
Mass = 0;
Jii = {0, 0, 0}/10;
};
// Lock the rotational DOFs of segment M1
AnyKinEq RotLock = {
AnyKinRotational rot = {
Type = RotAxesAngles;
AnyRefFrame &ground = …GlobalRef;
AnyRefFrame &Marker = …M1;
};
};
AnyRevoluteJoint Joint = {
AnyRefFrame &Ground = .GlobalRef;
AnyRefFrame &Pendulum = .Pendulum.Origin;
};
AnyKinLinear P1Lin = {
//Ref = -1;
AnyRefFrame &LabOrigin = .GlobalRef;
AnyRefFrame &P1 = .Pendulum.P1;
};
AnyKinLinear M1Lin = {
//Ref = -1;
AnyRefFrame &LabOrigin = .GlobalRef;
AnyRefFrame &M1 = .M1;
};
AnyKinEqInterPolDriver M1Driver = {
Type = Bspline;
BsplineOrder = 4;
FileName = “P2.txt”;
AnyKinMeasure &Lin = .M1Lin;
//MeasureOrganizer = {0};
Reaction.Type = {On, On, On};
};
AnyKinEq MarkerBodyConstraint = {
AnyKinLinear lin = {
Ref=1;//local co-ordinatesystem
// Please notice that even though we are driving in the local
pendulum
// coordinate system we did not have to make
// any manual conversion of the MOCAP marker data.
AnyRefFrame &Marker = …M1;
AnyRefFrame &Body = …Pendulum.P1;
};
MeasureOrganizer = {0};
};
}; // MyModel
// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, -9.81, 0.0};
nStep = 1000;
};
}; // Main
Unfortunately, I still don’t understand how this exactly works. As far
as I understood we’re defining another mass-parameterless segment at
the marker position and link it to the original pendulum segment.
We’re locking the rotational DOFs of the additional segment and then
drive it by the measured co-ordinates. So far so good. But if I want
to change the AnyRevoluteJoint to an AnySphericalJoint AnyBody rightly
complains that the model is not kinematically determinate. But I have
an understanding problem. Shouldn’t the X/Y/Z co-ordinates be all we
need for the model to be sufficiently kinematically determinate? In
other words is it easily possible to make this model driven only by
the co-ordinates when using AnySphericalJoint?
Kind Regards,
Dieter
— In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
“dieterkassgim” <dieterkassgim@…>
wrote:
>
> Hi Sebastian,
>
> Thank you very much for the hint with the GaitVaughan example. I’ll
> have a look tomorrow. I also believe applying marker data directly to
> the model is a good idea. If any problem shall appear I will ask again
> in this thread.
>
> Kind Regards,
>
> Dieter
> –
>
> — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
Sebastian Dendorfer
> <anyscriptsup@> wrote:
> >
> > Hello Dieter,
> >
> >
> >
> > The reason why your model is not working may be related to the
> sequence of
> > rotations. Each rotation subsequent to the first is a rotation in
> the local
> > reference frame, which of course has to be taken into account in the
> > measurement of the angles. You can find more information on this on
> page 158
> > in the reference manual.
> >
> > Have you thought about driving the model directly with the marker
> data? You
> > can follow the GaitVaughan example of the Repository. The idea is to
> create
> > a marker on the segment you want to drive and create measures
> between the
> > new markers and the data you have gathered. (Please make sure that
> you use
> > the Ref=0 setting and therefore the local coordinate system for
driving
> > it.). Free up one degree of freedom at one step and check if it
> works before
> > you continue. I think this would be a good approach to your problem.
> >
> >
> >
> > Best regards,
> >
> > Sebastian
> >
> >
> >
> >
> >
> > _____
> >
> > From: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
[mailto:anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com]
> On Behalf
> > Of dieterkassgim
> > Sent: 22. september 2008 17:19
> > To: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
> > Subject: [AnyScript] 3D kinematics
> >
> >
> >
> > Hello,
> >
> > I’m having some trouble extracting 3D kinematic data from µCT image
> > sets and applying it to an existing AnyBody model. What I did is I
> > wrote a tool where I can place markers. I uploaded an example image
> > under this link: http://img373.
> > <http://img373. <http://img373.imageshack.us/my.php?image=rathf0.png>
imageshack.us/my.php?image=rathf0.png>
> > imageshack.us/my.php?image=rathf0.png
> > I have another set of images taken from above the rat and I placed the
> > global co-ordinatesystem at the very same place where I placed it on
> > the linked scan. So what I receive are the pixel co-ordinates (X/Y/Z)
> > from each marker point which I converted to real metric values. They
> > refer to the global co-ordinatesystem.
> >
> > What I did next was to define AnyKinRotational measures. They all
> > refer to the global co-ordinatesystem. Like this:
> >
> > AnyKinRotational LinHipRot = {
> > Type = RotVector;
> > AnyRefFrame &LabOrigin = Main.RatModel.Ground;
> > AnyRefFrame &P1 = Main.RatModel.Seg.Femur;
> > };
> >
> > Here is the joint definition:
> >
> > AnySphericalJoint Hip = {
> > Orientation.Axis1 = y;
> > Orientation.Axis2 = x;
> > Orientation.Axis3 = z;
> > Orientation.Type = RotVector;
> > AnyRefNode &spine = Main.RatModel.Seg.SpinePelvis.Hip;
> > AnyRefNode &Femur = Main.RatModel.Seg.Femur.Hip;
> > }; // Hip joint
> >
> > And finally the drivers
> >
> > AnyKinEqInterPolDriver DriverHipRotX = {
> > Type = Bspline;
> > BsplineOrder = 4;
> > FileName = “drivers\hip_rot_x.txt”;
> > AnyKinMeasure &Lin = Main.RatModel.Drivers.LinHipRot;
> > MeasureOrganizer = {0};
> > Reaction.Type = {Off};
> > };
> > AnyKinEqInterPolDriver DriverHipRotY = {
> > Type = Bspline;
> > BsplineOrder = 4;
> > FileName = “drivers\hip_rot_y.txt”;
> > AnyKinMeasure &Lin = Main.RatModel.Drivers.LinHipRot;
> > MeasureOrganizer = {1};
> > Reaction.Type = {Off};
> > };
> > AnyKinEqInterPolDriver DriverHipRotZ = {
> > Type = Bspline;
> > BsplineOrder = 4;
> > FileName = “drivers\hip_rot_z.txt”;
> > AnyKinMeasure &Lin = Main.RatModel.Drivers.LinHipRot;
> > MeasureOrganizer = {2};
> > Reaction.Type = {Off};
> > };
> >
> > Then I calculated the the joint driver angles which refer to the
> > global reference frame using arctan(x/y) (for the 2 dimensional case)
> > which didn’t look right and arctan2(x/y) which also didn’t look right.
> >
> > So my question is: How do I calculate 3 dimensional driver angles when
> > I have the required Co-ordinates? Are there (alternatively) any
> > third-party tools?
> >
> > Thank you ever so much in advance
> >
> > Kind Regards,
> >
> > Dieter
> > –
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
[Non-text portions of this message have been removed]