Hi again, I still have been unable to correctly drive a segment
using positions, I can use the AnyKinEqInterPolDriver with reference
to a joint and drive a segment fine with time and data, but that is
merely controlling the angle,
I used the AnyKinEqInterPolDriver Motion and merely referenced the 2
nodes that i want to measure the postion in and am recieving an
error, i’ll post my simple example below, if you have any thoughts
or a simple example on how to drive a segment using 3 dimensional
data it would be greatly appreciated.
// Todo: Write a small description of your model here
Main = {
// The actual body model goes in this folder
AnyFolder MyModel = {
// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
AnyDrawRefFrame DrwGlobalRef = {
ScaleXYZ = {0.1, 0.1, 0.1};
RGB = {0,1,0};
};
AnyRefNode bla1 = {
sRel = {0,0,0};
};
}; // Global reference frame
AnyFolder Segs = {
AnySeg Alpha ={
r0 = {0.1, 0, 0};
Mass = 2;
Jii = {0.001, 0.01, 0.01};
AnyDrawSeg drw = {};
AnyRefNode base = {
sRel = {-.1,0,0};
};
AnyRefNode end = {
sRel = {.2,0,0};
};
};//alpha
};//segs
AnyFolder Jnts = {
//---------------------------------
AnyRevoluteJoint jntbla = {
Axis = z;
AnyRefNode &basenode = ..GlobalRef.bla1;
AnyRefNode &uppernode = ..Segs.Alpha.base;
};
};//Jnts
AnyFolder Drivers = {
AnyFolder KinematicMeasures = {
AnyKinLinear Pos = {
// These are the nodes that the measure refers to
AnyRefNode &Ground = Main.MyModel.GlobalRef.bla1;
AnyRefNode &UpperArmNode = Main.MyModel.Segs.Alpha.end;
Ref = 0;
};
};//kinematicmeasure
AnyVector Time = { 0,10,20,30,40};
AnyKinEqInterPolDriver Motion = {
AnyKinLinear &bla=.KinematicMeasures.Pos;
MeasureOrganizer = {0,1};
T = .Time;
Type = PiecewiseLinear;
Data = {{0,
.1,
.2,
.3,
.4
}} ;
Reaction.Type = {Off};
};
};
}; // MyModel
// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, -9.81, 0.0};
tEnd = 40;
};
}; // Main