abizovnuralem / go2_omniverse

Unitree Go2, Unitree G1 support for Nvidia Isaac Lab (Isaac Gym / Isaac Sim)
BSD 2-Clause "Simplified" License
319 stars 28 forks source link

[solved] Error executing ./run_sim.sh #27

Closed ChristophKin closed 1 month ago

ChristophKin commented 1 month ago

I run into following error executing the run_sim.sh script:

#All required rosdeps installed successfully
Starting >>> carter_navigation
Starting >>> custom_message
Starting >>> isaac_ros2_messages
Starting >>> isaac_ros_navigation_goal
Starting >>> isaac_tutorials
Finished <<< carter_navigation [0.31s]                                                                                                                                                         
Finished <<< isaac_tutorials [0.30s]
Finished <<< custom_message [0.46s]                                                                                                      
Finished <<< isaac_ros2_messages [0.47s]
Finished <<< isaac_ros_navigation_goal [1.05s]          

Summary: 5 packages finished [1.46s]
#All required rosdeps installed successfully
Starting >>> go2_interfaces
Finished <<< go2_interfaces [0.51s]                     

Summary: 1 package finished [0.69s]
Traceback (most recent call last):
  File "/home/username/go2_omniverse/main.py", line 25, in <module>
    from omniverse_sim import run_sim
  File "/home/username/go2_omniverse/omniverse_sim.py", line 7, in <module>
    from omni.isaac.lab.app import AppLauncher
ModuleNotFoundError: No module named 'omni.isaac.lab'

I have Ubuntu 22.04.4 LTS, Isaac Sim 4.1.0 and ROS2 Humble. Any suggestions? Does it only work with Isaac Sim 4.0?

abizovnuralem commented 1 month ago

Yes, currently it works only with Isaac Sim 4.0. Also be sure that before launching the script, don't activate the virtual env.

ChristophKin commented 1 month ago

I have now installed Isaac Sim 4.0 parallel to 4.1.0. Reinstalled Isaac Lab and also cloned go2_omniverse new. When I execute the run_sim.sh script I still get the same error. It seems like there is a missing link to Isaac Lab because it cant find the module.

abizovnuralem commented 1 month ago

Can you refer to this, please? https://github.com/abizovnuralem/go2_omniverse/issues/28

ChristophKin commented 1 month ago

I have read the other issue but it is a bit different I think. The colcon build runs successfully on my machine. However only the last command in the script python main.py --robot_amount 1 --robot go2 produces the error

Traceback (most recent call last):
  File "/home/username/go2_omniverse/main.py", line 25, in <module>
    from omniverse_sim import run_sim
  File "/home/username/go2_omniverse/omniverse_sim.py", line 7, in <module>
    from omni.isaac.lab.app import AppLauncher
ModuleNotFoundError: No module named 'omni.isaac.lab'

Also if I execute the commands step by step.

abizovnuralem commented 1 month ago

It seems to me that your conda env does have isaacLab installed, Have you tried to execute the empty example from the isaacLab instruction? Does it work for you?

ShaoshuSu commented 1 month ago

I have read the other issue but it is a bit different I think. The colcon build runs successfully on my machine. However only the last command in the script python main.py --robot_amount 1 --robot go2 produces the error

Traceback (most recent call last):
  File "/home/username/go2_omniverse/main.py", line 25, in <module>
    from omniverse_sim import run_sim
  File "/home/username/go2_omniverse/omniverse_sim.py", line 7, in <module>
    from omni.isaac.lab.app import AppLauncher
ModuleNotFoundError: No module named 'omni.isaac.lab'

Also if I execute the commands step by step.

I think @abizovnuralem is right. You probably need to check your environment. Do you use conda? Do you activate it? Can you import omni with the following?

python -c "import omni"

If not, you probably need to set up the environment with the isaaclab instructions.

ChristophKin commented 1 month ago

I think I found one error. I didn't execute ./isaaclab.sh --install inside the isaaclab conda environment. After doing so, the ModuleNotFoundError: No module named 'omni.isaac.lab' error disappeared.

However, when executing ./run_sim.sh (with no active conda env) I get the following output:

#All required rosdeps installed successfully
Starting >>> carter_navigation
Starting >>> custom_message
Starting >>> isaac_ros2_messages
Starting >>> isaac_ros_navigation_goal
Starting >>> isaac_tutorials
/home/username/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:260: UserWarning: Unknown distribution option: 'tests_require'gation_goal - 0.1s] [isaac_tutorials - 0.1s]
  warnings.warn(msg)
Finished <<< carter_navigation [0.96s]                                                                                                                                                                 
Finished <<< isaac_tutorials [1.08s]                                                                                                                                
--- stderr: isaac_ros_navigation_goal                                                                                                
/home/username/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:260: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
---
Finished <<< isaac_ros_navigation_goal [1.87s]
Finished <<< custom_message [3.69s]                                                                        
Finished <<< isaac_ros2_messages [3.95s]                     

Summary: 5 packages finished [4.14s]
  1 package had stderr output: isaac_ros_navigation_goal
#All required rosdeps installed successfully
Starting >>> go2_interfaces
Finished <<< go2_interfaces [4.41s]                     

Summary: 1 package finished [4.50s]
Traceback (most recent call last):
  File "/home/username/IsaacLab/go2_omniverse/main.py", line 25, in <module>
    from omniverse_sim import run_sim
  File "/home/username/IsaacLab/go2_omniverse/omniverse_sim.py", line 35, in <module>
    AppLauncher.add_app_launcher_args(parser)
  File "/home/username/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/app_launcher.py", line 253, in add_app_launcher_args
    arg_group.add_argument("--cpu", action="store_true", help=argparse.SUPPRESS)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1448, in add_argument
    return self._add_action(action)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1650, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1462, in _add_action
    self._check_conflict(action)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1599, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1608, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --cpu: conflicting option string: --cpu

Do you by any chance can help me further with this problem?

ShaoshuSu commented 1 month ago

I think I found one error. I didn't execute ./isaaclab.sh --install inside the isaaclab conda environment. After doing so, the ModuleNotFoundError: No module named 'omni.isaac.lab' error disappeared.

However, when executing ./run_sim.sh (with no active conda env) I get the following output:

#All required rosdeps installed successfully
Starting >>> carter_navigation
Starting >>> custom_message
Starting >>> isaac_ros2_messages
Starting >>> isaac_ros_navigation_goal
Starting >>> isaac_tutorials
/home/username/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:260: UserWarning: Unknown distribution option: 'tests_require'gation_goal - 0.1s] [isaac_tutorials - 0.1s]
  warnings.warn(msg)
Finished <<< carter_navigation [0.96s]                                                                                                                                                                 
Finished <<< isaac_tutorials [1.08s]                                                                                                                                
--- stderr: isaac_ros_navigation_goal                                                                                                
/home/username/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:260: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
---
Finished <<< isaac_ros_navigation_goal [1.87s]
Finished <<< custom_message [3.69s]                                                                        
Finished <<< isaac_ros2_messages [3.95s]                     

Summary: 5 packages finished [4.14s]
  1 package had stderr output: isaac_ros_navigation_goal
#All required rosdeps installed successfully
Starting >>> go2_interfaces
Finished <<< go2_interfaces [4.41s]                     

Summary: 1 package finished [4.50s]
Traceback (most recent call last):
  File "/home/username/IsaacLab/go2_omniverse/main.py", line 25, in <module>
    from omniverse_sim import run_sim
  File "/home/username/IsaacLab/go2_omniverse/omniverse_sim.py", line 35, in <module>
    AppLauncher.add_app_launcher_args(parser)
  File "/home/username/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/app_launcher.py", line 253, in add_app_launcher_args
    arg_group.add_argument("--cpu", action="store_true", help=argparse.SUPPRESS)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1448, in add_argument
    return self._add_action(action)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1650, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1462, in _add_action
    self._check_conflict(action)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1599, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/home/username/miniconda3/envs/isaaclab/lib/python3.10/argparse.py", line 1608, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --cpu: conflicting option string: --cpu

Do you by any chance can help me further with this problem?

You can probably refer to this issue #26.

ChristophKin commented 1 month ago

This worked, thank you!