The rower is sitting on a movable seat and his single feet is fixed to the stretcher.
The rower can now use his (upper, lower) legs to propel the boat. Both seat (via SliderJoint) and stretcher (via WeldJoint) are connected to the boat so we have a closed kinematic chain.
I tried to solve this as follows, using a PointConstraint:
Code: Select all
hip1Joint = osim.PinJoint("hip1Joint",
seat,
osim.Vec3(0, seatHeight/2, 0),
osim.Vec3(0, 0, 0),
upper,
osim.Vec3(0, -ulegl/2, 0),
osim.Vec3(0, 0, 0))
bbaan.addJoint(hip1Joint)
coord = hip1Joint.updCoordinate()
coord.setName('hip1angle')
coord.setRangeMin(-0.3)
coord.setRangeMax(pi/2)
coord.setDefaultValue(pi/2)
kneeJoint = osim.PinJoint("knee_Joint",
upper,
osim.Vec3(0, ulegl/2, 0),
osim.Vec3(0, 0, 0),
lower,
osim.Vec3(0, llegl/2, 0),
osim.Vec3(0, 0, 0))
bbaan.addJoint(kneeJoint)
coord = kneeJoint.updCoordinate()
coord.setName('kneeangle')
coord.setRangeMin(-pi)
coord.setRangeMax(-0.2)
coord.setDefaultValue(-pi)
legtostretcher = osim.PointConstraint(lower, osim.Vec3(0,llegl/2,0), stretcher, osim.Vec3(0,seatHeight/2,0))
The default values are such that the rower has his feet completely stretched.
See the image kinematic.png in the url above where you can see the "leg" on the boat in the stretched position.
But if I change a joint you see that the upperleg (the reddish cylinder) is not connected to the seat at all!
I would have hoped that by moving the stretcher the knee would bend.
Am I missing something?
Thanks in advance, Sietse
UPDATE: OOPS, I forgot to addContraint(legtostretcher)