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

Robot still thinks it is in collision even after resetting its articulation back to the origin of the simulation #1650

Open
brandon-lawrence96 opened this issue Jan 9, 2025 · 2 comments

Comments

@brandon-lawrence96
Copy link

brandon-lawrence96 commented Jan 9, 2025

Question

Basic questions, related to robot learning, that are not bugs or feature requests will be closed without reply, because GitHub issues are not an appropriate venue for these.

Advanced/nontrivial questions, especially in areas where documentation is lacking, are very much welcome.

For questions that are related to running and understanding Isaac Sim, please post them at the official Isaac Sim forums.

Hi. Currently, when a termination event occurs for my robot due to illegal contact with a wall for example, I make the robot "teleport" back to the origin position of the simulation but even after I do that, the robot still thinks that it is in collision as I can see this from the collision visualizations of the different contact sensors of the robot. Why is this so? This is my code snippet for teleporting the robot back in the event of a collision:

obs, _, terminated, _ = env.step(actions_reordered)

if terminated.item() == 1:
                print("Restart Simulation!")
                # obs, _ = env.get_observations()  # Reset the environment
                root_state = env.env.scene.articulations["robot"].data.default_root_state.clone()

                env.env.scene.articulations["robot"].write_root_pose_to_sim(root_state[:, :7])

                env.env.scene.articulations["robot"].write_root_velocity_to_sim(root_state[:, 7:])
                
                joint_pos, joint_vel = env.env.scene.articulations["robot"].data.default_joint_pos.clone(), 
               env.env.scene.articulations["robot"].data.default_joint_vel.clone()
                env.env.scene.articulations["robot"].write_joint_state_to_sim(joint_pos, joint_vel)

                env.env.scene.articulations["robot"].reset()

Thank you for the assistance.

@RandomOakForest
Copy link
Collaborator

Thanks for posting this. Can you clarify how you are observing the "robot still thinks that it is in collision"? Thanks.

@brandon-lawrence96
Copy link
Author

Hi. Thank you for the reply. I can see that the robot still thinks it is in collision from the red spheres in the isasc sim gui at the robot prims. I have attached a video as well.

WhatsApp.Video.2025-01-09.at.12.18.46.mp4

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