Two police officers and a maintenance worker were taken to the hospital Thursday after a homemade "bug bomb" was set off inside a Plainville apartment.