A Unified Architecture for Physical and Ergonomic Human–Robot Collaboration