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

asked 2022-12-20 18:51:44 -0500

RonaldoCD-BM gravatar image

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_M...). 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._rclpy_pybind11. I got the following in the terminal.

[spawn_entity.py-3] Traceback (most recent call last): [spawn_entity.py-3] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 32, in <module> [spawn_entity.py-3] import rclpy [spawn_entity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/__init__.py", line 49, in <module> [spawn_entity.py-3] from rclpy.signals import install_signal_handlers [spawn_entity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/signals.py", line 15, in <module> [spawn_entity.py-3] from rclpy.exceptions import InvalidHandle [spawn_entity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/exceptions.py", line 15, in <module> [spawn_entity.py-3] from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy [spawn_entity.py-3] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/impl/implementation_singleton.py", line 32, in <module> [spawn_entity.py-3] rclpy_implementation = import_c_library('._rclpy_pybind11', package) [spawn_entity.py-3] File "/opt/ros/humble/lib/python3.10/site-packages/rpyutils/import_c_library.py", line 39, in import_c_library [spawn_entity.py-3] return importlib.import_module(name, package=package) [spawn_entity.py-3] File "/home/ronaldocd/anaconda3/lib/python3.9/importlib/__init__.py", line 127, in import_module [spawn_entity.py-3] return _bootstrap._gcd_import(name[level:], package, level)

[spawn_entity.py-3] ModuleNotFoundError: No module named 'rclpy._rclpy_pybind11'

[spawn_entity.py-3] The C extension '/opt/ros/humble/lib/python3.10/site-packages/_rclpy_pybind11.cpython-39-x86_64-linux-gnu.so' isn't present on the system. Please refer to 'https://docs.ros.org/en/humble/Guides...' for possible solutions [ERROR] [spawn_entity.py-3]: process has died [pid 28529, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -entity box_bot-43990 -x 0.0 -y 0.0 -z 0.2 -R 0.0 -P 0.0 -Y 0.0 -topic /robot_description --ros-args -r __node:=spawn_entity']. [rviz2-2] Warning: link 'right_wheel' material 'green' undefined. [rviz2-2] at line 84 in ./urdf_parser/src/model.cpp

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

edit retag flag offensive close merge delete