-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Question] Implementing a large number of Cameras #173
Comments
Hello, I am encountering a similar issue. I believe that initializing the camera alone consumes a substantial amount of GPU memory. I have conducted tests on this; one camera alone appears to use approximately 1 GB of GPU memory. Therefore, it seems impossible to run over 1000 environments when utilizing cameras. |
Well at least I'm not the only one. That makes me wonder though where all that memory usage is coming from? Also, if I do not call |
I had a similar issue and tried to solve it but failed for various reasons. However, looking at the ORBIT Documentation in the link, I expect that this problem will be solved if “Cameras (parallelized)” is officially updated in “July 2023”. It looks like there's a delay with Isaac-Sim's update. |
Well, the current devel branch supports parallelized cameras, so I think that feature is implemented already. I think something is just causing the cameras to have a massive vRAM overhead and it's just not feasible right now to have more than (in my case) 9 of them. Would be great to have official confirmation of this though. |
Hi everyone, Thanks for bringing up this discussion. We are going to restart this investigation on multiple cameras again. At least in our previous benchmarks, we could have two cameras per environment and go up to 8 environments at roughly 40FPS on an RTX 3060. Beyond that, the simulation crashes because of vRAM issues. I think one of the main factors there was to use the app experience file similar to OIGE: We are yet to incorporate this into Orbit, but it should be something that can be added. Similar to how we load different experience files in the workflows: On a side note, yes, the Camera sensor returns batched data. However, this doesn't mean the rendering is happening in parallel. Some work is going on to make this more efficient in Isaac Sim. Of all of them, the most straightforward is to adapt Orbit's camera internals to optimize the todo note mentioned here: This I think should be possible now in Isaac Sim 2023.1. OIGE does some version of it: I still have to get around trying this out, but due to my schedule, it has been difficult lately. I would really appreciate help on it if possible. |
Hello, I am also facing this problem. Even 2 cameras per env is consuming a lot of mem making any visual RL very difficult if possible at all, even without rendering. |
Resolved in 1.2 release: https://isaac-sim.github.io/IsaacLab/source/overview/reinforcement-learning/performance_benchmarks.html#benchmark-results Camera benchmark tool for custom environments, I was able to train with 1024 low resolution cameras on an nvidia 3090 laptop gpu : #976 |
…im#173) This change will allow generation of multiple Isaac Lab images based on different versions of Isaac Sim images. Previously, only a single image can be created.
This change will allow generation of multiple Isaac Lab images based on different versions of Isaac Sim images. Previously, only a single image can be created.
Main Challenge
I'm currently trying to setup an environment where there is a large number of cameras, all taking a single picture at a single point in time. When I initially tried to do that, my simulation crashed with the either one of the following error messages:
This happens as soon as the number of cloned environments (and therefore cameras) is 10 or larger.
If I read the above error message correctly, I should still have plenty of capacity on my GPU, but it's not marked as "free" - how does this happen?
Also, if my math is correct, a single image of an environment should not take up more than 16 MB of space (2048 * 2048 * 4 * 8 bits).
Workaround
I thought then that a possible workaround for this issue could be that I iteratively position the camera over all of the environments, take a picture and add it to a list. This works, but in practice i need to step the simulation a few times (3) every time i reposition the camera for it to "see" something. This time adds up very quickly: Let's say I have 1000 envs and I'm running at 3 fps - it would take 15 minutes to loop over all of them.
Questions
Was always, If I can provide more code/data/anything to help solve this, I'm more than happy to.
Example Code
My camera setup for the parallel run (simplified) is as follows:
And my (simplified) setup for iterating through the environments:
System specs
The text was updated successfully, but these errors were encountered: