mats-robotics / yolov5_ros

A complete ROS interface for running YOLOv5 inference
GNU General Public License v3.0
220 stars 64 forks source link

[detect-1]killing on exit #1

Closed PauloMendes33 closed 2 years ago

PauloMendes33 commented 2 years ago

RLException: Unable to launch [detect-1]. If it is a script, you may be missing a '#!' declaration at the top. The traceback for the exception was written to the log file

When I try to run roslaunch yolov5_ros yolov5.launch it returns this error message. What should I do?

PauloMendes33 commented 2 years ago

More precisely.

... logging to /home/user/.ros/log/313bccb0-b9be-11ec-b5ea-08d40c64d5d9/roslaunch-pauloasmendes-Lenovo-ideapad-300-15ISK-15273.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://user:40289/

SUMMARY

PARAMETERS

NODES / detect (yolov5_ros/detect.py)

ROS_MASTER_URI=http://localhost:11311

RLException: Unable to launch [detect-1]. If it is a script, you may be missing a '#!' declaration at the top. The traceback for the exception was written to the log file [detect-1] killing on exit

nhatleminh1997 commented 2 years ago

Hi Paulo,

I will look into the issue but for now I am not sure where the error comes from. Is YOLOv5 working on your machine? Could you try run it independently without the ROS wrapper?

PauloMendes33 commented 2 years ago

Yes. Yolov5 is running smoothly. I tried it a lot of times.

PauloMendes33 commented 2 years ago

I am using Ubuntu 18.04 and ROS melodic.

HooradAboo commented 2 years ago

Hi Paulo, Did you find any solution? I have the same problem, too.

abhishekt711 commented 2 years ago

Yes in the first line of script change to this #! /usr/bin/env python3

HooradAboo commented 2 years ago

Thanks for your response. I did this, too. It does not work for me.

nhatleminh1997 commented 2 years ago

@HooradAboo @PauloMendes33 hi sorry I haven't had time to work with Ubuntu 18.04 and ROS Melodic. Could you try to follow the instruction here http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment for Python 3 users in ROS Melodic and earlier? I just also added to the repo instruction the step to make the Python script executable in case you have not done it yet.

HooradAboo commented 2 years ago

Thank you so much. I compile it with "catkin_make" instead of "catkin build" and it works for me.