Main Page
Namespaces
Classes
Files
File List
File Members
src
yolo_object_detector_nodelet.cpp
Go to the documentation of this file.
1
/*
2
* Author: Timon Homberger
3
* Institute: ETH Zurich, Robotic Systems Lab
4
*/
5
6
#include <
nodelet/nodelet.h
>
7
#include <
pluginlib/class_list_macros.h
>
8
#include <
ros/ros.h
>
9
#include <
darknet_ros/YoloObjectDetector.hpp
>
10
11
class
DarknetRosNodelet
:
public
nodelet::Nodelet
{
12
public
:
13
DarknetRosNodelet
() =
default
;
14
~DarknetRosNodelet
() {
15
if
(
darknetRos_
)
delete
darknetRos_
;
16
}
17
18
private
:
19
virtual
void
onInit
() {
20
ros::NodeHandle
NodeHandle(
"~"
);
21
NodeHandle =
getPrivateNodeHandle
();
22
darknetRos_
=
new
darknet_ros::YoloObjectDetector
(NodeHandle);
23
}
24
25
darknet_ros::YoloObjectDetector
*
darknetRos_
;
26
};
27
28
// Declare as a Plug-in
29
PLUGINLIB_EXPORT_CLASS
(
DarknetRosNodelet
,
nodelet::Nodelet
);
PLUGINLIB_EXPORT_CLASS
PLUGINLIB_EXPORT_CLASS(DarknetRosNodelet, nodelet::Nodelet)
ros::NodeHandle
YoloObjectDetector.hpp
nodelet::Nodelet::getPrivateNodeHandle
ros::NodeHandle & getPrivateNodeHandle() const
darknet_ros::YoloObjectDetector
Definition:
YoloObjectDetector.hpp:79
nodelet.h
nodelet::Nodelet
class_list_macros.h
DarknetRosNodelet::~DarknetRosNodelet
~DarknetRosNodelet()
Definition:
yolo_object_detector_nodelet.cpp:14
DarknetRosNodelet::onInit
virtual void onInit()
Definition:
yolo_object_detector_nodelet.cpp:19
ros.h
DarknetRosNodelet
Definition:
yolo_object_detector_nodelet.cpp:11
DarknetRosNodelet::darknetRos_
darknet_ros::YoloObjectDetector * darknetRos_
Definition:
yolo_object_detector_nodelet.cpp:25
DarknetRosNodelet::DarknetRosNodelet
DarknetRosNodelet()=default
darknet_ros
Author(s): Marko Bjelonic
autogenerated on Wed May 5 2021 02:58:30