RTOS based embedded controller implementation of a bilateral control system