I am unable to import habitat lab because it says unable to find the robots utils in habitat -sim.
The error code is below:
ModuleNotFoundError Traceback (most recent call last)
Cell In[2], line 19
16 from PIL import Image
17 import matplotlib.colors as mcolors
---> 19 import habitat
20 import quaternion as qt
21 import habitat_sim
File ~/audio/habitat-lab/habitat/init.py:9
7 from habitat.config import Config, get_config
8 from habitat.core.agent import Agent
----> 9 from habitat.core.benchmark import Benchmark
10 from habitat.core.challenge import Challenge
11 from habitat.core.dataset import Dataset
File ~/audio/habitat-lab/habitat/core/benchmark.py:18
16 from habitat.config.default import get_config
17 from habitat.core.agent import Agent
---> 18 from habitat.core.env import Env
21 class Benchmark:
22 r"""Benchmark for evaluating agents in environments."""
File ~/audio/habitat-lab/habitat/core/env.py:22
20 from habitat.datasets import make_dataset
21 from habitat.sims import make_sim
---> 22 from habitat.tasks import make_task
23 from habitat.utils import profiling_wrapper
26 class Env:
File ~/audio/habitat-lab/habitat/tasks/init.py:7
1 #!/usr/bin/env python3
2
3 # Copyright (c) Facebook, Inc. and its affiliates.
4 # This source code is licensed under the MIT license found in the
5 # LICENSE file in the root directory of this source tree.
----> 7 from habitat.tasks.registration import make_task # noqa: F401
File ~/audio/habitat-lab/habitat/tasks/rearrange/actions.py:21
16 from habitat.sims.habitat_simulator.actions import HabitatSimActions
18 # flake8: noqa
19 # These actions need to be imported since there is a Python evaluation
20 # statement which dynamically creates the desired grip controller.
---> 21 from habitat.tasks.rearrange.grip_actions import (
22 GripSimulatorTaskAction,
23 MagicGraspAction,
24 SuctionGraspAction,
25 )
26 from habitat.tasks.rearrange.rearrange_sim import RearrangeSim
27 from habitat.tasks.rearrange.utils import rearrange_collision, rearrange_logger
File ~/audio/habitat-lab/habitat/tasks/rearrange/grip_actions.py:14
12 from habitat.core.embodied_task import SimulatorTaskAction
13 from habitat.core.registry import registry
---> 14 from habitat.tasks.rearrange.rearrange_sim import RearrangeSim
15 from habitat.tasks.rearrange.utils import (
16 coll_link_name_matches,
17 coll_name_matches,
18 )
21 class GripSimulatorTaskAction(SimulatorTaskAction):
File ~/audio/habitat-lab/habitat/tasks/rearrange/rearrange_sim.py:36
33 from habitat_sim.physics import JointMotorSettings, MotionType
35 # flake8: noqa
---> 36 from habitat_sim.robots import FetchRobot, FetchRobotNoWheels
37 from habitat_sim.sim import SimulatorBackend
40 @registry.register_simulator(name="RearrangeSim-v0")
41 class RearrangeSim(HabitatSim):
ModuleNotFoundError: No module named 'habitat_sim.robots'
This is using habitat-lab version 0.2.2.
Newer versions of habitat-lab result in no 'habitat' module found.
Hey @YYDreamzure, robots module was moved from habitat-sim to habitat-lab in v0.2.3. This means there is a breaking change between those versions. In general, I strongly suggest you work on equivalent versions of habitat-sim and habitat-lab to avoid issues.
Habitat-Sim version
v0.2.5
❓ Questions and Help
I am unable to import habitat lab because it says unable to find the robots utils in habitat -sim.
The error code is below: ModuleNotFoundError Traceback (most recent call last) Cell In[2], line 19 16 from PIL import Image 17 import matplotlib.colors as mcolors ---> 19 import habitat 20 import quaternion as qt 21 import habitat_sim
File ~/audio/habitat-lab/habitat/init.py:9 7 from habitat.config import Config, get_config 8 from habitat.core.agent import Agent ----> 9 from habitat.core.benchmark import Benchmark 10 from habitat.core.challenge import Challenge 11 from habitat.core.dataset import Dataset
File ~/audio/habitat-lab/habitat/core/benchmark.py:18 16 from habitat.config.default import get_config 17 from habitat.core.agent import Agent ---> 18 from habitat.core.env import Env 21 class Benchmark: 22 r"""Benchmark for evaluating agents in environments."""
File ~/audio/habitat-lab/habitat/core/env.py:22 20 from habitat.datasets import make_dataset 21 from habitat.sims import make_sim ---> 22 from habitat.tasks import make_task 23 from habitat.utils import profiling_wrapper 26 class Env:
File ~/audio/habitat-lab/habitat/tasks/init.py:7 1 #!/usr/bin/env python3 2 3 # Copyright (c) Facebook, Inc. and its affiliates. 4 # This source code is licensed under the MIT license found in the 5 # LICENSE file in the root directory of this source tree. ----> 7 from habitat.tasks.registration import make_task # noqa: F401
File ~/audio/habitat-lab/habitat/tasks/registration.py:28 26 _try_register_nav_task() 27 _try_register_vln_task() ---> 28 _try_register_rearrange_task()
File ~/audio/habitat-lab/habitat/tasks/rearrange/init.py:13, in _try_register_rearrange_task() 12 def _try_register_rearrange_task(): ---> 13 import habitat.tasks.rearrange.actions 14 import habitat.tasks.rearrange.grip_actions 15 import habitat.tasks.rearrange.multi_task.composite_sensors
File ~/audio/habitat-lab/habitat/tasks/rearrange/actions.py:21 16 from habitat.sims.habitat_simulator.actions import HabitatSimActions 18 # flake8: noqa 19 # These actions need to be imported since there is a Python evaluation 20 # statement which dynamically creates the desired grip controller. ---> 21 from habitat.tasks.rearrange.grip_actions import ( 22 GripSimulatorTaskAction, 23 MagicGraspAction, 24 SuctionGraspAction, 25 ) 26 from habitat.tasks.rearrange.rearrange_sim import RearrangeSim 27 from habitat.tasks.rearrange.utils import rearrange_collision, rearrange_logger
File ~/audio/habitat-lab/habitat/tasks/rearrange/grip_actions.py:14 12 from habitat.core.embodied_task import SimulatorTaskAction 13 from habitat.core.registry import registry ---> 14 from habitat.tasks.rearrange.rearrange_sim import RearrangeSim 15 from habitat.tasks.rearrange.utils import ( 16 coll_link_name_matches, 17 coll_name_matches, 18 ) 21 class GripSimulatorTaskAction(SimulatorTaskAction):
File ~/audio/habitat-lab/habitat/tasks/rearrange/rearrange_sim.py:36 33 from habitat_sim.physics import JointMotorSettings, MotionType 35 # flake8: noqa ---> 36 from habitat_sim.robots import FetchRobot, FetchRobotNoWheels 37 from habitat_sim.sim import SimulatorBackend 40 @registry.register_simulator(name="RearrangeSim-v0") 41 class RearrangeSim(HabitatSim):
ModuleNotFoundError: No module named 'habitat_sim.robots'
This is using habitat-lab version 0.2.2. Newer versions of habitat-lab result in no 'habitat' module found.