Learning perception and control from rich interactions