Hi, I’m trying to draw a line between the thumb distal and the index distal. I’m using the following code to get the rigid body positions of the finger joints and use them as the start and end vertices of the line:
rigid_body_states = gym.get_actor_rigid_body_states(env, shadow_handle, gymapi.STATE_POS)
rigid_body_names = gym.get_actor_rigid_body_names(envs, shadow_handles)idx_thumb = rigid_body_names.index(‘thdistal’)
idx_index = rigid_body_names.index(‘ffdistal’)line_p = [
rgd_bd_state[‘pose’][‘p’][idx_thumb][0],
rgd_bd_state[‘pose’][‘p’][idx_thumb][1],
rgd_bd_state[‘pose’][‘p’][idx_thumb][2],
rgd_bd_state[‘pose’][‘p’][idx_index][0],
rgd_bd_state[‘pose’][‘p’][idx_index][1],
rgd_bd_state[‘pose’][‘p’][idx_index][2]
]gym.add_lines(viewer, env, 2, line_p, [1, 0, 0])
But the line seems to not be starting and ending on the actual distal joints:
Is this behavior correct? Is there any way to get the position of the red “parts” of the hand?