yimingli1998 / cdf

Configuration Space Distance Fields for Manipulation Planning
MIT License
32 stars 1 forks source link

Code for paper "Configuration Space Distance Fields for Manipulation Planning" (RSS 2024)

[Paper][Project]

CDF is a differentiable robot representation. It is a function d=f(p,q) where p is the spatial point and q is the joint configuration. DIfferent from SDF that indicates the distance from p to the robot surface defined by q, CDF uses the distance in radians, corresponding to the minimal joint motion required by the robot to contact with the point. Therefore, the distance is evenly spanned in joint space and the gradient points against to the point consistently, and we can solve the inverse kinematics problem through one-step gradient projection without the requirement of iterations.

Dependencies

pip install -r requirements.txt

2D examples

Run

python cdf.py

to see the main difference between SDFs and CDF.

You can also replace the line

plot_fig1(scene_1)

with

plot_projection(scene_2)

to see how gradient projection works in solving inverse kinematics in one-step without iterations.

7 axis Franka robot experiments

Note: Many funtions require the RDF library (such as offline data generation, comparison with SDFs). You can run

git clone https://github.com/yimingli1998/RDF.git

and put it in the same folder with CDF.

Run

python mp_ik.py

to see the gradient projection works on the robot.

Run

python throw_wik.py 

to see the goalkeeper experiment in simulation.

Run

python wik_eval.py 

to evalute the whole-body inverse kinematics and compare it with baseline approaches.

For motion planning, you can run

python qp_mp.py 

to see a simple example that uses a reactive QP controller for collision avoidance. this example is in a static scene but it also works for moving objects.


CDF is maintained by Yiming LI and licensed under the MIT License.

Copyright (c) 2024 Idiap Research Institute contact@idiap.ch