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.
Source Code Download: sloop-r13.zip (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:
Windows (Prerequisites: CMAKE and Visual Studio must be installed.)
Extract the zipped source code to a folder.
Double-click runcmake_win.bat to create 'build' for Visual Studio.
Open 'build/sloop.sln' in Visual Studio.
Select 'Release' mode and press 'F7' for building solution.
Run 'build/Release/sloop.exe'.
Linux (Tested with Ubuntu)
Extract the zipped source code to a directory and move in to the directory.
>> make install_dependencies_ubuntu (for installing necessary prerequisites such as cmake and freeglut)
>> make (for compiling the source code)
>> ./sloop (to run sloop)
Usage: 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: