krishauser

krishauser ·

krishauser/Klampt

Velocity limitation of trajectory

howto

There are several methods in klampt.plan.motionplanning which admittedly are not particularly well documented due to some SWIG formatting issues. You can look at the C documentation in Klampt/Python/klampt/src/interpolate.h for some help.

If you would l...

krishauser/Klampt

Set the position of the window in vis.visualization

bug howto

You can resize the window by setting the view width and height (attributes w and h in the object returned from vis.getViewport()). To set the position, you will need to use Qt or GLUT calls on the object accessed by vis.nativeWindow().window. See for examp...

krishauser/Klampt

Extra constraints in motion planner

howto support

IK is your best bet. If you want to keep the end effector position constant between the start and end, you can do it as follows

from klampt import ik
from klampt.math import vectorops

tool_center_point = [0,0,0]  #whatever you want here
local_axis = [1...
krishauser/Klampt

Motion planning: RuntimeError: Start Configuration is infeasible

bug

Ah, the planning_test.py has a bunch of flags at the top of the file to test more complex version of the motion planning functions, and these were set to 1 in the committed version. They should be set to 0. If you git pull, the most recent planning_tes...

krishauser/Klampt

Motion planning: RuntimeError: Start Configuration is infeasible

bug

That's strange. Can you try setting DO_SIMPLIFY=0 at the top and wrapping plan.setEndpoints(...) in a try/catch block as follows:

try:
    plan.setEndpoints(configs[i],configs[i+1])
 except RuntimeError:
    #one of the configurations must be infeasible
 ...
krishauser/Klampt

Motion planning: RuntimeError: Start Configuration is infeasible

bug

Typically this is caused by your URDF having some self collisions at the zero configuration. I suggest building the RobotTest app, then opening your URDF. If you check the “Self Collisions” box it will highlight self colliding links in red. You can also pr...

krishauser/Klampt

Klampt symbolic module capabilities

Yes, you can use the exprFromStr function in klampt.math.symbolic_io.

ctx = symbolic.Context()
ctx.addVar('x')
expr = symbolic_io.exprFromStr(ctx,'cos(x**2)')
print(expr.evalf({'x':3.0})  #prints -0.9111302618846769

There are no system solving functions,...

krishauser/Klampt

Is it possible to get TCP position if manipulator joint values are known? (Repost from Git Issues)

These would be the tool coordinates in the local frame of the end effector. (Default would be 0,0,0)

krishauser/Klampt

how to use klampt to control a simple robot arm (in python)

It has taken a long time for us to get here, but we finally have a good solution for this in Klampt 0.9. The now provides a uniform interface to controlling robots. If you write a small amount of driver code, you can run the Klampt-examples demos kbdr...

krishauser/Klampt

how to convert 3d volumetric grid into a world?

To use this as an obstacle geometry, you could create a VolumeGrid with a 1 where the obstacles exist, and a -1 where they do not. Then, you could call

grid_geometry = Geometry3D(grid)

then set up a collision detection subroutine that checks collision ...

krishauser/Klampt

how to do path planning in 3d numpy array?

You would need to subclass the CSpace class and implement the feasible(q), bound, and eps members. See the docs here for more information.

The feasible(q) callback is the essential function to determine whether a point q=[x,y,z] is in collision or not. In...

krishauser/Klampt

Is it possible to get TCP position if manipulator joint values are known? (Repost from Git Issues)

Yes, it just takes a few lines of code.

from klampt import *
from klampt.math import so3

#setup
world = WorldModel()
world.loadFile("myrobot.urdf")
robot = world.robot(0)

#query
endEffectorLink = robot.link(robot.numLinks()-1)
robot.setConfig(joints)
x,...
krishauser/Klampt

Solve inverse kinematics for end effector link with fixed orientation

Yes, please take a look at this function:

You could also pass a list of two points to ik.objective in the local and world arguments.

krishauser/Klampt

Segmentation Fault When Using Python 3

bug

This looks like a problem with whatever version of Assimp you have installed on your machine, but I've never seen the issue before. Could you report the version of your OS and your Assimp library?

The latest version of Klamp't (0.8.5) is built with the la...

krishauser/Klampt

Segmentation Fault When Using Python 3

bug

When segmentation faults occur, the best output you can provide to help diagnose the problem is to use gdb to get a stack trace.

  1. Install gdb (eg through apt-get)
  2. Run “gdb python“
  3. At the prompt, enter “run test.py”
  4. At the crash, enter “backtr...
krishauser/Klampt

Getting error when using the resounce module

Weird, this doesn't happen on my end, but there are some people who have the same problem with other X11 code. Can you

  1. give the sequence of items that pop up, and how you close them,
  2. post the full console output that causes the crash?

Does this ha...

krishauser/Klampt

negative Signed distance

The complexity and availability of signed distances depends very much on the geometry types. The most recent pythondocs.klampt.org documentation should provide up to date information on the availability.

As for point-cloud distances, these are indeed some...

krishauser/Klampt

Getting error when using the resounce module

Oops, more bugs I introduced. should be fixed now by git pulling master (or devel).

krishauser/Klampt

Avoid inverse kinematics and only simulate end-effector

howto

Yes, it is possible. If you create a robot model file (URDF or ROB) that just contains the gripper as a fixed object, you can use the utility klampt.model.create.moving_base_robot.make function to create a floating-base gripper model. Its first 6 DOF are...

krishauser/Klampt

negative Signed distance

There are some geometry types that support penetration depth estimation. Namely, primitive-primitive, volume grid-primitive, and volume grid-point cloud.

Penetration depth estimation between meshes is not (yet?) supported in Python. There are some approxi...

krishauser/Klampt

Klampt Simulation Mode Error

Ah, no there is no other way to do so at the moment.

Looking into your original error, the problem is the mass = 0 link (specifically, links 0 and 1). Try setting them to some small positive value in the .rob file.

krishauser/Klampt

capability for closed chains?

There is support for closed-chain kinematics, but it's not (yet?) in the dynamics API. This is not automatic, however, and getting closed-chain kinematics requires setting up one or more link-to-link inverse kinematics constraints and solving them as you...

krishauser/Klampt

Klampt Simulation Mode Error

It looks like the .rob model that you're using is not suitable for physics simulation since it has several zero-mass links. As a workaround, if you just want to get sensor data and don't care so much about the physics, you can use the sensor.kinematicSimul...

krishauser/Klampt

Installation

howto

First, please understand that Klampt is not an “app” but is rather a robot development library and toolkit. You will need to have a reasonable idea of what you’d like to use it for (run a simulation, control a robot, measure the quality of designs) in ...