Flexible Attention-Based Cognitive Architecture For Robots