The constructor of MarkerDetector sets the "_doErosion" property to false, but all other parameters are initialized to the equivalent of speed=0.
Additionally, while calling setDesiredSpeed(0) does set erosion=true, calling it with 2 as a parameter doesn't set it back to false. This seems inconsistent.
The description of "enableErosion(bool)" is also wrong. It states the "... default is enabled", but the default is actually "false" (see above).