adapting the Rancho Wheelchair Demo

My name is Robert Price, I’m from the University of Washington in Seattle. I’m
very new to
AnyScript and I am attempting to modify the Rancho Wheelchair Demo to run with
MoCap
data collected in our lab. I’ve been successful so far in switching the marker
set from
what’s in the demo to a marker set that corresponds to what we used. I’m now
trying to
adapt the driver section to move the shoulder via our acromial marker. Below is
the driver
code snippet I’ve adapted. The commented out section is what appeared
originally and is
replaced by my attempt to drive the segment with a marker. The snippet for the
humerus
is included for reference. When I attmpt to run the model (which compiles
successfully), it
fails on time step zero, some of the error messages are included below. What is
wrong
with what I did and how do I fix it?

Thanks

Robert

//Sterno clavicular joint driver
AnyKinEqSimpleDriver SCDriverLeft ={
// AnyKinMeasureOrg &ref1
=…HumanModel.Interface.Left.SternoClavicularProtraction;
// AnyKinMeasureOrg &ref2
=…HumanModel.Interface.Left.SternoClavicularElevation;
// AnyKinMeasureOrg &ref3
=…HumanModel.Interface.Left.SternoClavicularAxialRotation;
// DriverPos = pi/180*{
// .JntPos.Left.SternoClavicularProtraction,
// .JntPos.Left.SternoClavicularElevation,
// .JntPos.Left.SternoClavicularAxialRotation
// };
// DriverVel = {
// .JntVel.Left.SternoClavicularProtraction,
// .JntVel.Left.SternoClavicularElevation,
// .JntVel.Left.SternoClavicularAxialRotation
// };
// Reaction.Type={Off,Off,Off};
AnyKinLinear Lin={
Ref=0;
AnyRefFrame &ref1 =
Main.Model.HumanModel.Left.ShoulderArm.Seg.Scapula.ArtAcromiocalviculareMarker;
AnyRefFrame &ref2=Main.Model.Markers.Acro.Seg;
};
MeasureOrganizer={0,1,2};
DriverPos={0,0,0};
DriverVel={0,0,0};
Reaction.Type={Off,Off,Off};
};

AnyKinEqSimpleDriver LeftLateralEpicondyleDrv ={
AnyKinLinear Lin={
Ref=0;
AnyRefFrame &ref1 =
Main.Model.HumanModel.Left.ShoulderArm.Seg.Humerus.LateralEpicondyleMarker;
AnyRefFrame &ref2=Main.Model.Markers.LEP.Seg;
};
MeasureOrganizer={0,2};
DriverPos={0,0};
DriverVel={0,0};
Reaction.Type={Off,Off};
};

Failed to resolve kinematic constraints (final kin. error = 1.177291E+000)
Constraint no. 6 above error tolerance 0.000001, error = 0.000002. - constr. #0
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L4L5Jnt.Constraints’
Constraint no. 7 above error tolerance 0.000001, error = 0.000003. - constr. #1
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L4L5Jnt.Constraints’
Constraint no. 8 above error tolerance 0.000001, error = 0.000001. - constr. #2
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L4L5Jnt.Constraints’
Constraint no. 9 above error tolerance 0.000001, error = 0.000007. - constr. #0
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L3L4Jnt.Constraints’
Constraint no. 10 above error tolerance 0.000001, error = 0.000016. - constr. #1
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L3L4Jnt.Constraints’
Constraint no. 11 above error tolerance 0.000001, error = 0.000002. - constr. #2
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L3L4Jnt.Constraints’
Constraint no. 12 above error tolerance 0.000001, error = 0.000021. - constr. #0
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L2L3Jnt.Constraints’
Constraint no. 13 above error tolerance 0.000001, error = 0.000049. - constr. #1
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L2L3Jnt.Constraints’
Constraint no. 15 above error tolerance 0.000001, error = 0.000044. - constr. #0
in
‘Main.Model.HumanModel.Trunk.JointsLumbar.L1L2Jnt.Constraints’

Hi Robert

Welcome to this group

I have reviewed the changes you have introduced. I think the main
problem is that previously the three rotations of the SC joint where
driven to a constant angle. You are trying to drive all three of
them using the acromical marker, this is not possible because it
will leave the rotations of the long axis of the calvicula
undetermined. It should be possible to use the marker for driving
the SternoclaviculaProtraction and SternoclaviculaElevation, but
the rotations can not be controlled by this marker you will still
need this dof to be fixed.

The error messages you get simply means that the kinematic solver
failed to solve the kinematic constraints, and then it lists the
largets error it ended up with. Sometimes looking for the largest
ones can help you to determine the root of the problem.

Previously there have been similar questions on how to make the gait
model run using a different data set, if you look in Message
1104 : “Re: RunGait3d Using own data”, some of the steps to follow
are also true for the wheelchair model.

I hope this helps you move on, otherwise please write again.

Best regards
Søren

— In anyscript@yahoogroups.com, “pricerob26” <pricer@…> wrote:
>
> My name is Robert Price, I’m from the University of Washington in
Seattle. I’m very new to
> AnyScript and I am attempting to modify the Rancho Wheelchair Demo
to run with MoCap
> data collected in our lab. I’ve been successful so far in
switching the marker set from
> what’s in the demo to a marker set that corresponds to what we
used. I’m now trying to
> adapt the driver section to move the shoulder via our acromial
marker. Below is the driver
> code snippet I’ve adapted. The commented out section is what
appeared originally and is
> replaced by my attempt to drive the segment with a marker. The
snippet for the humerus
> is included for reference. When I attmpt to run the model (which
compiles successfully), it
> fails on time step zero, some of the error messages are included
below. What is wrong
> with what I did and how do I fix it?
>
> Thanks
>
> Robert
>
> //Sterno clavicular joint driver
> AnyKinEqSimpleDriver SCDriverLeft ={
> // AnyKinMeasureOrg &ref1
=…HumanModel.Interface.Left.SternoClavicularProtraction;
> // AnyKinMeasureOrg &ref2
=…HumanModel.Interface.Left.SternoClavicularElevation;
> // AnyKinMeasureOrg &ref3
> =…HumanModel.Interface.Left.SternoClavicularAxialRotation;
> // DriverPos = pi/180*{
> // .JntPos.Left.SternoClavicularProtraction,
> // .JntPos.Left.SternoClavicularElevation,
> // .JntPos.Left.SternoClavicularAxialRotation
> // };
> // DriverVel = {
> // .JntVel.Left.SternoClavicularProtraction,
> // .JntVel.Left.SternoClavicularElevation,
> // .JntVel.Left.SternoClavicularAxialRotation
> // };
> // Reaction.Type={Off,Off,Off};
> AnyKinLinear Lin={
> Ref=0;
> AnyRefFrame &ref1 =
>
Main.Model.HumanModel.Left.ShoulderArm.Seg.Scapula.ArtAcromiocalvicul
areMarker;
> AnyRefFrame &ref2=Main.Model.Markers.Acro.Seg;
> };
> MeasureOrganizer={0,1,2};
> DriverPos={0,0,0};
> DriverVel={0,0,0};
> Reaction.Type={Off,Off,Off};
> };
>
>
> AnyKinEqSimpleDriver LeftLateralEpicondyleDrv ={
> AnyKinLinear Lin={
> Ref=0;
> AnyRefFrame &ref1 =
>
Main.Model.HumanModel.Left.ShoulderArm.Seg.Humerus.LateralEpicondyleM
arker;
> AnyRefFrame &ref2=Main.Model.Markers.LEP.Seg;
> };
> MeasureOrganizer={0,2};
> DriverPos={0,0};
> DriverVel={0,0};
> Reaction.Type={Off,Off};
> };
>
>
> Failed to resolve kinematic constraints (final kin. error =
1.177291E+000)
> Constraint no. 6 above error tolerance 0.000001, error =
0.000002. - constr. #0 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L4L5Jnt.Constraints’
> Constraint no. 7 above error tolerance 0.000001, error =
0.000003. - constr. #1 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L4L5Jnt.Constraints’
> Constraint no. 8 above error tolerance 0.000001, error =
0.000001. - constr. #2 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L4L5Jnt.Constraints’
> Constraint no. 9 above error tolerance 0.000001, error =
0.000007. - constr. #0 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L3L4Jnt.Constraints’
> Constraint no. 10 above error tolerance 0.000001, error =
0.000016. - constr. #1 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L3L4Jnt.Constraints’
> Constraint no. 11 above error tolerance 0.000001, error =
0.000002. - constr. #2 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L3L4Jnt.Constraints’
> Constraint no. 12 above error tolerance 0.000001, error =
0.000021. - constr. #0 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L2L3Jnt.Constraints’
> Constraint no. 13 above error tolerance 0.000001, error =
0.000049. - constr. #1 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L2L3Jnt.Constraints’
> Constraint no. 15 above error tolerance 0.000001, error =
0.000044. - constr. #0 in
> ‘Main.Model.HumanModel.Trunk.JointsLumbar.L1L2Jnt.Constraints’
>