src
cv_camera_node.cpp
Go to the documentation of this file.
1
// Copyright [2015] Takashi Ogura<t.ogura@gmail.com>
2
3
#include "
cv_camera/driver.h
"
4
5
int
main
(
int
argc,
char
**argv)
6
{
7
ros::init
(argc, argv,
"cv_camera"
);
8
ros::NodeHandle
private_node(
"~"
);
9
cv_camera::Driver
driver(private_node, private_node);
10
11
try
12
{
13
driver.
setup
();
14
while
(
ros::ok
())
15
{
16
driver.
proceed
();
17
ros::spinOnce
();
18
}
19
}
20
catch
(
cv_camera::DeviceError
&e)
21
{
22
ROS_ERROR_STREAM
(
"cv camera open failed: "
<< e.what());
23
return
1;
24
}
25
26
return
0;
27
}
cv_camera::Driver
ROS cv camera driver.
Definition:
driver.h:16
ROS_ERROR_STREAM
#define ROS_ERROR_STREAM(args)
ros::init
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
driver.h
ros::spinOnce
ROSCPP_DECL void spinOnce()
cv_camera::Driver::proceed
void proceed()
Capture, publish and sleep.
Definition:
driver.cpp:100
ros::ok
ROSCPP_DECL bool ok()
main
int main(int argc, char **argv)
Definition:
cv_camera_node.cpp:5
cv_camera::DeviceError
ROS cv camera device exception.
Definition:
exception.h:16
cv_camera::Driver::setup
void setup()
Setup camera device and ROS parameters.
Definition:
driver.cpp:21
ros::NodeHandle
cv_camera
Author(s): Takashi Ogura
autogenerated on Wed Mar 2 2022 00:09:55