NASA Astrobee Robot Software
Astrobee Version:
develop
master
ros2
v0.17.0
v0.17.1
v0.17.2
v0.17.3
v0.18.0
v0.19.0
v0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
Main Page
Modules
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
flashlight_nodelet.h
Go to the documentation of this file.
1
/* Copyright (c) 2017, United States Government, as represented by the
2
* Administrator of the National Aeronautics and Space Administration.
3
*
4
* All rights reserved.
5
*
6
* The Astrobee platform is licensed under the Apache License, Version 2.0
7
* (the "License"); you may not use this file except in compliance with the
8
* License. You may obtain a copy of the License at
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
* License for the specific language governing permissions and limitations
16
* under the License.
17
*/
18
19
20
#ifndef FLASHLIGHT_ROS_FLASHLIGHT_NODELET_H_
21
#define FLASHLIGHT_ROS_FLASHLIGHT_NODELET_H_
22
23
24
#include <pluginlib/class_list_macros.h>
25
26
#include <ros/ros.h>
27
#include <ros/service_server.h>
28
29
#include <
config_reader/config_reader.h
>
30
#include <ff_hw_msgs/SetFlashlight.h>
31
#include <
ff_common/ff_names.h
>
32
#include <
ff_util/ff_nodelet.h
>
33
34
#include <
flashlight/flashlight.h
>
35
#include <
i2c/i2c_new.h
>
36
37
#include <memory>
38
#include <stdexcept>
39
#include <string>
40
#include <system_error>
// NOLINT
41
42
namespace
flashlight
{
43
namespace
ros
{
44
45
class
FlashlightNodelet
:
public
::ff_util::FreeFlyerNodelet
{
46
using
FlashlightPtr = std::unique_ptr<Flashlight>;
47
48
public
:
49
FlashlightNodelet
();
50
~FlashlightNodelet
();
51
bool
OnService
(ff_hw_msgs::SetFlashlight::Request &req,
52
ff_hw_msgs::SetFlashlight::Response &resp);
53
54
protected
:
55
virtual
void
Initialize
(::ros::NodeHandle *nh);
56
57
private
:
58
FlashlightPtr light_;
59
::ros::ServiceServer server_;
60
};
61
62
}
// namespace ros
63
}
// namespace flashlight
64
65
#endif // FLASHLIGHT_ROS_FLASHLIGHT_NODELET_H_
flashlight::ros::FlashlightNodelet::OnService
bool OnService(ff_hw_msgs::SetFlashlight::Request &req, ff_hw_msgs::SetFlashlight::Response &resp)
Definition:
flashlight_nodelet.cc:48
ros
Definition:
pcl_conversions.h:269
flashlight::ros::FlashlightNodelet::Initialize
virtual void Initialize(::ros::NodeHandle *nh)
Definition:
flashlight_nodelet.cc:75
flashlight
Definition:
flashlight.h:24
ff_nodelet.h
flashlight::ros::FlashlightNodelet::FlashlightNodelet
FlashlightNodelet()
Definition:
flashlight_nodelet.cc:25
ff_util::FreeFlyerNodelet
Definition:
ff_nodelet.h:57
ff_names.h
flashlight.h
config_reader.h
i2c_new.h
flashlight::ros::FlashlightNodelet
Definition:
flashlight_nodelet.h:45
flashlight::ros::FlashlightNodelet::~FlashlightNodelet
~FlashlightNodelet()
Definition:
flashlight_nodelet.cc:29