isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
1.62k stars 526 forks source link

[Question] Do I import and run occupancy_map correctly? #659

Closed yuezhezhang closed 1 week ago

yuezhezhang commented 1 week ago

Motivation

I want to test the functionality of occupancy_map and run the example code as shown here. The steps I do are as follows:

Step 1:

As you mentioned here, I run the simulator first to be able to load extensions.

Step 2:

As someone mentioned here, since Isaac Sim does not contain modules from exts. I added the path of omni.isaac.occupancy_map to the system:

import sys
sys.path.insert(0,'/home/frankie/git/isaac/IsaacLab/_isaac_sim/exts/omni.isaac.occupancy_map')

Step 3:

I changed this line from omni.isaac.occupancy_map import _occupancy_map to from omni.isaac.occupancy_map.bindings import _occupancy_map.

Step 4:

I loaded a scene with a rigid body object to check the functionality.

Results:

My commit message is here. It seems there is no bug and the printed results make sense to me.

Question:

I want to make sure if the steps are correct and more generally speaking, can step 1 and 2 be used to load other extensions of omni?

Mayankm96 commented 1 week ago

The other way to do the same is by "enabling" the extension and importing the module from it.

As an example: https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab/omni/isaac/lab/sim/converters/urdf_converter.py#L117-L120

yuezhezhang commented 1 week ago

Thanks for the help! I am closing this issue.