personalrobotics / prpy

Python utilities used by the Personal Robotics Laboratory.
BSD 3-Clause "New" or "Revised" License
62 stars 19 forks source link

Truncate DOF values to 5 decimal places for CHOMP SDF hashing #317

Closed cdellin closed 8 years ago

cdellin commented 8 years ago

Gilwoo found that the tableclearing demo required many different hashed SDFs for HERB, even between the majority of plans in which the right arm is moving, with the left arm in its starting configuration. After some investigation, we found that the values for non-active DOFs were changing very slightly (especially noticeable around zero). This PR snaps the DOF values to the nearest 5th decimal digit (and handles values around zero). This doesn't avoid the general problem of hashing floating point values, but does mitigate it in many cases where non-active configurations are read from decimal-formatted model and configuration files.