fixed warning in simulate and xrange->range for py3x in get_joints