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

Error when creating a cpu Lidar sensor. #159

Open
adrian-sch opened this issue Apr 15, 2024 · 1 comment
Open

Error when creating a cpu Lidar sensor. #159

adrian-sch opened this issue Apr 15, 2024 · 1 comment

Comments

@adrian-sch
Copy link

When I try to add a cpu lidar to my robot in set_up_scene I get the following error:

[Error] [omni.kit.commands.command] Failed to execute a command: RangeSensorCreateLidar.
  File "/../projects/OmniIsaacGymEnvs/omniisaacgymenvs/scripts/random_policy.py", line 126, in <module>
    parse_hydra_configs()
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/python/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/python/lib/python3.10/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/python/lib/python3.10/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/python/lib/python3.10/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/python/lib/python3.10/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/python/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 119, in run
    ret = run_job(
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/python/lib/python3.10/site-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/../projects/OmniIsaacGymEnvs/omniisaacgymenvs/scripts/random_policy.py", line 118, in parse_hydra_configs
    env.step(actions)
  File "/../projects/OmniIsaacGymEnvs/omniisaacgymenvs/envs/vec_env_rlgames.py", line 85, in step
    self._world.step(render=to_render)
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/world/world.py", line 555, in step
    SimulationContext.step(self, render=render)
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/simulation_context/simulation_context.py", line 701, in step
    self._app.update()
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.range_sensor/omni/isaac/range_sensor/scripts/menu.py", line 25, in <lambda>
    make_menu_item_description(ext_id, "Rotating", lambda a=weakref.proxy(self): a._add_lidar()),
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.range_sensor/omni/isaac/range_sensor/scripts/menu.py", line 63, in _add_lidar
    result, prim = omni.kit.commands.execute(
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/exts/omni.kit.commands/omni/kit/commands/command.py", line 463, in execute
    result = omni.kit.undo.execute(command, name, kwargs)
[...skipped...]
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/exts/omni.kit.commands/omni/kit/undo/undo.py", line 77, in execute
    result = _execute(command, name, level, history_key)
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/exts/omni.kit.commands/omni/kit/undo/undo.py", line 458, in _execute
    raise error
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/kit/exts/omni.kit.commands/omni/kit/undo/undo.py", line 419, in _execute
    result = command.do()
  File "/../.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.range_sensor/omni/isaac/range_sensor/scripts/commands.py", line 137, in do
    carb.log.error("Could not create lidar prim")

 <class 'AttributeError'> 'builtin_function_or_method' object has no attribute 'error'

Also when I add the Lidar to the USD beforehand and try to get the sensor data with the Lidar interface I get a Lidar Sensor does not exist error:

[Error] [omni.isaac.range_sensor.plugin] Lidar Sensor does not exist

I tried to enable the omni.sensors.nv.lidar extention, but that did not change anything. Are there any other extensions that need to be enabled for the Lidar to work?

        # Enables and Imports the python bindings to interact with lidar sensor
        from omni.isaac.core.utils.extensions import enable_extension
        enable_extension("omni.sensors.nv.lidar")
        enable_extension("omni.isaac.range_sensor")
        from omni.isaac.range_sensor import _range_sensor
@Privilger
Copy link

I meet the same error, does anyone have some ideas?

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