20 #ifndef DDS_ROS_BRIDGE_ROS_BATTERY_STATE_H_
21 #define DDS_ROS_BRIDGE_ROS_BATTERY_STATE_H_
27 #include "knDds/DdsTypedSupplier.h"
29 #include "dds_ros_bridge/ros_sub_rapid_pub.h"
30 #include "dds_ros_bridge/util.h"
32 #include "ff_hw_msgs/EpsBatteryLocation.h"
33 #include "sensor_msgs/BatteryState.h"
34 #include "sensor_msgs/Temperature.h"
36 #include "dds_msgs/AstrobeeConstants.h"
37 #include "dds_msgs/EpsStateSupport.h"
38 #include "dds_msgs/EpsConfigSupport.h"
40 #include "rapidUtil/RapidHelper.h"
47 std::string
const& sub_topic_battery_state_TR,
48 std::string
const& sub_topic_battery_state_BL,
49 std::string
const& sub_topic_battery_state_BR,
50 std::string
const& sub_topic_battery_temp_TL,
51 std::string
const& sub_topic_battery_temp_TR,
52 std::string
const& sub_topic_battery_temp_BL,
53 std::string
const& sub_topic_battery_temp_BR,
54 std::string
const& pub_topic,
55 ros::NodeHandle
const& nh,
56 const unsigned int queue_size = 10);
58 void AddTempToState(rapid::ext::astrobee::BatterySlot slot,
float temp);
68 using ConfigSupplier = kn::DdsTypedSupplier<rapid::ext::astrobee::EpsConfig>;
69 using ConfigSupplierPtr = std::unique_ptr<ConfigSupplier>;
71 ConfigSupplierPtr config_supplier_;
73 using StateSupplier = kn::DdsTypedSupplier<rapid::ext::astrobee::EpsState>;
74 using StateSupplierPtr = std::unique_ptr<StateSupplier>;
76 StateSupplierPtr state_supplier_;
78 ros::Subscriber sub_battery_state_tl_, sub_battery_state_tr_;
79 ros::Subscriber sub_battery_state_bl_, sub_battery_state_br_;
80 ros::Subscriber sub_battery_temp_tl_, sub_battery_temp_tr_;
81 ros::Subscriber sub_battery_temp_bl_, sub_battery_temp_br_;
83 int battery_time_multiple_;
88 #endif // DDS_ROS_BRIDGE_ROS_BATTERY_STATE_H_