Originally posted by **jasoon-chen** September 22, 2024
I'm trying to retrieve the total collision pairs within the simulator. Based on the documentation provided [here](https://rcareworld.readthedocs.io/en/latest/api/pyrcareworld.envs.html#pyrcareworld.envs.base_env.RCareWorld.GetCurrentCollisionPairs) it mentions that "After calling this method and stepping once, the result will be saved in `env.data[‘CurrentCollisionPairs’]`." After running:
`print(env.data)` this is what is printed:
```{'time_scale': 1.0, 'fixed_delta_time': 0.019999999552965164, 'current_collisio_pairs': []}```
Despite running `print(env.data)` whenever there is a collision or not, the `current_collisio_pairs` key would always have an empty list `[]`. (I am assuming that the `CurrentCollisionPairs`key is basically `current_collisio_pairs`). Is this how we're supposed to grab the collision pairs or is there another function that we can use?
This is the code that I was using:
```
self.env.GetCurrentCollisionPairs()
self.env.step()
print(self.env.data["current_collisio_pairs"])```
Seems to only be failing on the bathing environment, but works on certain demo environments.
Discussed in https://github.com/empriselab/RCareWorld/discussions/125