How do I use the occupancy map generation script to actually write out data in a directory. Do i have to just use python functions to do so or is there a way to attach this Generated Occupancy 2D map directly as a something like how a camera’s “render_product” is attached?
Hi @satyam1799sb - Have you referred this document for occupancy map generator?
https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/ext_omni_isaac_occupancy_map.html
Yes, I have referred to both of them. The second link provided, explains how to generate the occupany_map from the script but as can be seen in the “data type” provided with “None”. I dont understand how to save the map as a .pgm and .yaml file directly using this API.
For that this API document might be useful: Occupancy Extension [omni.isaac.occupancy_map] — isaac_sim 2022.2.1-beta.29 documentation
My problem is exactly from this documentation. How can one save the map from the script when the data type of the generate2d( )
is given as None ?
Is there a way to save it any format and then convert it to .pgm+.yaml file?
Hello @rthaker!
I found a very simple way to do the above. I was confused with the data types but the following works best after figuring out how to use buffer and dims.
l = dims[0]
b = dims[1]
new_img = Image.new("L", (l, b), "white")
new_img.putdata(buffer)
new_img.save('map_out.png')
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.