Changed code to allow for a robot's DOF to be specified in a .yaml file