Hi guys!
I'm trying to model a 4-bar mechanism in Opensim. I've already tried the solution that i found in other post about splitting in two half a link, insert the pin joints and connect the two half with a weld constrain.
Unfortunately this doesn't work, it generates an error during the assemble() operation and Opensim automatically relax constrain to build the model. This leads to wrong simulation results and also to ignore the initial speed value.
Anyone have already solved this problem? If so, how?
Thanks,
Luca
4-bar mechanism
- Michael Sherman
- Posts: 812
- Joined: Fri Apr 01, 2005 6:05 pm
Re: 4-bar mechanism
Hi, Luca. One suggestion -- provide initial angles for the 4-bar that gets it somewhere close to assembled. OpenSim won't be able to assemble it successfully from an arbitrarily-distant configuration. The angles should not have to be very precise; just close enough so that it is "downhill" from there to the assembled configuration.
Best regards,
Sherm
Best regards,
Sherm
Re: 4-bar mechanism
Another suggestion is to close the loop with a PointConstraint (4th joint) or a ConstantDistanceConstraint (4th bar), unless it is vital to have four joint angles as states, but I don't see why that would be the case. Then the number of dofs and constraint equations would also be fewer and the assembly may more readily converge from far off coordinate values, and would yield slightly better simulation performance as well.