A GPU-accelerated inverse kinematics solver built on GRiD.
- NVIDIA GPU + CUDA Toolkit 12.x
- Python ≥ 3.9
- CMake ≥ 3.23
- Visual Studio 2022 (Windows) or GCC/Clang (Linux)
git clone --recurse-submodules https://github.com/A2R-Lab/HJCD-IK.git
cd HJCD-IKYou can install hjcdik with pip on Python ≥ 3.9:
python -m pip install -U pip
python -m pip install -e .After installation, configure an initial GRiD header file for the robot:
cd external/GRiD
python generateGRiD.py /path/to/urdf
cd ../..For testing we provide panda and fetch urdf files in include/test_urdf.
Once initializing a GRiD header file, run:
python benchmarks/ik_benchmark.py --skip-grid-codegenTo run the Panda Arm benchmark on batch sizes of 1,10,100,1000,2000. Results are written to a results.yml file.
--num-targets <int>- How many target poses to sample. Default:
100
- How many target poses to sample. Default:
--batches "<list>"- Batch sizes to test (comma or space separated). Default:
"1,10,100,1000,2000"
- Batch sizes to test (comma or space separated). Default:
--num-solutions <int>- How many IK solutions to return per call. Default:
1
- How many IK solutions to return per call. Default:
--yaml-out <path>- Output result file. Default:
results.yml
- Output result file. Default:
--urdf <path>- URDF path used if running GRiD codegen. Default:
include/test_urdf/panda.urdf
- URDF path used if running GRiD codegen. Default:
--skip-grid-codegen- Skips creating GRiD header file and immediately runs benchmarks. Default: off
--seed <int>- Seed for target sampling. Default:
0
- Seed for target sampling. Default:
- Custom batches/targets/solutions, write a custom file:
python benchmarks/ik_benchmark.py \
--batches "1,32,256,2048" \
--num-targets 250 \
--num-solutions 4 \
--yaml-out results.yml \
--skip-grid-codegen- Run with GRiD code-gen using specific URDF:
python benchmarks/ik_benchmark.py --urdf include/test_urdf/panda.urdf