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

Can this ROS package be run under ROS1 (ROS melodic)? #43

Open
miao202 opened this issue Jan 5, 2024 · 4 comments
Open

Can this ROS package be run under ROS1 (ROS melodic)? #43

miao202 opened this issue Jan 5, 2024 · 4 comments

Comments

@miao202
Copy link

miao202 commented Jan 5, 2024

Can this ROS package be run under ROS1 (ROS melodic)? Since ROS melodic depends on python 2.7, but yolov8 has python >= 3.8, I use $ roslaunch ultralytics_ros tracker.launch debug:=true and get ModuleNotFoundError: No module named 'ultralytics'. Is it possible to run this project under ROS melodic and if so what should I do?

@Alpaca-zip
Copy link
Owner

Thank you @miao202, for asking your question.

My package melodic-devel is compatible with ROS melodic, and you can try pipenv to solve compatibility issues with Python versions.

If you need further help, please reopen this issue at any time.
Thank you.

@miao202
Copy link
Author

miao202 commented Jan 5, 2024 via email

@Alpaca-zip
Copy link
Owner

Dear @miao202 ,

Previously, I recommended directly installing Python 3.8 on Ubuntu-18.04, but I no longer advise this as it might disrupt dependencies of other packages built for melodic. For information that might be useful to you, please check the old README at the following link:
https://github.com/Alpaca-zip/ultralytics_ros/blob/f501ef66cd880a8c2afa35285662e200ec974bc1/README.md

Additionally, please be aware that the noetic-devel branch is not compatible with the melodic environment.
In noetic-devel, Python scripts use cv_bridge, which is built for Python 2 in melodic. Consequently, it does not function correctly when running ROS with Python 3.

Also, as I remember, the track() function used in noetic-devel does not work in the melodic environment.

results = self.model.track(
source=cv_image,
conf=self.conf_thres,
iou=self.iou_thres,
max_det=self.max_det,
classes=self.classes,
tracker=self.tracker,
device=self.device,
verbose=False,
retina_masks=True,
)

Best regards,

@Alpaca-zip Alpaca-zip reopened this Jan 6, 2024
@Alpaca-zip
Copy link
Owner

Dear @miao202 ,

Have the following commands been completed properly?

$ python3 -m pip install -r ultralytics_ros/requirements.txt

If ultralytics_ros has been installed correctly, you should see the following:

$ python3 -m pip list
Package                       Version
----------------------------- --------------------
...
ultralytics                   ****
...

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

2 participants