A Resource and Criticality Aware Cyber-Physical System with Robots for Precision Animal Agriculture