personalrobotics / prpy

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

Reuse postprocessing environments in a safer way. #286

Closed psigen closed 8 years ago

psigen commented 8 years ago

This should be merged after #278.

The previous implementation of PostProcessPath could potentially generate unbounded numbers of environments, as it could generate a new robot instance every time we cloned into the same environment. (This was still better than the original implementation, which always created a new environment.)

Here, we keep a module-level mapping from environments to postprocessing environments and create them on demand, which guarantees that each cloned environment will have at most one postprocessing environment.

mkoval commented 8 years ago

:+1: @psigen explained this in person. I'm not thrilled about using a module-level variable for this, but I don't see any alternative. :sweat: