Skip to content

Configuration Space Distance Fields for Manipulation Planning

Notifications You must be signed in to change notification settings

yimingli1998/cdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Python version: 3.8 (Tested)
  • Pytorch version:1.13.0 (Tested)
  • Install necessary packages
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

  • We provide pretrained neural CDF model at 'model_dict.pt' and precomputed data 'data.pt' for franka emika panda robot.

  • Examples for data generation and neural network training can be found at 'data_generator.py' and 'nn_cdf.py'.

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) 2023 Idiap Research Institute [email protected]

About

Configuration Space Distance Fields for Manipulation Planning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages