Spatial Vectors in Python
Posted: Wed Aug 07, 2024 1:48 pm
Hello everyone!
I am writing to ask about the use of Spatial Vectors in Python. Specifically, I am trying to calculate Coriolis forces using the following function:
Vector calcCoriolis(const State& s, const Model& model) {
Vector c;
model.getMatterSubsystem().calcResidualForceIgnoringConstraints(
s, Vector(0), Vector_<SpatialVec>(0), Vector(0), c);
return c;
}
My problem is that I am not able to correctly define the SpatialVec in Python. I am defining the Vector(0) as opensim.Vec3(0).
I would be very grateful if someone could give me a hand with this.
I am writing to ask about the use of Spatial Vectors in Python. Specifically, I am trying to calculate Coriolis forces using the following function:
Vector calcCoriolis(const State& s, const Model& model) {
Vector c;
model.getMatterSubsystem().calcResidualForceIgnoringConstraints(
s, Vector(0), Vector_<SpatialVec>(0), Vector(0), c);
return c;
}
My problem is that I am not able to correctly define the SpatialVec in Python. I am defining the Vector(0) as opensim.Vec3(0).
I would be very grateful if someone could give me a hand with this.