Hi Tilak
I will try to explain
The script below creates a new driver for the neck joint by making a
reference to an already existing revolutejoint.
The name T12L1Joint is only used internally in this driver, you are
free to choose any name here, typically i would just write “ref”
because this is a reference, and in case i needed to make references
to more objects i would use ref1, ref2 … but the user is free to
choose.
AnyKinEqSimpleDriver NeckJntDriver = {
AnyRevoluteJoint &T12L1Joint
=Main.Model.HumanModel.Interface.Trunk.NeckJnt;
DriverPos = {0};
DriverVel = {0};
Reaction.Type = {1};
};
The reason why it write
> T12L1Joint : Unresolved object
for the script above is that it can not find the object that the
reference T12L1Joint is pointing at, if the reference had been named
Ref the error would have been “Ref : Unresolved object”
The error is that the reference is not correct so it can not be
found it should be
AnyRevoluteJoint
&T12L1Joint=Main.Model.HumanModel.Interface.Trunk.NeckJoint;
this i found out by looking for the neckjoint in the model tree.
Here are some more comments:
> And I don’t understand how the line you suggest should work.
> > AnyKinMeasureOrg &Ref1
= …HumanModel.Interface.Trunk.NeckJnt;
>
> Why are we creating an AnyKinMeasureOrg object?
Here we are not creating a AnyKinMeasureOrg object we are making a
reference to it, and you are right it should have been a
revoultejoint. The script would load with such an error but it would
throw a warning saying that Ref1 is constructed as a
AnyKinMeasureOrg and pointing at a revolute joint.
You can learn more about references in the tutorial “Advanced script
features” lesson 1, by following the link below
http://www.anybodytech.com/60.0.html
Best regards
AnyBody Support
— In anyscript@yahoogroups.com, tilak.dutta@u… wrote:
>
> Thanks for the lesson on dealing with unresolved objects.
>
> I tried a number of things including your suggestion but haven’t
quite gotten it
> to work.
>
> I see now why the line I had (below) was wrong.
> > AnyRevoluteJoint &T12L1Joint = .ref.JointsLumbar.NeckJnt;
>
> But were there actually 2 problems then? The first was the
reference to the
> folder containing the NeckJnt was wrong, but also the reference to
the
> AnyRevoluteJoint was wrong? I’m not sure I understand
why “AnyRevoluteJoint
> &T12L1Joint” is wrong. Aren’t we defining a new AnyRevoluteJoint
that will be
> called T12L1Joint? (In which case the program shouldn’t care that
it doesn’t
> exist yet).
>
> And I don’t understand how the line you suggest should work.
> > AnyKinMeasureOrg &Ref1
= …HumanModel.Interface.Trunk.NeckJnt;
>
> Why are we creating an AnyKinMeasureOrg object?
>
> In any case when I inserted the above code into the NeckJntDriver
folder, it
> tells me Ref1 is not recognized:
>
> Ref1 : Unresolved object.
>
> Again, why is it complaining about this when I’m creating a new
reference!?
>
> Perhaps I put it in the wrong place? Here’s how the code looked in
the
> JointAndDrivers.any file:
>
> AnyKinEqSimpleDriver NeckJntDriver = {
>
> AnyKinMeasureOrg &Ref1 = …HumanModel.Interface.Trunk.NeckJnt;
> DriverPos = {0};
> DriverVel = {0};
> Reaction.Type = {1};
> };
>
> By the way, I would think the correct code should be something
like:
>
> AnyRevoluteJoint &T12L1Joint =
Main.Model.HumanModel.Interface.Trunk.NeckJnt;
>
> Here’s how I typed it in the JointsAndDrivers.any file
>
> AnyKinEqSimpleDriver NeckJntDriver = {
> AnyRevoluteJoint &T12L1Joint
=Main.Model.HumanModel.Interface.Trunk.NeckJnt;
> DriverPos = {0};
> DriverVel = {0};
> Reaction.Type = {1};
> };
>
> When I typed this in, the T12L1Joint is not recognized:
>
> T12L1Joint : Unresolved object
>
> Anyway, I’m hoping you may be able to shed some light. Thanks!
> Tilak
>