NVlabs / nvblox_torch

nvblox Torch
Other
23 stars 4 forks source link

example code problem #4

Closed Sepirence closed 6 months ago

Sepirence commented 6 months ago

How are you using nvblox_torch (docker/native/conda/?):

Starts from docker isaac-sim:2023.1.0 python 3.10.13 torch 2.0.1+cu118 cuda 11.7 gpu 3090ti ubuntu 20.04

Issue Details:

My previous issue was here.

To make it sure, I made new container and reinstalled nvblox-torch in latest version you patched.

Still, make an error before comfronting error on previous issue.

error:

[11.314s] app ready
2024-01-12 01:33:35 [12,163ms] [Warning] [omni.kit.hotkeys.core.registry] [Hotkey] duplicated action as SPACE (On Press) with omni.kit.widget.toolbar.omni.kit.widget.toolbar::toolbar::play!
2024-01-12 01:33:35 [12,164ms] [Warning] [omni.kit.hotkeys.core.registry] [Hotkey] Cannot register Global [omni.kit.widget.toolbar] omni.kit.widget.toolbar::toolbar::play.SPACE, error code: Duplicated action definition
[12.551s] RTX ready
[13.204s] Simulation App Startup Complete
2024-01-12 01:33:38 [15,112ms] [Warning] [omni.client.plugin]  Tick: provider_nucleus: Auth: Failed to create transport: Transport constructor is not found by description
2024-01-12 01:33:38 [15,112ms] [Warning] [omni.isaac.core.utils.nucleus] /persistent/app/omniverse/mountedDrives setting not found
Traceback (most recent call last):
  File "/isaac-sim/curobo/examples/isaac_sim/mpc_nvblox_example.py", line 348, in <module>
    main()
  File "/isaac-sim/curobo/examples/isaac_sim/mpc_nvblox_example.py", line 187, in main
    mpc_config = MpcSolverConfig.load_from_robot_config(
  File "/isaac-sim/curobo/src/curobo/wrap/reacher/mpc.py", line 118, in load_from_robot_config
    world_coll_checker = create_collision_checker(world_cfg)
  File "/isaac-sim/curobo/src/curobo/geom/sdf/utils.py", line 27, in create_collision_checker
    return WorldBloxCollision(config)
  File "/isaac-sim/curobo/src/curobo/geom/sdf/world_blox.py", line 56, in __init__
    super().__init__(config)
  File "/isaac-sim/curobo/src/curobo/geom/sdf/world_mesh.py", line 62, in __init__
    super().__init__(config)
  File "/isaac-sim/curobo/src/curobo/geom/sdf/world.py", line 361, in __init__
    self.load_collision_model(self.world_model)
  File "/isaac-sim/curobo/src/curobo/geom/sdf/world_blox.py", line 76, in load_collision_model
    self._blox_mapper = Mapper(
  File "/isaac-sim/nvblox/nvblox_torch/src/nvblox_torch/mapper.py", line 46, in __init__
    self._c_mapper = get_nvblox_mapper_class()(
  File "/isaac-sim/nvblox/nvblox_torch/src/nvblox_torch/mapper.py", line 26, in get_nvblox_mapper_class
    torch.classes.load_library(join_path(cpp_build_path, "libpy_nvblox.so"))
  File "/isaac-sim/extscache/omni.pip.torch-2_0_1-2.0.2+105.1.lx64/torch-2-0-1/torch/_classes.py", line 51, in load_library
    torch.ops.load_library(path)
  File "/isaac-sim/extscache/omni.pip.torch-2_0_1-2.0.2+105.1.lx64/torch-2-0-1/torch/_ops.py", line 643, in load_library
    ctypes.CDLL(path)
  File "/isaac-sim/kit/python/lib/python3.10/ctypes/__init__.py", line 377, in __init__
    self._handle = _dlopen(final_name, mode)
OSError: /isaac-sim/nvblox/nvblox_torch/src/nvblox_torch/cpp/build/libpy_nvblox.so: cannot open shared object file: No such file or directory
2024-01-12 01:33:40 [17,715ms] [Warning] [omni.core.ITypeFactory] Module /isaac-sim/kit/exts/omni.graph.action/bin/libomni.graph.action.plugin.so remained loaded after unload request.
2024-01-12 01:33:40 [17,719ms] [Warning] [carb] [Plugin: omni.spectree.delegate.plugin] Module /isaac-sim/kit/exts/omni.usd_resolver/bin/libomni.spectree.delegate.plugin.so remained loaded after unload request
2024-01-12 01:33:40 [17,723ms] [Warning] [omni.stageupdate.plugin] Deprecated: direct use of IStageUpdate callbacks is deprecated. Use IStageUpdate::getStageUpdate instead.
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,724ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,725ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 01:33:40 [17,729ms] [Warning] [carb.audio.context] 1 contexts were leaked
2024-01-12 01:33:41 [17,843ms] [Warning] [carb] Recursive unloadAllPlugins() detected!
2024-01-12 01:33:41 [17,859ms] [Warning] [omni.core.ITypeFactory] Module /isaac-sim/kit/exts/omni.activity.core/bin/libomni.activity.core.plugin.so remained loaded after unload request.

Is there any recommendation about CUDA version? I am using 11.7 now and Isaac-sim is stable with your curobo examples that do not use nvblox, but maybe I will update at least version 11.8 or upper.

balakumar-s commented 6 months ago

After cloning the latest version of nvblox_torch, did you run compilation step before doing pip install?

    sh install_isaac_sim.sh $($omni_python -c 'import torch.utils; print(torch.utils.cmake_prefix_path)')
    pip install .
Sepirence commented 6 months ago

Yeah. I forgot to add path of glog to pkg-config and ld. New version works well in motion_gen_reacher_nvblox.py well! Unfortunately, mpc_nvblox_example.py is not.

I got error message when I press start button on simulation of mpc_nvblox_example.py. Still, mpc_example.py works well.

error:

[13.409s] RTX ready
[14.159s] Simulation App Startup Complete
WARNING: Logging before InitGoogleLogging() is written to STDERR
I20240112 07:22:45.963136 11746 layer_cake_impl.h:32] Adding Layer with type: N6nvblox15VoxelBlockLayerINS_9TsdfVoxelEEE, voxel_size: 0.03, and memory_type: kDevice to LayerCake.
I20240112 07:22:45.963193 11746 layer_cake_impl.h:32] Adding Layer with type: N6nvblox15VoxelBlockLayerINS_10ColorVoxelEEE, voxel_size: 0.03, and memory_type: kDevice to LayerCake.
I20240112 07:22:45.963201 11746 layer_cake_impl.h:32] Adding Layer with type: N6nvblox15VoxelBlockLayerINS_14FreespaceVoxelEEE, voxel_size: 0.03, and memory_type: kDevice to LayerCake.
I20240112 07:22:45.963209 11746 layer_cake_impl.h:32] Adding Layer with type: N6nvblox15VoxelBlockLayerINS_14OccupancyVoxelEEE, voxel_size: 0.03, and memory_type: kDevice to LayerCake.
I20240112 07:22:45.963214 11746 layer_cake_impl.h:32] Adding Layer with type: N6nvblox15VoxelBlockLayerINS_9EsdfVoxelEEE, voxel_size: 0.03, and memory_type: kDevice to LayerCake.
I20240112 07:22:45.963220 11746 layer_cake_impl.h:32] Adding Layer with type: N6nvblox10BlockLayerINS_9MeshBlockEEE, voxel_size: 0.03, and memory_type: kDevice to LayerCake.
2024-01-12 07:22:50 [22,277ms] [Warning] [curobo] Running in headless mode: native
[22.308s] [ext: omni.kit.asset_converter-2.0.12] startup
[22.344s] [ext: omni.kit.tool.asset_importer-2.4.18] startup
[22.427s] [ext: omni.isaac.asset_browser-0.3.1] startup
[22.498s] [ext: omni.kit.renderer.cuda_interop-1.0.1] startup
[22.502s] [ext: omni.kit.livestream.core-2.2.1] startup
[22.505s] [ext: omni.kit.streamsdk.plugins-2.3.7] startup
[22.505s] [ext: omni.kit.livestream.native-2.3.0] startup

Failed to open [/var/run/utmp]
Active user not found. Using default user [kiosk]Streaming server started.
2024-01-12 07:22:53 [25,314ms] [Warning] [curobo] Running in headless mode: native
2024-01-12 07:22:53 [25,405ms] [Warning] [omni.hydra] Mesh '/World/obstacles/table' has corrupted data in primvar 'displayColor': buffer size 8 doesn't match expected size 36 in faceVarying primvars
main: thread_init: already added for thread
main: thread_init: already added for thread
2024-01-12 07:23:17 [49,890ms] [Warning] [omni.physx.plugin] The rigid body at /World/panda/base_link has a possibly invalid inertia tensor of {1.0, 1.0, 1.0} and a negative mass, small sphere approximated inertia was used. Either specify correct values in the mass properties, or add collider(s) to any shape(s) that you wish to automatically compute mass properties for.
2024-01-12 07:23:17 [49,890ms] [Warning] [omni.physx.plugin] The rigid body at /World/panda/ee_link has a possibly invalid inertia tensor of {1.0, 1.0, 1.0} and a negative mass, small sphere approximated inertia was used. Either specify correct values in the mass properties, or add collider(s) to any shape(s) that you wish to automatically compute mass properties for.
2024-01-12 07:23:17 [50,036ms] [Warning] [omni.isaac.core.articulations.articulation_view] ArticulationView needs to be initialized.
2024-01-12 07:23:17 [50,036ms] [Warning] [omni.isaac.core.articulations.articulation_view] Physics Simulation View is not created yet in order to use get_joints_state
2024-01-12 07:23:17 [50,036ms] [Warning] [omni.isaac.core.articulations.articulation_view] ArticulationView needs to be initialized.
2024-01-12 07:23:17 [50,036ms] [Warning] [omni.isaac.core.articulations.articulation_view] ArticulationView needs to be initialized.
Traceback (most recent call last):
  File "/isaac-sim/curobo/examples/isaac_sim/mpc_nvblox_example.py", line 348, in <module>
    main()
  File "/isaac-sim/curobo/examples/isaac_sim/mpc_nvblox_example.py", line 284, in main
    position=tensor_args.to_device(sim_js.positions),
AttributeError: 'NoneType' object has no attribute 'positions'
2024-01-12 07:23:17 [50,051ms] [Warning] [omni.core.ITypeFactory] Module /isaac-sim/kit/exts/omni.graph.action/bin/libomni.graph.action.plugin.so remained loaded after unload request.
2024-01-12 07:23:17 [50,056ms] [Warning] [carb] [Plugin: omni.spectree.delegate.plugin] Module /isaac-sim/kit/exts/omni.usd_resolver/bin/libomni.spectree.delegate.plugin.so remained loaded after unload request
2024-01-12 07:23:17 [50,060ms] [Warning] [omni.stageupdate.plugin] Deprecated: direct use of IStageUpdate callbacks is deprecated. Use IStageUpdate::getStageUpdate instead.
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,061ms] [Warning] [omni.graph.core.plugin] Could not find category 'Replicator:Annotators' for removal
2024-01-12 07:23:17 [50,065ms] [Warning] [carb.audio.context] 1 contexts were leaked
2024-01-12 07:23:18 [50,187ms] [Warning] [carb] Recursive unloadAllPlugins() detected!
2024-01-12 07:23:18 [50,199ms] [Warning] [omni.core.ITypeFactory] Module /isaac-sim/kit/exts/omni.activity.core/bin/libomni.activity.core.plugin.so remained loaded after unload request.
balakumar-s commented 6 months ago

Change this line https://github.com/NVlabs/curobo/blob/c09d94908d8ad52f557ed59195c1ceb2d0434d65/examples/isaac_sim/mpc_nvblox_example.py#L244

To: if step_index<=2

Sepirence commented 6 months ago

Yep, it works well. Thank you for helping me.