Comments (5)
The main downside would be that since this changes topics, it would break current setups that people have. For that reason, it would probably only make sense if a new branch is created for kinetic/lunar so that the indigo code could be left unchanged, or maybe some workaround where images are published on both new and old topics for now.
A couple of links:
The ROS driver for point grey cameras, which I think is one of the best designed ROS drivers:
https://github.com/ros-drivers/pointgrey_camera_driver
Image proc on the ROS wiki, which has examples on how to do both debayering and rectification: http://wiki.ros.org/image_proc
from pylon_camera.
Thanks a lot for the explanation!
The reason why we decided to not do it the standard way is that the continuous publishing of images under a topic leads to problems if you have multiple nodes requesting images with different settings (e.g one node requests for bright images, and just afterwards another one asks for dark ones).
So, to make sure, that every node gets only the images it wants, we implemented the action based acquisition, where after each grab all previous settings are restored. Because the image_proc pkg works only on normal topics, we made the rectification part of the pylon_camera pkg.
But I can see the point with the private namespace. I would propose to add a new optional parameter that is a string and defaulting to ~
. With that we would be backwards compatible and we could get rid of the private ns. What do you think?
from pylon_camera.
Ah, I understand. The action server is cool - definitely one of the better ways to handle cases where you want synchronous behavior. The asynchronous nature of pub/sub makes many things easier (introspection, logging, visualization) but definitely comes up short when ordering of operations and avoiding conflicts because multiple clients want to control a resource.
Ideally there should be some way to preserve the actionlib functionality you need while still providing an interface that meshes nicely with patterns used in other image processing ROS packages.
One possible idea: action server that sets the settings and returns timestamps in its feedback. Each timestamp in the feedback would correspond exactly to the timestamp of an image that has been taken with the settings asked for by that node, and published on the public image_raw
topic.
Advantages
- other nodes could still use the images published if they don't care so much about the settings
- standard topics mean that image_proc could still be used. Any node (including the one who made sent the action goal) could use
image_raw
orimage_rect
, and evenimage_color
(created by debayering nodelet). The timestamps for those images will be identical. - putting the timestamps in the feedback means that the clients can use the images immediately if they want to, rather than doing batch processing at the end.
Disadvantages
- a bit more work on the client side. Nodes will need to use the action server, and also get messages on the main message topic, plus match timestamps to figure out witch messages are theirs. This could be abstracted into a small C++ or python client class though, making things easy for users.
from pylon_camera.
One other thought: dynamic_reconfigure is often useful for these types of things. It is synchronous, since it uses a service to update the settings on the server node (in this case the pylon_camera node). The thing it doesn't have, which actionlib does, is the ability to block other nodes from changing the camera settings for a while.
from pylon_camera.
Great thread. This sort of information should be put up somewhere common as the best practice for implementing ROS sensor driver.
from pylon_camera.
Related Issues (20)
- Problems with compiling
- Pylon software debian download gives 404 HOT 1
- Error Payload data on publish images HOT 7
- Visual artifacts on image_rect ROS topic when using "bayer_rggb8" encoding HOT 2
- Grabbing image unsuccesfully
- graping image from multi-camera HOT 1
- Default config/MTU problem HOT 3
- Changing Capture Resolution HOT 1
- The device is currently in use by another application! HOT 1
- How to set ROI? HOT 2
- unable to process source HOT 2
- Missing opencv dependency on installation HOT 1
- Cameras keep losing connection HOT 5
- Is there a way to set the camera width and height? HOT 1
- Problem with Jetson Nano
- timestampt incorrect HOT 1
- Basler Camera requires Dockercontainer restart
- Very low frame rate in ROS
- Basler acA2500-14gc (23363392) Image acquisition on "Basler acA2500-14gc (23363392)" failed! Error: 0xe1000014 "The buffer was incompletely grabbed.
- Error in README installation
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 pylon_camera.