Skip to content
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

standalone library for raspicam #73

Open
christianrauch opened this issue Apr 5, 2019 · 2 comments
Open

standalone library for raspicam #73

christianrauch opened this issue Apr 5, 2019 · 2 comments

Comments

@christianrauch
Copy link

Would you mind splitting this project into a dedicated library and a thin ROS wrapper? This would make most of the code reusable by other projects.

The ROS node has quite some functionality now, that goes beyond what can be achieved with most C/C++ libraries for the Raspberry Pi camera. It would be useful for other projects to have this functionality available without ROS dependencies. This would also allow to reuse most of the code for a ROS2 node. The ROS guidelines recommend in general to export core functionality to a library and only provide a thin wrapper for the ROS node, making most code reusable.
A stand-alone library could simply interface via OpenCV images (or plain arrays) and the ROS node would provide the configuration and communication.

@rohbotics
Copy link
Member

Thanks for the suggestion.

What kind of features are you looking for from a C/C++ library that MMAL doesn't provide? Under the hood everything raspicam_node does is using the MMAL libraries, which AFIAK are largely provided by Broadcom.

I could see an argument for a C++ library that provides a more idiomatic interface than MMAL, but that seems like a tremendous undertaking. Especially considering documentation, maintenance, etc.

@christianrauch
Copy link
Author

I am looking for a high-level API to simply access the camera data. Large portions of the ROS node code is for settings up the camera and reading data from it. This is independent of the ROS configuration and communication and could be extracted into a library.
E.g. I am maintaining a fork of this repo at https://github.com/christianrauch/raspicam2_node as a ROS2 node. I separated the ROS2 (RasPiCamPublisherNode.cpp) from the camera code (raspicam.cpp) and you basically communicte via callbacks.
Such a library could be created to serve as common logic for a ROS1 and ROS2 node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants