body_tracker_nodelet.cpp
Go to the documentation of this file.
00001 /*
00002  *****************************************************************
00003  * Copyright (c) 2015 \n
00004  * Fraunhofer Institute for Manufacturing Engineering
00005  * and Automation (IPA) \n\n
00006  *
00007  *****************************************************************
00008  *
00009  * \note
00010  * Project name: Care-O-bot
00011  * \note
00012  * ROS stack name: cob_people_perception
00013  * \note
00014  * ROS package name: cob_openni2_tracker
00015  *
00016  * \author
00017  * Author: Olha Meyer
00018  * \author
00019  * Supervised by: Richard Bormann
00020  *
00021  * \date Date of creation: Jan 15, 2015
00022  *
00023  * \brief
00024  * functions for detecting people using camera data
00025  * current approach: start a nodelet to launch the BodyTracker node and
00026  * camera driver simultaneously.
00027  *
00028  *****************************************************************
00029  *
00030  * Redistribution and use in source and binary forms, with or without
00031  * modification, are permitted provided that the following conditions are met:
00032  *
00033  * - Redistributions of source code must retain the above copyright
00034  * notice, this list of conditions and the following disclaimer. \n
00035  * - Redistributions in binary form must reproduce the above copyright
00036  * notice, this list of conditions and the following disclaimer in the
00037  * documentation and/or other materials provided with the distribution. \n
00038  * - Neither the name of the Fraunhofer Institute for Manufacturing
00039  * Engineering and Automation (IPA) nor the names of its
00040  * contributors may be used to endorse or promote products derived from
00041  * this software without specific prior written permission. \n
00042  *
00043  * This program is free software: you can redistribute it and/or modify
00044  * it under the terms of the GNU Lesser General Public License LGPL as
00045  * published by the Free Software Foundation, either version 3 of the
00046  * License, or (at your option) any later version.
00047  *
00048  * This program is distributed in the hope that it will be useful,
00049  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00050  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00051  * GNU Lesser General Public License LGPL for more details.
00052  *
00053  * You should have received a copy of the GNU Lesser General Public
00054  * License LGPL along with this program.
00055  * If not, see <http://www.gnu.org/licenses/>.
00056  *
00057  ****************************************************************/
00058 
00059 #include <cob_openni2_tracker/body_tracker_nodelet.h>
00060 #include "nodelet/loader.h"
00061 #include "nodelet/NodeletList.h"
00062 #include "nodelet/NodeletLoad.h"
00063 #include "nodelet/NodeletUnload.h"
00064 
00065 PLUGINLIB_EXPORT_CLASS(BodyTrackerNodelet, nodelet::Nodelet)
00066 
00067 BodyTrackerNodelet::BodyTrackerNodelet(): Nodelet(), bt_listener(NULL)
00068 {
00069         ROS_INFO("Init BodyTrackerNodelet.");
00070 
00071 }
00072 
00073 BodyTrackerNodelet::~BodyTrackerNodelet()
00074 {
00075         if (bt_listener != NULL) {
00076                 delete bt_listener;
00077         }
00078 }
00079 
00080 void BodyTrackerNodelet::onInit()
00081 {
00082         if(bt_listener == 0)
00083                 bt_listener = new BodyTracker(getPrivateNodeHandle());
00084                 bt_listener->runTracker();
00085 }
00086 
00087 
00088 
00089 


cob_openni2_tracker
Author(s): Marcus Liebhardt , Olha Meyer
autogenerated on Fri Aug 28 2015 10:24:08