will return an array of isaacgym.gymapi.RigidContact instances. However the return values in release 3 are unstructured instances filled with a tuple value.
code use to reproduce the results is the following
# Print rigid contacts per robot:
for env in envs:
actor_count = gym.get_actor_count(env)
for i in range(actor_count):
actor_handle = gym.get_actor_handle(env, i)
contacts = list(gym.get_env_rigid_contacts(env))
Try removing the list() conversion on the return value of get_env_rigid_contacts(). The list() cast will convert the RigidContact instance into a list of tuples.
I would like to aquire all contacts of all envs. But the solution of Daniel, iterating through all envs, seams to be quite expensive. I tried to use get_rigid_contacts(), but it throws following error:
[Error] [carb.gym.plugin] Function GymGetRigidContacts cannot be used with the GPU pipeline after simulation starts. Please use the tensor API if possible. See docs/programming/tensors.html for more info. [Error] [carb.gym.plugin] Function GymGetRigidContactCount cannot be used with the GPU pipeline after simulation starts. Please use the tensor API if possible. See docs/programming/tensors.html for more info.
Do you got a (fast) solution to aquire the contact information?
Dear all,
Could I ask the order of values in tuple format of isaacgym.gymapi.RigidContact??Especially in isaacgym 1.0rc4 version.
(0, 0, 7, 3,
(0.00947645, -0.00319322, 0.02246147),
(-0.01047741, 0.00379699, 0.02686168),
0.02, 0.00114422,
(-0.48109517, 0.07937554, -0.8730675),
(0., 0., 0.),
(0., 0., 0.),
0.,
(0., 0.),
0.,
0.,
0.)
env1,
env2,
friction,
index1,
index2,
initial_overlap,
lambda,
lambda_friction,
local,
local2,
min_dist,
normal,
offset0,
offset1,
rolling,
torsion
The value of contact information is still obtained with key in isaacgym1.0rc2 version…(reference: MetaGraspNet/flairop_paralleljaw_physics_simulation.py at 47057ba15c5d9e3e69e48d00623068f1623d09d9 · maximiliangilles/MetaGraspNet · GitHub)
Is there any update on this topic? Is there a way to retrieve the same contact information using gym tensor API? Looking at gym api, I couldn’t find any usable method.