NASA Astrobee Robot Software  Astrobee Version:
Flight software for the Astrobee robots operating inside the International Space Station.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ground_dds_ros_bridge.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 GROUND_DDS_ROS_BRIDGE_GROUND_DDS_ROS_BRIDGE_H_
20 #define GROUND_DDS_ROS_BRIDGE_GROUND_DDS_ROS_BRIDGE_H_
21 
22 #include <pluginlib/class_list_macros.h>
23 
24 #include <map>
25 #include <memory>
26 #include <string>
27 #include <vector>
28 
30 
38 
39 #include "ff_common/ff_names.h"
40 
41 // SoraCore Includes
42 #include "knDds/DdsSupport.h"
43 #include "knDds/DdsEntitiesFactory.h"
44 #include "knDds/DdsEntitiesFactorySvc.h"
45 
46 // miro includes
47 #include "miro/Configuration.h"
48 #include "miro/Robot.h"
49 #include "miro/Log.h"
50 
51 namespace kn {
52  class DdsEntitiesFactorySvc;
53 } // end namespace kn
54 
56 
57 class RosSubRapidPub;
58 
60  public:
63 
70  bool BuildAccessControlStateToRos(const std::string& pub_topic,
71  const std::string& name);
72  bool BuildGuestScienceDataToRos(const std::string& pub_topic,
73  const std::string& name);
74  bool BuildPositionToOdom(const std::string& pub_topic,
75  const std::string& name);
76  bool BuildSensorImageToRos(const std::string& pub_topic,
77  const std::string& name);
78 
84  bool BuildCommandToRapid(const std::string& sub_topic,
85  const std::string& name);
86 
87  bool Initialize(ros::NodeHandle *nh);
88 
89  protected:
90  bool ReadTopicInfo(const std::string& topic_abbr,
91  const std::string& sub_or_pub,
92  std::string& sub_topic,
93  bool& use);
94  bool ReadParams();
95 
96  private:
97  config_reader::ConfigReader config_params_;
98 
99  int components_, domain_id_;
100 
101  ros::NodeHandle nh_;
102 
103  std::vector<ff::RapidSubRosPubPtr> rapid_sub_ros_pubs_;
104  std::vector<ff::RosSubRapidPubPtr> ros_sub_rapid_pubs_;
105  std::shared_ptr<kn::DdsEntitiesFactorySvc> dds_entities_factory_;
106  std::string participant_name_, agent_name_, connecting_robot_;
107 };
108 
109 } // end namespace ground_dds_ros_bridge
110 
111 #endif // GROUND_DDS_ROS_BRIDGE_GROUND_DDS_ROS_BRIDGE_H_
ros_sub_rapid_pub.h
rapid_position.h
ros_command.h
ground_dds_ros_bridge::GroundDdsRosBridge::Initialize
bool Initialize(ros::NodeHandle *nh)
Definition: ground_dds_ros_bridge.cc:177
rapid_image.h
ground_dds_ros_bridge::GroundDdsRosBridge::BuildAccessControlStateToRos
bool BuildAccessControlStateToRos(const std::string &pub_topic, const std::string &name)
Definition: ground_dds_ros_bridge.cc:67
ground_dds_ros_bridge::GroundDdsRosBridge::BuildCommandToRapid
bool BuildCommandToRapid(const std::string &sub_topic, const std::string &name)
Definition: ground_dds_ros_bridge.cc:154
ground_dds_ros_bridge::GroundDdsRosBridge::BuildPositionToOdom
bool BuildPositionToOdom(const std::string &pub_topic, const std::string &name)
Definition: ground_dds_ros_bridge.cc:111
ground_dds_ros_bridge
Definition: ground_dds_ros_bridge.h:55
ground_dds_ros_bridge::GroundDdsRosBridge::BuildSensorImageToRos
bool BuildSensorImageToRos(const std::string &pub_topic, const std::string &name)
Definition: ground_dds_ros_bridge.cc:132
ground_dds_ros_bridge::GroundDdsRosBridge
Definition: ground_dds_ros_bridge.h:59
rapid_access_control_state.h
name
std::string name
Definition: eps_simulator.cc:48
kn
Definition: smart_dock_node.h:55
ff_names.h
config_reader::ConfigReader
Definition: config_reader.h:48
config_reader.h
ground_dds_ros_bridge::GroundDdsRosBridge::~GroundDdsRosBridge
~GroundDdsRosBridge()
Definition: ground_dds_ros_bridge.cc:63
rapid_sub_ros_pub.h
ground_dds_ros_bridge::GroundDdsRosBridge::ReadTopicInfo
bool ReadTopicInfo(const std::string &topic_abbr, const std::string &sub_or_pub, std::string &sub_topic, bool &use)
Definition: ground_dds_ros_bridge.cc:292
ground_dds_ros_bridge::GroundDdsRosBridge::GroundDdsRosBridge
GroundDdsRosBridge()
Definition: ground_dds_ros_bridge.cc:55
rapid_guest_science_data.h
ground_dds_ros_bridge::GroundDdsRosBridge::ReadParams
bool ReadParams()
Definition: ground_dds_ros_bridge.cc:315
ground_dds_ros_bridge::GroundDdsRosBridge::BuildGuestScienceDataToRos
bool BuildGuestScienceDataToRos(const std::string &pub_topic, const std::string &name)
Definition: ground_dds_ros_bridge.cc:89