camera_aravis_node.cpp
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * camera_aravis
4  *
5  * Copyright © 2022 Fraunhofer IOSB and contributors
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  *
22  ****************************************************************************/
23 
24 // This is a ROS node that operates GenICam-based cameras (e.g. USB3Vision compatible) via the Aravis library.
25 // Commonly available camera features are supported through the dynamic_reconfigure user-interface and GUI,
26 // and for those features not in the GUI but that are specific to a camera, they can be set in the
27 // camera by setting the appropriate parameter at startup. This code reads those parameters, and
28 // if any of them match a camera feature, then the camera is written to.
29 //
30 // For example, if a camera has a feature called "IRFormat" that is an integer 0, 1, or 2, you can do
31 // rosparam set camnode/IRFormat 2
32 // and this driver will write it to the camera at startup. Note that the datatype of the parameter
33 // must be correct for the camera feature (e.g. bool, int, double, string, etc), so for example you should use
34 // rosparam set camnode/GainAuto true
35 // and NOT
36 // rosparam set camnode/GainAuto 1
37 //
38 
40 
41 #include <nodelet/loader.h>
42 
43 int main(int argc, char** argv)
44 {
45  ros::init(argc, argv, "camera_aravis");
46  nodelet::Loader manager(ros::NodeHandle("~"));
48  nodelet::V_string nargv;
49  manager.load(ros::this_node::getName(), "camera_aravis/CameraAravisNodelet", remap, nargv);
50  ros::spin();
51 
52  return 0;
53 }
nodelet::V_string
std::vector< std::string > V_string
nodelet::M_string
std::map< std::string, std::string > M_string
loader.h
ros::init
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
nodelet::Loader
nodelet::Loader::load
bool load(const std::string &name, const std::string &type, const M_string &remappings, const V_string &my_argv)
main
int main(int argc, char **argv)
Definition: camera_aravis_node.cpp:43
ros::names::getRemappings
const ROSCPP_DECL M_string & getRemappings()
camera_aravis_nodelet.h
remap
ROSCPP_DECL std::string remap(const std::string &name)
ros::this_node::getName
const ROSCPP_DECL std::string & getName()
ros::spin
ROSCPP_DECL void spin()
ros::NodeHandle


camera_aravis
Author(s): Boitumelo Ruf, Fraunhofer IOSB , Dominik Kleiser, Fraunhofer IOSB , Dominik A. Klein, Fraunhofer FKIE , Steve Safarik, Straw Lab , Andrew Straw, Straw Lab , Floris van Breugel, van Breugel Lab
autogenerated on Wed Sep 25 2024 02:23:21