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

When I ran yolov8_node, an error occurred. #1

Closed
lingxe01 opened this issue Apr 16, 2024 · 4 comments
Closed

When I ran yolov8_node, an error occurred. #1

lingxe01 opened this issue Apr 16, 2024 · 4 comments
Assignees

Comments

@lingxe01
Copy link

[INFO] [launch]: All log files can be found below /home/ling/.ros/log/2024-04-16-19-15-59-070741-ling01-27133 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [yolov8_node-1]: process started with pid [27135] [yolov8_node-1] Traceback (most recent call last): [yolov8_node-1] File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_generator_py/import_type_support_impl.py", line 46, in import_type_support [yolov8_node-1] return importlib.import_module(module_name, package=pkg_name) [yolov8_node-1] File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module [yolov8_node-1] return _bootstrap._gcd_import(name[level:], package, level) [yolov8_node-1] File "<frozen importlib._bootstrap>", line 1014, in _gcd_import [yolov8_node-1] File "<frozen importlib._bootstrap>", line 991, in _find_and_load [yolov8_node-1] File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked [yolov8_node-1] ModuleNotFoundError: No module named 'yolov8_msg.yolov8_msg_s__rosidl_typesupport_c' [yolov8_node-1] [yolov8_node-1] During handling of the above exception, another exception occurred: [yolov8_node-1] [yolov8_node-1] Traceback (most recent call last): [yolov8_node-1] File "/home/ling/yolo_ws/install/yolov8_main/lib/yolov8_main/yolov8_node", line 11, in <module> [yolov8_node-1] load_entry_point('yolov8-main==0.0.1', 'console_scripts', 'yolov8_node')() [yolov8_node-1] File "/home/ling/yolo_ws/install/yolov8_main/lib/python3.8/site-packages/yolov8_main/yolov8_node.py", line 139, in main [yolov8_node-1] node = Yolov8Node() [yolov8_node-1] File "/home/ling/yolo_ws/install/yolov8_main/lib/python3.8/site-packages/yolov8_main/yolov8_node.py", line 55, in __init__ [yolov8_node-1] self.pub = self.create_publisher(Yolov8InferenceMsg, '/yolov8_inference', 1) [yolov8_node-1] File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/node.py", line 1144, in create_publisher [yolov8_node-1] check_for_type_support(msg_type) [yolov8_node-1] File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/type_support.py", line 29, in check_for_type_support [yolov8_node-1] msg_type.__class__.__import_type_support__() [yolov8_node-1] File "/home/ling/yolo_ws/install/yolov8_msg/lib/python3.11/site-packages/yolov8_msg/msg/_yolov8_inference_msg.py", line 27, in __import_type_support__ [yolov8_node-1] module = import_type_support('yolov8_msg') [yolov8_node-1] File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_generator_py/import_type_support_impl.py", line 48, in import_type_support [yolov8_node-1] raise UnsupportedTypeSupport(pkg_name) [yolov8_node-1] rosidl_generator_py.import_type_support_impl.UnsupportedTypeSupport: Could not import 'rosidl_typesupport_c' for package 'yolov8_msg' [ERROR] [yolov8_node-1]: process has died [pid 27135, exit code 1, cmd '/home/ling/yolo_ws/install/yolov8_main/lib/yolov8_main/yolov8_node --ros-args -r __node:=yolov8_node --params-file /tmp/launch_params_rxsy50bg --params-file /tmp/launch_params_086brovq --params-file /tmp/launch_params_gxsq5_02 --params-file /tmp/launch_params_j9_qwus8 --params-file /tmp/launch_params_tmp9pr03 -r /image_raw:=/camera/rgb/image_raw'].

@AhmedSaid404
Copy link

I am having the same issue can you help!

@BAN2ARU
Copy link
Owner

BAN2ARU commented Apr 23, 2024

I tested it using the Docker image 'nvidia/cuda:11.4.3-cudnn8-devel-ubuntu20.04' and it didn’t produce any errors.
So, after searching online, I found that it might be a Python-related issue.
Are you using Python 3.8?

@BAN2ARU BAN2ARU self-assigned this Apr 23, 2024
@lingxe01
Copy link
Author

I tested it using the Docker image 'nvidia/cuda:11.4.3-cudnn8-devel-ubuntu20.04' and it didn’t produce any errors. So, after searching online, I found that it might be a Python-related issue. Are you using Python 3.8?

yes,i used python3.8,cuda11.3,ubuntu20.04

@BAN2ARU
Copy link
Owner

BAN2ARU commented Apr 24, 2024

Could you try sudo apt install ros-foxy-rosidl-typesupport-c and sudo apt-get dist-upgrade?
Also, check out this link: ros2/examples#303.
If the issue still isn't resolved, I'll consider sharing the Dockerfile.

@BAN2ARU BAN2ARU closed this as completed May 7, 2024
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

3 participants