Skip to content

Convert PCL Point Cloud into Octree representation and perform Collision Detection with FCL

License

Notifications You must be signed in to change notification settings

SplatLearn/collision_detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collision Detector Between Point Cloud and Bounding Box

Build

Install Dependencies

> sudo apt install build-essential libpcl-dev liboctomap-dev libeigen3-dev pybind11-dev libfcl-dev libccd-dev

Build the project using cmake

> mkdir build
> cd build
> cmake ..
> make -j

Usage

The compilation process produces file called pybind_collision_detector.*.so. This file need to be copied to be within PYTHONPATH. Note this file is not portable. It is very specific to the machine architecture and python version.

To use the API from Python:

from nerfgym.pybind_collision_detector import (
    CollisionDetector,
    CollisionDetectorOptions,
)

To detect collision between a point cloud and bounding box:

opt = CollisionDetectorOptions()

# specify parameter of the bounding box
bbox_sides = 1
opt.x_max = bbox_sides / 2
opt.x_min = -bbox_sides / 2
opt.y_max = bbox_sides / 2
opt.y_min = -bbox_sides / 2
opt.z_max = 1
opt.z_min = -0.6
pcd_file = "..."

c = CollisionDetector(pcd_file, opt)

# detect collision specifying x, y, z, roll, pitch, yaw of the bounding box
r = c.detectCollision(x, y, z, roll, pitch, yaw)
if r:
    print("collision detected")

About

Convert PCL Point Cloud into Octree representation and perform Collision Detection with FCL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages