This is actually an older project, but I think it deserves some love on the blog. I custom cut a piece of wood to act as a spacer and prevent the trash can from hitting the wall.
To my consternation, most people had trouble operating the pedal without kicking the can into the wall. This thing solves the problem and has single handedly lowered my blood pressure 40 points. I recommend something similar for anyone with a foot-operated trash can.