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

Runtime env actor asset changes #10

Merged
merged 2 commits into from
Feb 14, 2023
Merged

Runtime env actor asset changes #10

merged 2 commits into from
Feb 14, 2023

Conversation

c-salmi
Copy link

@c-salmi c-salmi commented Feb 14, 2023

Because Isaacgym doesn't allow the creation or deletion of actors, I've implemented a workaround which restarts the simulator.

We keep track of the current environment config in the class IsaacGymWrapper in the dict self.env_cfg. Then every call to compute_action in MPPIisaacPlanner we check if the observations contain any relevant changes and update self.env_cfg and restart the simulator if required.

I've also posted on the isaacgym forum here, to see if there is a better workaround.

Additionally this PR changes the way MPPIisaacPlanner and MPPIplanner interact. Instead of using class inheritence MPPIplanner is now simply a property of MPPIisaacPlanner because this prevents the abuse of accessing self in unexpected situations.

Edit:
Also I changed the expected signature of the objective class method a bit. It now receives the instance of IsaacGymWrapper and can thus access all the simulation states to compute it's objective. The old version for instance could not access contact forces because they aren't in the root_states, dof_states, or rigid_body_states

… only asset change that is supported is sphere radius
@c-salmi c-salmi requested a review from maxspahn February 14, 2023 12:23
Copy link
Contributor

@maxspahn maxspahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good.
This PR integrates the passing of obstacles into the isaac simulation. However, there is no velocity model so moving obstacles would not be avoided, #12 .

Let's keep in mind that this PR removes handle.batch.input decorator. Maybe this might be a problem at some point in the future.

@maxspahn maxspahn merged commit 4673c11 into main Feb 14, 2023
@maxspahn maxspahn deleted the ft-runtime-env-changes branch February 14, 2023 15:05
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

Successfully merging this pull request may close these issues.

2 participants