Intuitive Programming, Adaptive Task Planning, and Dynamic Role Allocation in Human-Robot Collaboration