-
Notifications
You must be signed in to change notification settings - Fork 4
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
Multiple cameras #5
Comments
Hi Ashley Certainly. Connect one camera and run
Repeat with the other camera. You can use either the full name, the user defined name or the serial number to select a particular camera. I just added the serial number option because I found it to be more reliable than the full name (which in case of USB cameras includes topology information which can change). You may also want to remap the namespace so the output topic will not clash:
Good luck with your project! |
Hello! I will check it today and write an answer. I'm afraid if i run two instances of the program, the performance will decrease. Thanks. |
Sorry for the long answer. I checked, it works. I want to ask, how can I reduce the load on the CPU? If two cameras are started, there is a high load on the CPU and "buffer error" errors appear |
@fhwedel-hoe |
Nice to hear that.
I reduced the CPU overhead as much as I could. As part of it's communications design, ROS2 will always create a copy of the data which is published. That is what causes a large amount of CPU load on my set-up. Keep in mind that I cannot know for sure what causes the CPU load in your particular set-up. There has been some extensive discussion here at ros-perception/image_common#216. Bottom line is: If you want speed, do not use ROS2 for image transport. Have one ROS node which connects to one camera. Do the image analysis immediately within that node. Publish only the relevant data (small amounts of data e.g. position of detected markers). Of course, you will not be able to view the image via ROS2 tools. :(
Unfortunately, I have no idea. By default, this node just connects to the camera and starts grabbing. The settings used in PylonViewer are kept. However, I have been told that some Basler cameras revert to their default settings when power cycled. You can save the PylonViewer settings into a file and then supply that file to this node by using the parameter |
@fhwedel-hoe hi, Thanks for answer. Last question. Let me ask you something. Why did you decide to write your own frame capture code instead of using the available official driver? |
The official node uses the camera in software trigger mode. The node has the authority. That means:
This driver can use the "overlap" mode (you need to configure your camera to use that in PylonViewer) available in dart cameras (and possibly other models, too). Che camera has the authority. With this, the procedure is:
Since the camera can transfer one frame while capturing the next one, the effective frame-rate is doubled. |
Hello!
Tell me please. How can I connect two cameras and publish them to different topics?
The text was updated successfully, but these errors were encountered: