def get(self, state):
"""
Get the FK
:param state: RobotState message to get the forward kinematics for
:return: [[x, y, z], [x, y, z, w]]
"""
if isinstance(state, RobotState):
state = state.joint_state
elif not isinstance(state, JointState):
raise TypeError('ros.FK.get only accepts RS or JS, got {}'.format(type(state)))
return self._fk.get([state.position[state.name.index(joint)] for joint in self.joints])
评论列表
文章目录