Comments (10)
Hey @fatemeh-mohseni-AI, this repository is fully compatible with Humble. I suppose it also works in Foxy since the yolo nodes use the same code as Humble.
from yolov8_ros.
Hi @fatemeh-mohseni-AI, how you try it in Foxy?
from yolov8_ros.
hello . sorry for being late .
I tried the installation process on ubuntu 20 desktop + ROS foxy . that was successful , (I just installed the package and didn't run it )
But in dockrizing process there was an error with this content :
173.0 #All required rosdeps installed successfully
173.7 Starting >>> yolov8_ros
175.2 Finished <<< yolov8_ros [1.54s]
175.2 Starting >>> yolov8_msgs
175.8 --- stderr: yolov8_msgs
175.8 CMake Error at CMakeLists.txt:5 (find_package):
175.8 By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
175.8 has asked CMake to find a package configuration file provided by
175.8 "ament_cmake", but CMake did not find one.
175.8
175.8 Could not find a package configuration file provided by "ament_cmake" with
175.8 any of the following names:
175.8
175.8 ament_cmakeConfig.cmake
175.8 ament_cmake-config.cmake
175.8
175.8 Add the installation prefix of "ament_cmake" to CMAKE_PREFIX_PATH or set
175.8 "ament_cmake_DIR" to a directory containing one of the above files. If
175.8 "ament_cmake" provides a separate development package or SDK, be sure it
175.8 has been installed.
175.8
175.8
175.8 ---
175.8 Failed <<< yolov8_msgs [0.64s, exited with code 1]
175.9
And this is the Dockerfile :
FROM --platform=linux/amd64 ros:foxy-ros-base
ENV repo=/root/ros2_ws/src/Ros2_Yolov8
ENV wd=/root/ros2_ws
ENV ROS_DISTRO=foxy
RUN mkdir -p $repo
WORKDIR $wd
COPY . $repo
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ros-foxy-ament-cmake python3-pip python3-rosdep ros-foxy-rclpy ros-foxy-sensor-msgs
RUN cd $repo && \
pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --no-cache-dir -U rosdep colcon-common-extensions && \
cd $wd && \
rosdep update && \
rosdep install --from-paths src --ignore-src -r -y && \
colcon build
CMD ["ros2", "launch", "yolov8_bringup", "yolov8.launch.py", "model:=yolov8m-seg.pt"]
also I tried build it on ubuntu 22 , both server and desktop
from yolov8_ros.
surprisingly I just solved it .
this is the new Dockerfile :
FROM --platform=linux/amd64 ros:foxy-ros-base
ENV repo=/root/ros2_ws/src/Ros2_Yolov8
ENV wd=/root/ros2_ws
ENV ROS_DISTRO=foxy
RUN mkdir -p $repo
WORKDIR $wd
COPY . $repo
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ros-foxy-ament-cmake \
python3-pip \
python3-rosdep \
ros-foxy-rclpy \
ros-foxy-sensor-msgs && \
rm -rf /var/lib/apt/lists/*
RUN cd $repo && \
pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --no-cache-dir -U rosdep colcon-common-extensions
RUN rosdep update && \
rosdep install --from-paths src --ignore-src -r -y
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && colcon build"
CMD ["ros2", "launch", "yolov8_bringup", "yolov8.launch.py", "model:=yolov8m-seg.pt"]
this line was the solution :
/bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash
I have just created the Dockerfile for both amd and arm systems like Jetson families
I can share it if you want .
from yolov8_ros.
another error occurred :
source /opt/ros/foxy/setup.bash
No module named 'rclpy.lifecycle'
from yolov8_ros.
Yeah, Python lifecycle is only available from Humble. A foxy branch can be created to remove them.
from yolov8_ros.
Yeah, Python lifecycle is only available from Humble. A foxy branch can be created to remove them.
So it can not be installed in foxy totally
from yolov8_ros.
You can clone the humble rclpy in your docker to include the lifecycle or you can edit yolov8_ros to replace lifecycle with nodes.
from yolov8_ros.
Hi,
I got the same problem.
When i launched yolov8_bringup yolov8.launch.py, I got this reply.
My ROS version is foxy not humble., where can i get the rclpy.lifecycle?
$ ros2 launch yolov8_bringup yolov8.launch.py
[yolov8_node-1] File "/home/user/robot_ws/install/yolov8_ros/lib/yolov8_ros/yolov8_node", line 11, in
[yolov8_node-1] load_entry_point('yolov8-ros==0.0.0', 'console_scripts', 'yolov8_node')()
[yolov8_node-1] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
[yolov8_node-1] return get_distribution(dist).load_entry_point(group, name)
[yolov8_node-1] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point
[yolov8_node-1] return ep.load()
[yolov8_node-1] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load
[yolov8_node-1] return self.resolve()
[yolov8_node-1] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve
[yolov8_node-1] module = import(self.module_name, fromlist=['name'], level=0)
[yolov8_node-1] File "/home/user/robot_ws/install/yolov8_ros/lib/python3.8/site-packages/yolov8_ros/yolov8_node.py", line 24, in
[yolov8_node-1] from rclpy.lifecycle import LifecycleNode
[yolov8_node-1] ModuleNotFoundError: No module named 'rclpy.lifecycle'
[ERROR] [yolov8_node-1]: process has died [pid 55357, exit code 1, cmd '/home/user/robot_ws/install/yolov8_ros/lib/yolov8_ros/yolov8_node --ros-args -r __node:=yolov8_node -r __ns:=/yolo --params-file /tmp/launch_params_830zfy0j -r image_raw:=/camera/rgb/image_raw'].
[tracking_node-2] Traceback (most recent call last):
[tracking_node-2] File "/home/user/robot_ws/install/yolov8_ros/lib/yolov8_ros/tracking_node", line 11, in
[tracking_node-2] load_entry_point('yolov8-ros==0.0.0', 'console_scripts', 'tracking_node')()
[tracking_node-2] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
[tracking_node-2] return get_distribution(dist).load_entry_point(group, name)
[tracking_node-2] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point
[tracking_node-2] return ep.load()
[tracking_node-2] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load
[tracking_node-2] return self.resolve()
[tracking_node-2] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve
[tracking_node-2] module = import(self.module_name, fromlist=['name'], level=0)
[tracking_node-2] File "/home/user/robot_ws/install/yolov8_ros/lib/python3.8/site-packages/yolov8_ros/tracking_node.py", line 25, in
[tracking_node-2] from rclpy.lifecycle import LifecycleNode
[tracking_node-2] ModuleNotFoundError: No module named 'rclpy.lifecycle'
[ERROR] [tracking_node-2]: process has died [pid 55359, exit code 1, cmd '/home/user/robot_ws/install/yolov8_ros/lib/yolov8_ros/tracking_node --ros-args -r __node:=tracking_node -r __ns:=/yolo --params-file /tmp/launch_params_nqpq0dp3 -r image_raw:=/camera/rgb/image_raw'].
[debug_node-3] Traceback (most recent call last):
[debug_node-3] File "/home/user/robot_ws/install/yolov8_ros/lib/yolov8_ros/debug_node", line 11, in
[debug_node-3] load_entry_point('yolov8-ros==0.0.0', 'console_scripts', 'debug_node')()
[debug_node-3] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
[debug_node-3] return get_distribution(dist).load_entry_point(group, name)
[debug_node-3] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point
[debug_node-3] return ep.load()
[debug_node-3] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load
[debug_node-3] return self.resolve()
[debug_node-3] File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve
[debug_node-3] module = import(self.module_name, fromlist=['name'], level=0)
[debug_node-3] File "/home/user/robot_ws/install/yolov8_ros/lib/python3.8/site-packages/yolov8_ros/debug_node.py", line 29, in
[debug_node-3] from rclpy.lifecycle import LifecycleNode
[debug_node-3] ModuleNotFoundError: No module named 'rclpy.lifecycle'
[ERROR] [debug_node-3]: process has died [pid 55361, exit code 1, cmd '/home/user/robot_ws/install/yolov8_ros/lib/yolov8_ros/debug_node --ros-args -r __node:=debug_node -r __ns:=/yolo --params-file /tmp/launch_params__emd98zc -r image_raw:=/camera/rgb/image_raw -r detections:=tracking'].
from yolov8_ros.
For those who want to use lifecycles in Foxy, since it is deprecated, you have to get the updated code from Humble or Rolling. But if you don't want to build al the rclpy, you can use an old version of yolov8_ros that does not use lifecycles, like 2.2.2. I hope this can help you.
from yolov8_ros.
Related Issues (20)
- ZeroDivision error HOT 7
- How to Deploy a Single Instance of yolov8_ros Node for Multiple Camera Detections HOT 7
- Could not transform: "base_link" passed to lookupTransform argument target_frame does not exist HOT 2
- Train HOT 6
- how can i convert 3d coordinate to real word coordinate? HOT 2
- How to create and train the dataset HOT 3
- Issue when trying to launch yolov8 - using realsense camera HOT 10
- base_link passed to lookupTransform argument target_frame does not exist HOT 2
- detect_3d_node.py: on_detections not being called! HOT 4
- 3D object detection Transformation issue HOT 15
- How to test this project for ROS noetic HOT 2
- UBUNUT & ROS VERSION HOT 1
- Lifecycle nodes HOT 2
- No image in Rviz2 using realsense camera! HOT 10
- missing pip module lap HOT 1
- custom yolo pretrained problem. HOT 5
- Encoding error by ultralytics prediction HOT 6
- distance to object HOT 5
- Operating system HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov8_ros.