isaac-sim/IsaacGymEnvs

Problem Getting contact info for all envs

Opened this issue · 1 comments

Hi,

I'm trying to calculate the ZMP point for a humanoid, Talos, within Isaac Gym. My approach? Leveraging contact information for the task. Initially, I turned to the gym.get_env_rigid_contacts() function, and it did the job, returning all those crucial contact points within the environment. But then, when I called upon gym.get_rigid_contacts(), expecting it to work across the entire environment, I got nothing. Now, I'm faced with the less-than-ideal prospect of iterating through each environment individually to calculate those ZMP points. Not exactly the efficiency I had hoped for. I wonder if you have any idea how to solve this issue.

On another note, I could use a bit of clarity regarding the definitions of localPos0 and localPos1 returned as contact information. Initially, I assumed localPos0 would pinpoint the contact location in the frame of body0, with localPos1 following suit for body1. However, it seems that this is not the case. In my setup, with body1 taking on the role of the 'plane' (-1), I expected localPos1 to reveal the contact's whereabouts in the world frame. Alas, that isn't the case. The first value of localPos1, aligned with the x direction, always remains at 0, at least in my scenario. When I attempted to calculate the net torque applied to the robot (needed to calculate the ZMP) using localPos1, It always returned zero. localPos0, on the other hand, returned more sensible results. Can you elaborate more on the definition of these parameters a little more?

Any insights or guidance are greatly appreciated!

@amirrazmjoo Did you manage to solve the issue?
I am trying to use the same localPos0 and localPos1 api to get the contact point and calculate net torque here too. I am unsure if localPos0 and localPos1 are measured in the body frame, object frame (multiple bodies) or the world frame.