-
Notifications
You must be signed in to change notification settings - Fork 23
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
Added multi cartpole example #48
base: dev
Are you sure you want to change the base?
Conversation
added multi-cartpole grid env
…into dev fetch updates from upstream
@veds12 Thank you for this great and interesting example.:thumbsup: Could you move all SolidBox nodes to a group node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the great code quality!
I've left a few comments.
Also, please add a readme with showcase & plot to this example as we have done for each example in deepworlds.
Cheers!
examples/multi_cartpole/controllers/supervisor_manager/PPO_runner.py
Outdated
Show resolved
Hide resolved
examples/multi_cartpole/controllers/supervisor_manager/PPO_runner.py
Outdated
Show resolved
Hide resolved
examples/multi_cartpole/controllers/supervisor_manager/PPO_runner.py
Outdated
Show resolved
Hide resolved
examples/multi_cartpole/controllers/supervisor_manager/supervisor_controller.py
Outdated
Show resolved
Hide resolved
examples/multi_cartpole/controllers/supervisor_manager/supervisor_manager.py
Show resolved
Hide resolved
Thanks for the review @KelvinYang0320. I'll make the changes and update the PR as soon as possible |
@KelvinYang0320 I have addressed the requested changes. Please take a look |
@veds12 Did you use wandb in multi_cartpole?
Please add a readme here. Could you also fix the coordinate system (NUE → ENU) in this PR? Thank you! |
@KelvinYang0320 Yeah I left the wandb logs by mistake. Forgot to update the gitignore. I'll make the other changes. |
|
poleAngle = [0.0 for _ in range(self.num_robots)] | ||
|
||
# Angular velocity x of endpoint | ||
endpointVelocity = [normalizeToRange(self.poleEndpoint[i].getVelocity()[3], -1.5, 1.5, -1.0, 1.0, clip=True) for i in range(self.num_robots)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be the reason why it's taking too long to converge / not converging.
endpointVelocity = [normalizeToRange(self.poleEndpoint[i].getVelocity()[3], -1.5, 1.5, -1.0, 1.0, clip=True) for i in range(self.num_robots)] | |
endpointVelocity = [normalizeToRange(self.poleEndpoint[i].getVelocity()[4], -1.5, 1.5, -1.0, 1.0, clip=True) for i in range(self.num_robots)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@veds12 I have left a comment about the training issue.
Could you format your code with PEP8?
I will do a review again after that.
Thank you!
Hey @veds12, just a clarification because we have been discussing it with @KelvinYang0320, i think that the only differences from PEP8 are that we use a line limit of 120, and prefer to use mixedCase (sometimes also called lowerCamelCase) instead of snake_case in variable names. |
@tsampazk thanks for the clarification! I'll address the changes this weekend |
Description:
num_robots
while initializing it. The robot controller is agnostic to the number of robots. Hence, this world can be easily extended to different number of robots.TO DO: