getting joint names and calculating the number of actuated joints