An FPGA-based controller for collaborative robotics