NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
ros_zones_rapid_compressed_file.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 #ifndef DDS_ROS_BRIDGE_ROS_ZONES_RAPID_COMPRESSED_FILE_H_
20 #define DDS_ROS_BRIDGE_ROS_ZONES_RAPID_COMPRESSED_FILE_H_
21 
22 #include <cstring>
23 #include <iostream>
24 #include <map>
25 #include <memory>
26 #include <string>
27 #include <vector>
28 
29 #include "boost/iostreams/copy.hpp"
30 #include "boost/iostreams/device/back_inserter.hpp"
31 #include "boost/iostreams/device/array.hpp"
32 #include "boost/iostreams/filter/zlib.hpp"
33 #include "boost/iostreams/filtering_stream.hpp"
34 
35 #include "dds_ros_bridge/ros_sub_rapid_pub.h"
36 #include "dds_ros_bridge/util.h"
37 
38 #include "ff_msgs/GetZones.h"
39 #include "ff_msgs/Zone.h"
40 
41 #include "visualization_msgs/MarkerArray.h"
42 
43 #include "knDds/DdsTypedSupplier.h"
44 
45 #include "rapidUtil/RapidHelper.h"
46 
47 #include "dds_msgs/AstrobeeConstants.h"
48 #include "dds_msgs/CompressedFileSupport.h"
49 
50 namespace ff {
51 
53  public:
54  RosZonesToRapidCompressedFile(const std::string& subscribe_topic,
55  const std::string& get_zones_srv,
56  const std::string& pub_topic,
57  const ros::NodeHandle &nh,
58  const unsigned int queue_size = 10);
59 
60  void Callback(visualization_msgs::MarkerArray::ConstPtr const& zones);
61 
62  private:
63  using Supplier = kn::DdsTypedSupplier<rapid::ext::astrobee::CompressedFile>;
64  using SupplierPtr = std::unique_ptr<Supplier>;
65 
66  SupplierPtr file_supplier_;
67 
68  ros::ServiceClient get_zones_client_;
69 };
70 
71 } // end namespace ff
72 
73 #endif // DDS_ROS_BRIDGE_ROS_ZONES_RAPID_COMPRESSED_FILE_H_
ff::RosSubRapidPub
Definition: ros_sub_rapid_pub.h:30
ff
Definition: generic_rapid_msg_ros_pub.h:36
ff::RosZonesToRapidCompressedFile::RosZonesToRapidCompressedFile
RosZonesToRapidCompressedFile(const std::string &subscribe_topic, const std::string &get_zones_srv, const std::string &pub_topic, const ros::NodeHandle &nh, const unsigned int queue_size=10)
Definition: ros_zones_rapid_compressed_file.cc:21
ff::RosZonesToRapidCompressedFile
Definition: ros_zones_rapid_compressed_file.h:52
ff::RosZonesToRapidCompressedFile::Callback
void Callback(visualization_msgs::MarkerArray::ConstPtr const &zones)
Definition: ros_zones_rapid_compressed_file.cc:43