-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Enhance camera features, stability and performance #16
Conversation
Changing output encoding to RGB24 or any other RGB variation (RGBA, BGR...) is failing:
Looking for the workaround... |
This is great, I have just managed to do it with |
Camera info data is read from a YAML file (with a default one provided with the package), so it can be easily modified in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many very minor polishing comments but the general design is very good.
Have you been able to measure quantitatively a performance improvment?
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
Co-Authored-By: David Mansolino <David.Mansolino@cyberbotics.com>
JPEG performance should not be impacted. I will check for raw RGB since we were getting only like 4fps onboard it should be much better now. Update 1Unfortunately, there are no improvements, it's about the same. This is strange. Investigating... Update 2I suspected that copying an array in the following line takes a lot of time: epuck_ros2/epuck_ros2_camera/src/camera.cpp Line 148 in 6992281
so I changed it, but the results are about the same (3.5fps - 4fps). Update 3Looking into ROS2 middlewares if it makes sense changing them. Default one, eProsima’s FastRTPS doesn't support shared memory: Update 4This is a CPU usage:
in which Update 5It seems there are a lot of message drops because it takes less than 100ms to convert an image and execute |
from rclpy.node import Node | ||
from sensor_msgs.msg import Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is very good, but I am just wondering if using ROS here is not a bit overkilled.
Wouldn't it be simpler just to create a simple python script without any ROS dependency that would read the image directly from the camera by itself (since their is already a dependency on opencv, opencv has a module for doing this, this is maybe not as efficient as what you implemented in the camera node, but since it is only used for calibration it doesn't really matter)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I didn't consider running the calibration onboard. This way I have a nice preview of the images I am taking. Also I afraid of running findChessboardCorners()
and especially calibrateCamera()
since those two can be really demanding even for my PC (takes a few seconds depending on the number of images).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, been able to run the calibration offboard is a good reason 😃
Description
Use GPU to perform YUV422 to RGB conversion and publish
camera_info
topic.Related Issues
Fixes #15
Tasks
compressed
,raw
andnone
camera_info
topicAdditional context
camera_info
requires a camera calibration with a checkboard (for calibration matrix, with Webots it was easy, the focal length is known and there are no distortions). Since Corona forbids me from going to EPFL to print the checkboard it may take a while. Therefore, I will estimate parameters now and calibrate them as soon as I print the checkboard (open a separated issue).