A lightweight package to use FCL with ROS messages (heavily inspired by MoveIt's version).
The package can be utilised to perform distance and collision checking of objects by creating a class and maintaining a collision world, or by using utility functions that are free of any class. This package can handle objects represented as shape_msgs, OctoMaps, and VoxelGrids.
This package requires:
FCL and libccd-dev
may already be installed on your machine via your ROS distro, but these versions are likely outdated for the current repository's use. The following instructions will enable you to build the robot_collision_checking
package within a ROS 2 workspace using colcon build
(or catkin build
if using ROS 1).
Please ensure this option is enabled, when compiling:
-DENABLE_DOUBLE_PRECISION=ON
- git clone https://github.com/danfis/libccd.git
- mkdir build && cd build
- cmake -G "Unix Makefiles" -DENABLE_DOUBLE_PRECISION=ON ..
- make
- sudo make install
- git clone https://github.com/flexible-collision-library/fcl.git
- mkdir build && cd build
- cmake ..
- make
- sudo make install
If there are errors, such as constants not being found, then you are probably still using the older version of FCL.
You can run tests for the robot_collision_checking
package as described in this ROS 2 tutorial. First compile the tests:
colcon test --ctest-args tests
And then examine the results:
colcon test-result --all --verbose