A Signed Distance Field (SDF) file is used for collision avoidance and can be loaded in to any algorithm from the /sdf
directory, by passing its filename in the problem file. The Problem
class create a GPMP2 SignedDistanceField
object by reading it with the loadSDF()
or readSDFvolfile()
function.
For any of your environments you can create your own SDF file with any of the following options:
- Matlab: A Matlab wrapper is already included with GPMP2. Create your environment (occupancy grid) in Matlab and then generate a SDF by following this example.
- OpenRAVE: The GPMP2 OpenRAVE plugin - orgpmp2 can be used to create a SDF. First create your environment with a
.xml
file and then follow this example. If you are using only the arm on a mobile manipulator make sure to keep the body of the robot minus the arm in the environment when generating the SDF. - Real sensor data: You can write you own library to map an environment with real sensor data (LIDAR, camera, etc) and create an occupancy grid. Then convert that to the
SignedDistanceField
data type and save it using thesaveSDF()
function. A similar process is described in the STEAP publication (see section IV D).