Comments (7)
That's a bit strange. Can you check the image messages published in the image topic with ros2 echo
?
from yolov8_ros.
It looks like this:
header:
stamp:
sec: 0
nanosec: 0
frame_id: ''
height: 320
width: 320
encoding: bgr8
is_bigendian: 0
step: 0
data:
- 103
- 120
- 140
- 255
- 103
- 120
- there is a lot of similar lines with int8
- 255
- '...'
from yolov8_ros.
I edited source code of your package by edit some parameters in model.predict: augment=False and imgsz=(320,320) so it wont transform images, but it still do
from yolov8_ros.
You should fill all the fields of the messages, I mean the frame_id, the stamp and the step.
from yolov8_ros.
Frame_id and stamp is not fillable according to ros docs
I tried to fill step, but I dont actually get what it needs
In docs it described as "Full row length in bytes", and I tried to use len() or sizeof() functions on image (that I get by self.__cam.getImage()), but its not working
[yolov8_node-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/cv_bridge/core.py", line 180, in imgmsg_to_cv2 [yolov8_node-1] im = np.ndarray(shape=(img_msg.height, int(img_msg.step/dtype.itemsize/n_channels), n_channels), [yolov8_node-1] TypeError: buffer is too small for requested array
from yolov8_ros.
Why are they not fillable? As you are publishing your own image messages, you should fill it with the acquisition time and the optical frame of your simulated camera. This is important for the 3D version, which uses message synchronization and the tf.
Anyway, the step is the full row length in bytes, that is the Image Width * Bytes per Pixel. In your case, the width is 320 and the bytes per pixel are obtained from the encoding type, that is BGR8 (3 bytes per pixel). So your step is 960 bytes.
from yolov8_ros.
Thanks a lot!
It works fine for me with step, thanks for explanation, I got that stamp and id should be filled via std_msgs/Header, but it worked without it, so I decided to continue my work without it
It has issues with objects I detect, all of them has the same class_name, its strange because I tested model separately and it worked fine. But its not about issue I started, thanks a lot for your help!
from yolov8_ros.
Related Issues (20)
- Issues with launching the launch file HOT 3
- IndexError/ out of bounds in detect_3d_node using RealSense HOT 13
- size error HOT 1
- How can I get the image? HOT 10
- Detect_3d_node: tuple index out of range HOT 18
- How can I get image? part2 HOT 9
- Suggestion regarding further steps for speed estimation HOT 64
- 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
- Policy CMP0148 HOT 3
- Run YOlo8 in ROS HOT 3
- [debug_node-3] AttributeError: module 'cv2' has no attribute 'Mat' HOT 3
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.