I've built a simple simulator using JBox2D, which involves a character built from a collection of bodies and four Revolute Joints. I've run into a problem: I need to restore the 'pose' of this character exactly, given a list of joint angles, joint velocities, and the torso position/rotation/velocity/angular velocity.
There are convenient getters and setters for the state of a body, but I can't find a good way to force the joint angles to where they need to be (moving bodies in the process). A couple solutions on this site recommends setting up a basic feedback system to try to get a joint motor to drive the joint to the desired angle, but this seems like it would be imprecise and possibly compute intensive. I'd ideally like to find a way to just set these values directly.
As a last resort, I could use forward kinematics to calculate all the translations and rotations myself, but maybe there is an easier way.
Any help appreciated. Thanks.