NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
laser_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 LASER_ROS_LASER_NODELET_H_
21 #define LASER_ROS_LASER_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 
31 #include <ff_hw_msgs/SetEnabled.h>
32 #include <ff_common/ff_names.h>
33 #include <ff_util/ff_nodelet.h>
34 
35 #include <i2c/i2c_new.h>
36 #include <laser/laser.h>
37 #include <memory>
38 #include <stdexcept>
39 #include <string>
40 #include <system_error> // NOLINT
41 
42 namespace laser {
43 namespace ros {
44 
46  public:
47  LaserNodelet();
48  ~LaserNodelet();
49  bool OnService(::ff_hw_msgs::SetEnabled::Request &req,
50  ::ff_hw_msgs::SetEnabled::Response &resp);
51 
52  protected:
53  virtual void Initialize(::ros::NodeHandle *nh);
54 
55  private:
56  using LaserPtr = std::unique_ptr<Laser>;
57 
58  LaserPtr laser_;
59  ::ros::ServiceServer server_;
60 };
61 
62 } // namespace ros
63 } // namespace laser
64 
65 #endif // LASER_ROS_LASER_NODELET_H_
laser
Definition: laser.h:25
ros
Definition: pcl_conversions.h:269
laser::ros::LaserNodelet
Definition: laser_nodelet.h:45
ff_nodelet.h
laser::ros::LaserNodelet::~LaserNodelet
~LaserNodelet()
Definition: laser_nodelet.cc:29
laser::ros::LaserNodelet::LaserNodelet
LaserNodelet()
Definition: laser_nodelet.cc:25
laser.h
ff_util::FreeFlyerNodelet
Definition: ff_nodelet.h:57
ff_names.h
config_reader.h
i2c_new.h
laser::ros::LaserNodelet::OnService
bool OnService(::ff_hw_msgs::SetEnabled::Request &req, ::ff_hw_msgs::SetEnabled::Response &resp)
Definition: laser_nodelet.cc:39
laser::ros::LaserNodelet::Initialize
virtual void Initialize(::ros::NodeHandle *nh)
Definition: laser_nodelet.cc:50