Kris' Locomotion and Manipulation Planning Toolbox (Klamp't)

Kris Hauser, Jingru Luo

Klamp't (Kris' Locomotion and Manipulation Planning Toolbox) is an open source, cross-platform software package for modeling, simulating, and planning for complex robots, particularly for manipulation and locomotion tasks.

It has been developed at Indiana University since 2009 primarily as a research platform, and has been used in classrooms beginning in 2013. It has been used by members of Team DRC-Hubo in the DARPA Robotics Challenge primarily on the ladder climbing task.


  • Supports legged and fixed-based robots.
  • Built in models NASA ATHLETE, Rethink Robotics Baxter, AIST HRP-2, Willow Garage PR2, KAIST Hubo-II+, Robonaut 2, Staubli TX90, Puma 760, Robotiq Adaptive Gripper.
  • Forward and inverse kinematics, forward and inverse dynamics
  • Contact mechanics computations: force closure, support polygons, stability of rigid bodies and actuated robots
  • Keyframe poser and path editor
  • Robust rigid body simulation with triangle mesh / triangle mesh collisions.
  • Simulation of PID controlled, torque controlled, and velocity controlled motors.
  • Simulation of various sensors including gyroscopes, force/torque sensors, and accelerometers. (Vision / depth sensors not yet supported)
  • ROS bindings available.
  • Many sampling-based motion planners implemented.
  • Motion planning on constrained manifolds.
  • Fast trajectory optimization routines.
  • Real-time motion planning routines.
  • Planning models are fully decoupled from simulation models, which helps simulate uncertainty.

Current version: 0.6.2

Languages: C++ and Python

Supported platforms: *nix environments, Windows, Mac OSX, and Windows through Cygwin.

What's new?

Version 0.6.2 introduces:

  • An adaptive time-stepping technique means simulation of mesh-mesh contact is even more robust, allowing the simulator to handle fast moving objects and high forces.
  • ROS bindings for reading/saving transforms, loading paths, point cloud data, etc.
  • Native support for point cloud geometries loaded from ROS PointCloud2 topics.
  • Better geometry loader. Materials are now read, and objects that share the same geometry do not re-load from disk.
  • Improved visuals, with antialiasing and slightly faster rendering.
  • Robot, object, and world duplication is now effortless.
  • New convenience routines in Python for local/global IK solving, visualizing worlds and coordinates, editing resources, and a transform manager.
  • Many bug fixes.


Klamp't uses a robust contact generation scheme for mesh-mesh contact

Wheel turning on the PR2. Motion courtesy of Dmitry Berenson at WPI. Compare with the real robot.

Staubli TX90 throwing a block

Hubo-II+ walking on flat ground

Hubo-II+ being tipped over on uneven ground

Hubo-II+ climbing a ladder

Hubo-II+ switching feet, demonstrating force-torque sensing capabilities. Motion courtesy of Andy Park at Purdue University

Comparison of Klampt's contact generation method against the GIMPACT method used in ODE / Bullet

Downloading and Installing Klamp't

Building from source

Please follow the instructions for your system in the Install Klamp't tutorial or the Klamp't manual.

Precompiled binaries

Linux (64 bit) (up to date as of 1/8/2016)

Windows (32 bit) (up to date as of 3/4/2016). You must install the x86 Visual Studio 2015 Runtime.

To compile your own C++ programs under Windows, you will need to 1) compile Boost, 2) clone Klampt and KrisLibrary from git, then 3) unpack the correct precompiled dependency libraries to the Klampt/Library folder:

To recompile the Klamp't Python bindings, you will need to get the dependencies above and then download and edit the following file



Frequently Asked Questions

  1. How does Klamp't compare to other simulators / programming environments (like ROS, RAVE, Webots, etc)?

    The short answer: Klamp't specializes in robots with contact.

    Unlike ROS, Klamp't is not an architecture for sensing and control on distributed hardware. Klamp't provides tools for modeling, planning, and simulation of robots with contact that are intended primarily for research and rapid prototyping. Klamp't comes with ROS bindings for its simulator and for reading point clouds. Klamp't is more cross-platform and lighter weight.

    OpenRAVE is a similar library developed at CMU concurrently with Klamp't, but with a stronger focus on manipulation problems. OpenRAVE does not support legged robots. Moreover, simulation in OpenRAVE is often conflated with modeling and planning, whereas in Klamp't they are fully decoupled. Klamp't is also lighter-weight.

    Klamp't differs from other robot simulators (e.g., Gazebo, Webots, V-REP) because it has better collision handling that lets it handle complex contact phenomena between unstructured meshes and even point clouds. Other simulators typically require a robot and its environment to be composed of simple geometric primitives or convex polyhedra, while Klamp't works well with polygon soup or point clouds directly from a CAD program or a depth scanner. Other simulators typically have better visualizations and sensor simulation capabilities. Klamp't ignores the bells and whistles and focuses on stable, robust contact.

  2. I'm a robotics newbie, where should I start?

    Most beginners should start learning the Python API. Exercises from an introductory graduate course on robotics are provided in the Python/exercises folder which will help you become more familiar with 3D transformations, configuration spaces, feedback control, and motion planning.

  3. How do I import my robot?

    Klamp't uses a proprietary, simple ASCII format for defining robots (.rob files) and can also read from the URDF file format.

    However, for simulation, Klamp't will need some special motor parameters (servoP, servoI, servoD, dryFriction, viscousFriction) that are not present in the URDF format. There are two ways of accomplishing this: 1) use the URDFtoRob program and then edit the generated parameters in the .rob file, or 2) add the special klampt XML tag in the URDF. More details on this procedure can be found in Section 5.13 in the manual or the robot import tutorial.

    Some tips for successful URDFtoRob importing:

    • URDF contains separate visualization / collision geometry per link while Klamp't only uses a single geometry. To switch, toggle the useVisGeom setting in urdftorob.settings, or use_vis_geom attribute in the <klampt> URDF element.
    • If imported meshes looks strange, try setting the flipYZ flag to true in urdftorob.settings, or the flip_yz attribute in the <klampt> URDF element.
    • The mesh import/export paths can be set using urdftorob.settings or the package_root element in the <klampt> URDF element.
    • To avoid converting geometry to the native .tri format, set outputGeometryExtension to the empty string ("") in urdftorob.settings.
    • Dummy URDF links can safely be set to have 0 mass and inertia in the exported robot file. Zero-mass dummy links will not affect the simulation as long as they are fixed to a link with mass. You may also add the <link name="[link name]" physical="0"/> tag under the <klampt> element in the URDF file.
    • For trajectory optimization (including point-to-point motions via the manual posing widget in SimTest), it is important to set reasonable velocity and acceleration limits in the exported robot file.
    • Editing large .rob files is easiest in a spreadsheet program.
  4. How do I choose good motor constants for my robot simulation?

    This can be done by hand by tuning and "exercising" the robot in simulation. An automatic solution is given by the MotorCalibrate program, which will optimize the constants to match a dataset of sensed and commanded joint angles that you record while exercising the physical robot. Please consult its documentation for more details, and you may run ./MotorCalibrate Examples/motorcalibrate_baxter.settings as an example..

  5. How can I make the simulator faster?

    Simulation speed depends on several factors, including the number of rigid bodies, the complexity of the mesh geometry, and the complexity of contacting regions. Small robots with simple meshes may be simulated in super-real-time, while complex robots with very complex meshes might be 100x slower than real-time.

    Usually, the bottleneck is contact generation and reponse, and its cost can be reduced by simplifying the mesh geometry using a 3D modeling program (e.g., Blender), or by reducing the value of the contact clustering parameter, maxContacts.

  6. How can I test my robot's controller using the simulation tools in Klamp't?

    Klamp't can be used for simulation testing of robot behaviors in a variety of ways.

    Testing open-loop paths is straightforward: simply run the SimTest program with the starting robot state and the path as described in the tutorials.

    Testing feedback controllers usually requires writing a bit of "glue code" that translates native robot commands to Klamp't simulator commands, and translates Klamp't sensor data to native robot data. This is possible when robots have relatively straightforward actuators (e.g., PID controlled motors) and sensors of the built-in types. The easiest interface for doing so is the Python API. See Python/control/ for more details, and see Python/control/ as an example that translates to and from ROS messages.

    To use the ROS bindings, see the tutorial.

    If your robot uses more complex actuators and sensors, these must be emulated in the simulation loop. Essentially, the emulator should duplicate the robot's communication protocols, actuator behavior, and sensors in simulation. You are responsible for providing such an emulation layer on top of Klamp't.

  7. How can I use Klamp't planning tools on my robot?

    Klamp't planners and utilities must be incorporated into your robot's software environment via a bit of "glue code".

    For example, a controller may invoke a Klamp't planner when it needs a new path. The planner reads in the robot state and environment and uses Klamp't subroutines to generate a path. A path can be serialized using the simple Linear Path format (an ASCII file containing lines of time / milestone pairs). The controller can read the paths and send them to the robot using your desired communication protocol.

    Direct robot control can be achieved using a mechanism in Interface/UserInterface.h, employed in the UserTrials program. These interfaces read in user input, call a real-time planner, and then send the resulting path to a MotionQueueInterface object. In UserTrials, the interface sends the path to a simulated robot. But by overloading the MotionQueueInterface class with a custom subclass that communicates with your robot, you can control your robot directly. (We have code available for Staubli 6DOF robots, please contact us if you are interested.)

  8. How should I get help using Klamp't?

    Please subscribe to the Klamp't Google group and use the forum and/or mailing list.

  9. How should I acknowledge Klamp't in my publications?

    For the Klamp't simulator, please cite K. Hauser. Robust Contact Generation for Robot Simulation with Unstructured Meshes. International Symposium on Robotics Research, December 2013.

    For the trajectory time-scaling subroutines, please cite K. Hauser. Fast Interpolation and Time-Optimization on Implicit Contact Submanifolds. In proceedings of Robotics: Science and Systems (RSS), Berlin, Germany, June 2013.

    For general usage, please cite the Klamp't manual.