Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Getting contact info for all envs #210

Open
amirrazmjoo opened this issue Mar 18, 2024 · 1 comment
Open

Problem Getting contact info for all envs #210

amirrazmjoo opened this issue Mar 18, 2024 · 1 comment

Comments

@amirrazmjoo
Copy link

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!

@xwong22
Copy link

xwong22 commented May 9, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants