Robotics StackExchange | Archived questions

Unable to load urdf file in gazebo (Error in spawn_entity.py - ModuleNotFoundError: No module named 'rclpy._rclpy_pybind11)

Hi, I would appreciate if someone could help me with my problem. I am using Ros2 Humble on Ubuntu 22.04.

I am following a youtube tutorial to load urdf files on gazebo (https://www.youtube.com/watch?v=mDS_M95MQGA&ab_channel=TheConstruct). However, when I ran the launch files, my model does not appear on Gazebo (I can see the model in rviz). The error that is printed on the terminal says ModuleNotFoundError: No module named 'rclpy.rclpypybind11. I got the following in the terminal.

[spawnentity.py-3] Traceback (most recent call last): [spawnentity.py-3] File "/opt/ros/humble/lib/gazeboros/spawnentity.py", line 32, in [spawnentity.py-3] import rclpy [spawnentity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/init.py", line 49, in [spawnentity.py-3] from rclpy.signals import installsignalhandlers [spawnentity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/signals.py", line 15, in [spawnentity.py-3] from rclpy.exceptions import InvalidHandle [spawnentity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/exceptions.py", line 15, in [spawnentity.py-3] from rclpy.impl.implementationsingleton import rclpyimplementation as _rclpy [spawnentity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/impl/implementationsingleton.py", line 32, in [spawnentity.py-3] rclpyimplementation = importclibrary('.rclpypybind11', package) [spawnentity.py-3] File "/opt/ros/humble/lib/python3.10/site-packages/rpyutils/importclibrary.py", line 39, in importclibrary [spawnentity.py-3] return importlib.importmodule(name, package=package) [spawnentity.py-3] File "/home/ronaldocd/anaconda3/lib/python3.9/importlib/init.py", line 127, in importmodule [spawnentity.py-3] return _bootstrap.gcd_import(name[level:], package, level)

[spawnentity.py-3] ModuleNotFoundError: No module named 'rclpy.rclpy_pybind11'

[spawnentity.py-3] The C extension '/opt/ros/humble/lib/python3.10/site-packages/rclpypybind11.cpython-39-x8664-linux-gnu.so' isn't present on the system. Please refer to 'https://docs.ros.org/en/humble/Guides/Installation-Troubleshooting.html#import-failing-without-library-present-on-the-system' for possible solutions [rviz2-2] [INFO] [1671581977.341480974] [rviz2]: Stereo is NOT SUPPORTED [rviz2-2] [INFO] [1671581977.341648233] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)

[ERROR] [spawnentity.py-3]: process has died [pid 28529, exit code 1, cmd '/opt/ros/humble/lib/gazeboros/spawnentity.py -entity boxbot-43990 -x 0.0 -y 0.0 -z 0.2 -R 0.0 -P 0.0 -Y 0.0 -topic /robotdescription --ros-args -r _node:=spawn_entity']. [rviz2-2] [INFO] [1671581977.421584362] [rviz2]: Stereo is NOT SUPPORTED [rviz2-2] Warning: link 'rightwheel' material 'green' undefined. [rviz2-2] at line 84 in ./urdfparser/src/model.cpp

I don't know how to solve it, I will appreciate any kind of help regarding my question. Thanks

Asked by RonaldoCD-BM on 2022-12-20 19:51:44 UTC

Comments

Answers