Visual Perception for Humanoid Robots: Environmental Recognition and Localization, from Sensor Signals to Reliable 6D Poses