18 #ifndef GROUND_TRUTH_LOCALIZER_GROUND_TRUTH_LOCALIZER_NODELET_H_
19 #define GROUND_TRUTH_LOCALIZER_GROUND_TRUTH_LOCALIZER_NODELET_H_
21 #include <ff_msgs/Heartbeat.h>
22 #include <ff_msgs/SetEkfInput.h>
27 #include <geometry_msgs/PoseStamped.h>
28 #include <geometry_msgs/TwistStamped.h>
29 #include <ros/node_handle.h>
30 #include <ros/publisher.h>
31 #include <ros/subscriber.h>
32 #include <std_srvs/Empty.h>
33 #include <tf2_ros/transform_broadcaster.h>
35 #include <boost/optional.hpp>
38 #include <Eigen/Geometry>
48 void Initialize(ros::NodeHandle* nh);
50 void SubscribeAndAdvertise(ros::NodeHandle* nh);
52 bool SetMode(ff_msgs::SetEkfInput::Request& req, ff_msgs::SetEkfInput::Response& res);
54 bool DefaultServiceResponse(std_srvs::Empty::Request& req, std_srvs::Empty::Response& res);
56 void PoseCallback(geometry_msgs::PoseStamped::ConstPtr
const& pose);
58 void TwistCallback(geometry_msgs::TwistStamped::ConstPtr
const& twist);
62 std::string platform_name_;
64 boost::optional<Eigen::Isometry3d> pose_;
65 boost::optional<Twist> twist_;
66 int input_mode_ = ff_msgs::SetEkfInputRequest::MODE_TRUTH;
67 ros::Subscriber pose_sub_, twist_sub_;
68 ros::Publisher state_pub_, pose_pub_, twist_pub_, heartbeat_pub_, reset_pub_;
69 ff_msgs::Heartbeat heartbeat_;
70 tf2_ros::TransformBroadcaster transform_pub_;
71 ros::ServiceServer input_mode_srv_, bias_srv_, bias_from_file_srv_, reset_srv_;
75 #endif // GROUND_TRUTH_LOCALIZER_GROUND_TRUTH_LOCALIZER_NODELET_H_