Hello Søren,
Thanks for the code. Yes, this is what I wanted to do.
Another Question:
In Repository5,Repository.5\ARep\Aalborg\WheelTurn\WheelTurn.Main.any,
there is a comment like this:
//
// This study is for dumping load-time positions for applications
with other
// initial conditions. The idea is that if the initial conditions
are too
// different from the load-time positions, then the system may not
be able
// to asemble the model. Here’s what you must do:
// 1. Introduce drivers into this model that move it close to the
desired
// position.
// 2. Run the PosStudy.
// 3. Copy all the position and rotation vectors from the message window
// to the clipboard.
// 4. Paste them into the InitialPositions.any file and change the
// underscores to dots.
// 5. Load the new model. The initial positions re now identical to the
// dumped positions.
//
// Comment this study out if you don’t need it. It saves quite a bit of
// memory
I made the wheel now turn in a axis different from the global frame
following the sample code you uploaded. However, when I ran the code,
it gave bunch of error saying the initial constraints are not
satisfied. To list a fews:
…
Constraint no. 165 above error tolerance 0.000001, error = 0.494042. -
constr. #0 in
‘Main.Model.ModelEnvironmentConnection.Joints.HandRest.Constraints’
Constraint no. 166 above error tolerance 0.000001, error = 0.028448. -
constr. #1 in
‘Main.Model.ModelEnvironmentConnection.Joints.HandRest.Constraints’
Constraint no. 167 above error tolerance 0.000001, error = 0.021148. -
constr. #2 in
‘Main.Model.ModelEnvironmentConnection.Joints.HandRest.Constraints’
ERROR : C:\Program Files\AnyBody
Technology\AnyBody.2.0.0\Repository.5\ARep\Aalborg\WheelTurnLee\WheelTurn.Main.a
ny(100)
: PosDumperStudy : Kinematic analysis failed in time step 0.
I guess the problem is that the initial position does not meet the
constraints (The hand is now off the wheel because the wheel is tilted
by some degree). I tried to follow the commented line in the
code(given above)to fix the problem but failed.
Can you explain what should I do to set the initial position right?
Any insights to this problem are greatly appreciated (show me an
example, point me to some reference which will clearify the problem,
etc).
Thanks a lot.
Thanks,
Leng-Feng
– In anyscript@yahoogroups.com, “AnyBody Support” <support@…> wrote:
>
> Hi Leng-Feng
>
> I have created a small model and uploaded it to the file section it
> is named “RevoluteJointDefinition.any”.
>
> The model creates a revolute joint between a rotated node on the
> fixed reference frame and the segment, it works fine.
>
> I am a little unsure what went wrong when you say it did not work,
> so i hope this is what you have been trying to do, otherwise please
> let me known.
>
> Best regards
> Søren, AnyBody Support
>
> — In anyscript@yahoogroups.com, “Leng-Feng Lee” <lengfenglee@>
> wrote:
> >
> > Hello,
> >
> > I am creating a model which required me to place a revolute joint
> that
> > is not parallel to the x,y,z of the golbal reference frame. It is,
> > say, 30deg +ve rotation w.r.t the z-axis on the global reference
> frame.
> >
> > A revolute joint need two nodes to connect to each other, this
> means I
> > need to have on node place on the body that is moving in global
> > reference and another place on the rotated fix frame.
> >
> > I created the following definition:
> >
> > ------------------------------------------
> > AnyFixedRefFrame GlobalRef = {
> >
> > #include “drawcoorsystem.any”
> >
> > AnyFixedRefFrame WheelRef = {
> > Axes = RotMat(-60*pi/180,z);
> >
> > AnyRefNode steering = {
> > sRel = xxxxxxx
> > };
> >
> > }; // End WheelRef
> > ---------------------------------------------
> >
> > so that when I define the axis of rotation, I can use the wheelRef
> as
> > my axis of rotation.
> >
> > Apparently, this don’t work.
> >
> > I tried to see all the examples codes and model, and I found that
> the
> > axis of rotation are all define with respect to the global
> reference
> > frame (I guess the developer of those model tried to arrange the
> axis
> > of rotation along with one of the global reference frame?).
> >
> > I learn this script only 3 days. I hope someone here can point out
> the
> > direction for me. Maybe this is just a simple question for all of
> the
> > expert script writter here…=)
> >
> > Thanks a lot!!
> >
> > LengFeng
> >
>