Endpoint Drivers

I’m trying to drive an arm model by specifying hand locations (as
opposed to joint angles) but it seems to not like something I’m
doing. I stripped my drivers down the the very bare bones (no pun
intended) but I still get constraint violations.

Main = {

// Arm body model
#include “Repository.5\BRep\Pisa\arm7dof\Arm7Dof.root.any”
AnyVar MaxS = 100000; // muscle bulging scale

AnyFolder Kinematics = {
AnyKinLinear HandPos = {
AnyRefFrame &Shoulder = Main.Model.Joints.Shoulder;
AnyRefFrame &Wrist = Main.Model.Links.Hand;
};
};

// Drivers
AnyFolder Drivers = {
// Lock the Wrist
AnyKinEqSimpleDriver Wrist = {
AnyUniversalJoint &GntPolso = Main.Model.Joints.Wrist;
DriverPos = {0,0};
DriverVel = {0,0};
Reaction.Type = {0,0};
};
// Set the hand position in cartesian space
AnyKinEqSimpleDriver Hand = {
AnyKinLinear &HandPos = Main.Kinematics.HandPos;
DriverPos = {0,0,0.6};
DriverVel = {0,0,0.1};
Reaction.Type = {0,0,0};
};
// constrain the elbow to the y-z plane
AnyKinEq Elbow = {
AnyKinLinear ElbowPos = {
AnyFixedRefFrame &Ground = Main.Model.GlobalRef;
AnyRefNode &Elbow = Main.Model.Joints.Elbow;
};
MeasureOrganizer = {0}; // Only the x direction
Reaction.Type = {0}; // Don’t provide reaction forces
};
};

// Study
// -----------------------
AnyBodyStudy Study = {
AnyFolder &Model = Main.Model;
AnyFolder &Drivers = Main.Drivers;
AnyFolder &Kinematics = Main.Kinematics;
RecruitmentSolver = MinMaxOOSolSimplex;
Gravity = {0.0, 0.0, -9.81};

 tEnd = 1;

};

}; // Main

Hi

I have taken a look at your drivers, you need to drive one more dof
before the model will work. Otherwise it will give you the following
error message

Model Warning: Study ‘Main.Study’ contains too few kinematic
constraints to be kinematically determinate.

This means that the motion in is not fully determined.

The Pisa arm has seven dof in total and you drive six. I think you
miss driving the second dof in the elbow none of the drivers you
have specified will be able to control this dof, which is the
pronation supination.

Best regards
AnyBody Support

— In anyscript@yahoogroups.com, “selket_10027” <selket_10027@y…>
wrote:
>
> I’m trying to drive an arm model by specifying hand locations (as
> opposed to joint angles) but it seems to not like something I’m
> doing. I stripped my drivers down the the very bare bones (no pun
> intended) but I still get constraint violations.
>
>
> Main = {
>
> // Arm body model
> #include “Repository.5\BRep\Pisa\arm7dof\Arm7Dof.root.any”
> AnyVar MaxS = 100000; // muscle bulging scale
>
> AnyFolder Kinematics = {
> AnyKinLinear HandPos = {
> AnyRefFrame &Shoulder = Main.Model.Joints.Shoulder;
> AnyRefFrame &Wrist = Main.Model.Links.Hand;
> };
> };
>
> // Drivers
> AnyFolder Drivers = {
> // Lock the Wrist
> AnyKinEqSimpleDriver Wrist = {
> AnyUniversalJoint &GntPolso = Main.Model.Joints.Wrist;
> DriverPos = {0,0};
> DriverVel = {0,0};
> Reaction.Type = {0,0};
> };
> // Set the hand position in cartesian space
> AnyKinEqSimpleDriver Hand = {
> AnyKinLinear &HandPos = Main.Kinematics.HandPos;
> DriverPos = {0,0,0.6};
> DriverVel = {0,0,0.1};
> Reaction.Type = {0,0,0};
> };
> // constrain the elbow to the y-z plane
> AnyKinEq Elbow = {
> AnyKinLinear ElbowPos = {
> AnyFixedRefFrame &Ground = Main.Model.GlobalRef;
> AnyRefNode &Elbow = Main.Model.Joints.Elbow;
> };
> MeasureOrganizer = {0}; // Only the x direction
> Reaction.Type = {0}; // Don’t provide reaction forces
> };
> };
>
> // Study
> // -----------------------
> AnyBodyStudy Study = {
> AnyFolder &Model = Main.Model;
> AnyFolder &Drivers = Main.Drivers;
> AnyFolder &Kinematics = Main.Kinematics;
> RecruitmentSolver = MinMaxOOSolSimplex;
> Gravity = {0.0, 0.0, -9.81};
>
> tEnd = 1;
> };
>
> }; // Main
>

Hi,

So I added:

 AnyKinEqSimpleDriver ProSup = {
   AnyUniversalJoint &GntPolso = Main.Model.Joints.Elbow;
   DriverPos = {0};
   DriverVel = {0};
   MeasureOrganizer = {1};
   Reaction.Type = {0};
 };

That fixes the “Model Warning: Study ‘Main.Study’ contains too few
kinematic constraints to be kinematically determinate.” However, it
does not eliminate the error:

Position analysis failed because the system is kinematically
indeterminate.

  • attempts to continue (attempt no. 1).
    Failed to resolve kinematic constraints (final kin. error = 5.154574E+002)
    Constraint no. 1 above error tolerance 0.000001, error = 8.112182. -
    constr. #1 in ‘Main.Model.Joints.Shoulder.Constraints’
    Constraint no. 2 above error tolerance 0.000001, error = 0.178300. -
    constr. #2 in ‘Main.Model.Joints.Shoulder.Constraints’
    Constraint no. 4 above error tolerance 0.000001, error = 8.055465. -
    constr. #1 in ‘Main.Model.Joints.Elbow.Constraints’
    Constraint no. 5 above error tolerance 0.000001, error = 1.016985. -
    constr. #2 in ‘Main.Model.Joints.Elbow.Constraints’
    Constraint no. 9 above error tolerance 0.000001, error = 0.190003. -
    constr. #2 in ‘Main.Model.Joints.Wrist.Constraints’
    Constraint no. 15 above error tolerance 0.000001, error = 0.599995. -
    constr. #2 in ‘Main.Drivers.Hand’

ERROR : Z:\AnyBody\BriansModel.any(23) : Study : Kinematic
analysis failed in time step 0.

Sorry, I should have been more specific about what my problem was.

— In anyscript@yahoogroups.com, “AnyBody Support” <support@a…> wrote:
>
> Hi
>
> I have taken a look at your drivers, you need to drive one more dof
> before the model will work. Otherwise it will give you the following
> error message
>
> Model Warning: Study ‘Main.Study’ contains too few kinematic
> constraints to be kinematically determinate.
>
> This means that the motion in is not fully determined.
>
> The Pisa arm has seven dof in total and you drive six. I think you
> miss driving the second dof in the elbow none of the drivers you
> have specified will be able to control this dof, which is the
> pronation supination.
>
> Best regards
> AnyBody Support
>
> — In anyscript@yahoogroups.com, “selket_10027” <selket_10027@y…>
> wrote:
> >
> > I’m trying to drive an arm model by specifying hand locations (as
> > opposed to joint angles) but it seems to not like something I’m
> > doing. I stripped my drivers down the the very bare bones (no pun
> > intended) but I still get constraint violations.
> >
> >
> > Main = {
> >
> > // Arm body model
> > #include “Repository.5\BRep\Pisa\arm7dof\Arm7Dof.root.any”
> > AnyVar MaxS = 100000; // muscle bulging scale
> >
> > AnyFolder Kinematics = {
> > AnyKinLinear HandPos = {
> > AnyRefFrame &Shoulder = Main.Model.Joints.Shoulder;
> > AnyRefFrame &Wrist = Main.Model.Links.Hand;
> > };
> > };
> >
> > // Drivers
> > AnyFolder Drivers = {
> > // Lock the Wrist
> > AnyKinEqSimpleDriver Wrist = {
> > AnyUniversalJoint &GntPolso = Main.Model.Joints.Wrist;
> > DriverPos = {0,0};
> > DriverVel = {0,0};
> > Reaction.Type = {0,0};
> > };
> > // Set the hand position in cartesian space
> > AnyKinEqSimpleDriver Hand = {
> > AnyKinLinear &HandPos = Main.Kinematics.HandPos;
> > DriverPos = {0,0,0.6};
> > DriverVel = {0,0,0.1};
> > Reaction.Type = {0,0,0};
> > };
> > // constrain the elbow to the y-z plane
> > AnyKinEq Elbow = {
> > AnyKinLinear ElbowPos = {
> > AnyFixedRefFrame &Ground = Main.Model.GlobalRef;
> > AnyRefNode &Elbow = Main.Model.Joints.Elbow;
> > };
> > MeasureOrganizer = {0}; // Only the x direction
> > Reaction.Type = {0}; // Don’t provide reaction forces
> > };
> > };
> >
> > // Study
> > // -----------------------
> > AnyBodyStudy Study = {
> > AnyFolder &Model = Main.Model;
> > AnyFolder &Drivers = Main.Drivers;
> > AnyFolder &Kinematics = Main.Kinematics;
> > RecruitmentSolver = MinMaxOOSolSimplex;
> > Gravity = {0.0, 0.0, -9.81};
> >
> > tEnd = 1;
> > };
> >
> > }; // Main
> >
>

Hi

I have made some corrections in the model you describe below and
uploaded a new zip file to the file section of the group, named
DumbBell.zip.

Please search for AnyBodySup in the main file and you will see the
changes which has been made.

Generally two of the drivers where not specified correctly, for
example the HandPos linear measure where setup between a shoulder
joint (spherical joint) and the hand segment. This is not
meaningfull and did produce an warning at load time. The linear
measure should have been between the global refnode of the shoulder
joint and the hand segment.

Furthermore initial positions of the segments has been added, for
close chain mechanics like this case a good guess on the what should
be the initial positions of the segments is needed in most case. In
the original dumbbell model it was driven as a open chain. Such
models will always assemble kinematically without problems.

I hope this solves your problems otherwise please do not hesitate to
write again

Best regards
AnyBody Support

— In anyscript@yahoogroups.com, “selket_10027” <selket_10027@y…>
wrote:
>
> Hi,
>
> So I added:
>
> AnyKinEqSimpleDriver ProSup = {
> AnyUniversalJoint &GntPolso = Main.Model.Joints.Elbow;
> DriverPos = {0};
> DriverVel = {0};
> MeasureOrganizer = {1};
> Reaction.Type = {0};
> };
>
> That fixes the “Model Warning: Study ‘Main.Study’ contains too few
> kinematic constraints to be kinematically determinate.” However, it
> does not eliminate the error:
>
> Position analysis failed because the system is kinematically
> indeterminate.
> - attempts to continue (attempt no. 1).
> Failed to resolve kinematic constraints (final kin. error =
5.154574E+002)
> Constraint no. 1 above error tolerance 0.000001, error =
8.112182. -
> constr. #1 in ‘Main.Model.Joints.Shoulder.Constraints’
> Constraint no. 2 above error tolerance 0.000001, error =
0.178300. -
> constr. #2 in ‘Main.Model.Joints.Shoulder.Constraints’
> Constraint no. 4 above error tolerance 0.000001, error =
8.055465. -
> constr. #1 in ‘Main.Model.Joints.Elbow.Constraints’
> Constraint no. 5 above error tolerance 0.000001, error =
1.016985. -
> constr. #2 in ‘Main.Model.Joints.Elbow.Constraints’
> Constraint no. 9 above error tolerance 0.000001, error =
0.190003. -
> constr. #2 in ‘Main.Model.Joints.Wrist.Constraints’
> Constraint no. 15 above error tolerance 0.000001, error =
0.599995. -
> constr. #2 in ‘Main.Drivers.Hand’
>
> ERROR : Z:\AnyBody\BriansModel.any(23) : Study :
Kinematic
> analysis failed in time step 0.
>
> Sorry, I should have been more specific about what my problem was.
>
> — In anyscript@yahoogroups.com, “AnyBody Support” <support@a…>
wrote:
> >
> > Hi
> >
> > I have taken a look at your drivers, you need to drive one more
dof
> > before the model will work. Otherwise it will give you the
following
> > error message
> >
> > Model Warning: Study ‘Main.Study’ contains too few kinematic
> > constraints to be kinematically determinate.
> >
> > This means that the motion in is not fully determined.
> >
> > The Pisa arm has seven dof in total and you drive six. I think
you
> > miss driving the second dof in the elbow none of the drivers you
> > have specified will be able to control this dof, which is the
> > pronation supination.
> >
> > Best regards
> > AnyBody Support
> >
> > — In anyscript@yahoogroups.com, “selket_10027”
<selket_10027@y…>
> > wrote:
> > >
> > > I’m trying to drive an arm model by specifying hand locations
(as
> > > opposed to joint angles) but it seems to not like something
I’m
> > > doing. I stripped my drivers down the the very bare bones (no
pun
> > > intended) but I still get constraint violations.
> > >
> > >
> > > Main = {
> > >
> > > // Arm body model
> > > #include “Repository.5\BRep\Pisa\arm7dof\Arm7Dof.root.any”
> > > AnyVar MaxS = 100000; // muscle bulging scale
> > >
> > > AnyFolder Kinematics = {
> > > AnyKinLinear HandPos = {
> > > AnyRefFrame &Shoulder = Main.Model.Joints.Shoulder;
> > > AnyRefFrame &Wrist = Main.Model.Links.Hand;
> > > };
> > > };
> > >
> > > // Drivers
> > > AnyFolder Drivers = {
> > > // Lock the Wrist
> > > AnyKinEqSimpleDriver Wrist = {
> > > AnyUniversalJoint &GntPolso = Main.Model.Joints.Wrist;
> > > DriverPos = {0,0};
> > > DriverVel = {0,0};
> > > Reaction.Type = {0,0};
> > > };
> > > // Set the hand position in cartesian space
> > > AnyKinEqSimpleDriver Hand = {
> > > AnyKinLinear &HandPos = Main.Kinematics.HandPos;
> > > DriverPos = {0,0,0.6};
> > > DriverVel = {0,0,0.1};
> > > Reaction.Type = {0,0,0};
> > > };
> > > // constrain the elbow to the y-z plane
> > > AnyKinEq Elbow = {
> > > AnyKinLinear ElbowPos = {
> > > AnyFixedRefFrame &Ground = Main.Model.GlobalRef;
> > > AnyRefNode &Elbow = Main.Model.Joints.Elbow;
> > > };
> > > MeasureOrganizer = {0}; // Only the x direction
> > > Reaction.Type = {0}; // Don’t provide reaction forces
> > > };
> > > };
> > >
> > > // Study
> > > // -----------------------
> > > AnyBodyStudy Study = {
> > > AnyFolder &Model = Main.Model;
> > > AnyFolder &Drivers = Main.Drivers;
> > > AnyFolder &Kinematics = Main.Kinematics;
> > > RecruitmentSolver = MinMaxOOSolSimplex;
> > > Gravity = {0.0, 0.0, -9.81};
> > >
> > > tEnd = 1;
> > > };
> > >
> > > }; // Main
> > >
> >
>