NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
ros_compressed_image_rapid_image.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_COMPRESSED_IMAGE_RAPID_IMAGE_H_
20 #define DDS_ROS_BRIDGE_ROS_COMPRESSED_IMAGE_RAPID_IMAGE_H_
21 
22 #include <string>
23 
24 #include "dds_ros_bridge/ros_sub_rapid_pub.h"
25 
26 #include "rapidDds/MIMETypesConstants.h"
27 #include "rapidDds/RapidConstants.h"
28 
29 #include "rapidIo/ImageSensorProvider.h"
30 #include "rapidIo/RapidIoParameters.h"
31 
32 #include "sensor_msgs/CompressedImage.h"
33 
34 namespace ff {
35 
41  public:
42  RosCompressedImageRapidImage(const std::string& subscribe_topic,
43  const std::string& pub_topic,
44  const ros::NodeHandle &nh,
45  const unsigned int queue_size = 10);
46 
47  void CallBack(const sensor_msgs::CompressedImage::ConstPtr& msg);
48 
49  private:
50  std::string GetRapidMimeType(const std::string& ros_format);
51  rapid::ImageSensorProviderParameters params_;
52  std::shared_ptr<rapid::ImageSensorProvider> provider_;
53  const unsigned int MB_;
54 };
55 
56 } // end namespace ff
57 
58 #endif // DDS_ROS_BRIDGE_ROS_COMPRESSED_IMAGE_RAPID_IMAGE_H_
ff::RosCompressedImageRapidImage::CallBack
void CallBack(const sensor_msgs::CompressedImage::ConstPtr &msg)
Definition: ros_compressed_image_rapid_image.cc:48
ff::RosCompressedImageRapidImage::RosCompressedImageRapidImage
RosCompressedImageRapidImage(const std::string &subscribe_topic, const std::string &pub_topic, const ros::NodeHandle &nh, const unsigned int queue_size=10)
Definition: ros_compressed_image_rapid_image.cc:23
ff::RosSubRapidPub
Definition: ros_sub_rapid_pub.h:30
ff
Definition: generic_rapid_msg_ros_pub.h:36
ff::RosCompressedImageRapidImage
Definition: ros_compressed_image_rapid_image.h:40