SLOOP (An example project for controlling a circular loop mechanism using GEAR)

 You can control the circular loop robot on the seesaw by guiding its center of mass using mouse drags. Internally, the control interface system converts the user's input into an appropriate joint input command (in this case, the loop joint accelerations) for driving physics simulation running under the system. For more detail about the control, see my paper "Direct Control of Simulated Non-human Characters". My C++ library GEAR (included in the download package) was used to implement the control algorithm, which requires (analytic) derivatives of the dynamics equations of the articulated rigid body system, and to drive the physics simulation.

A circular loop mechanism controlled by mouse drag     demo

Source Code Download: (0.3MB)
(Note: The code may be too scattered around because this is a scaled-down version of a larger project for the specific example.)

Compiling and Running:
To start the simulation, click left mouse button while pressing shift key. During the simulation, a red ball appears at the cursor position and it is used as the target position of the circular robot's center of mass in the control algorithm. Move the red ball by dragging the mouse cursor to control the robot. To pause the simulation, release the mouse button. To replay the simulated motion or pause the replay, press space key. You can also use the slider bar at the bottom of the screen for navigation.

Related Projects: