isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
2.15k stars 881 forks source link

[Bug Report] Inaccurate 'is_success' Condition Testing in lift_env.py #86

Closed yangcyself closed 9 months ago

yangcyself commented 1 year ago

Describe the bug

In the line , the code checks if the object_position_error is less than 0.02 to determine if the task is a success. However, if the object_position_error is not less than 0.02, the task can still be marked as a success if reset_buf is set to 1 (which might happen due to the time limit being reached).

self.extras["is_success"] = torch.where(object_position_error < 0.02, 1, self.reset_buf)

To ensure that the task is only marked as a success when the object_position_error is less than 0.02, I propose changing the above line to:

self.extras["is_success"] = torch.where(object_position_error < 0.02, 1, 0)

In this way, the success condition will solely depend on the object_position_error, which seems to be the intended behavior.

Steps to reproduce

Additional context

Checklist

Mayankm96 commented 1 year ago

Can you send the PR with this fix and check the training still works? Thanks!