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

Visualisation of the simulator while RL agent is being trained & CUDA GPU acceleration support. #9

Open
ChristosPeridis opened this issue Jul 4, 2023 · 1 comment

Comments

@ChristosPeridis
Copy link

Hello dear Christian,

I hope you are doing well. Thank you very much for your immediate responses to the issues that I have opened the previous week. I have stared now exploring the karolos API and its capabilities. I wanted to ask is it possible to visualise the simulation of the robot while executing the task ? Furthermore, is it possible to accelerate the training procedure of the RL agent by leveraging powerful NVIDIA GPUs like NVIDIA RTX A5000 using CUDA acceleration in PyTorch?

Thank you very much in advance for all the valuable help and support!

Kind regards,

Christos Peridis

@chrisbitter
Copy link
Collaborator

Hey Christos,

yes and yes!

For visualization there are two cases:

  1. Make sure the training pipeline is working as intended. For this, the environment config needs to set the parameter render=True. Also, set number_processes=1, because Pybullet can only spawn one window:
training_config = {
"number_processes": 1,
"env_config": {
"render": True,
}
}
  1. Visualize a trained policy. Look at karolos/display.py and point it to the experiment folder. I just tested the file and found a little bug, so please pull the lastest version first.

Regarding cuda: The agent tries to use Cuda out of the box, see here:

self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

So if pytorch is installed correctly with cuda enabled, that should already work.

Hope that clears things up :) Let me know if you need anything else

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