Computing local positions

I’m trying to compute local positions of cloned robots for reinforcement learning.
I used ArticulationView.get_local_poses() and successfully got coordinates of body frame.

However, get_local_poses() function is too slow to use training RL agent.
When I used it, fps drops almost 2000 times lower than not used.

Regarding my problem, could you tell me how to use get_local_poses faster or how to calculate it instead ?

Thank you.

Hi @wlgnsqkr0602

The get_local_poses method is not implemented using the PhysX tensor API.
A faster alternative is to get the world position (via RigidPrimView.get_world_pose) and subtract to it the current environment position (self._env_pose: a property defined in the RLTask.set_up_scene method) as follows:

Taken from OIGE’s BallBalance task:

self._balls = RigidPrimView(prim_paths_expr="/World/envs/.*/Ball/ball", name="ball_view", reset_xform_properties=False)
ball_positions, ball_orientations = self._balls.get_world_poses(clone=False)
ball_positions = ball_positions[:, 0:3] - self._env_pos
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.