8 #include <sensor_msgs/NavSatFix.h> 9 #include <sensor_msgs/Imu.h> 10 #include <nav_msgs/Odometry.h> 19 :
nh_(node_handle),
pnh_(private_node_handle)
28 void ekfCallback(
const nav_msgs::OdometryConstPtr& ekf_msg);
52 gps_pub_ =
nh_.
advertise<sensor_msgs::NavSatFix>(
"/piksi_receiver/navsatfix_best_fix/corrected_latency", 1000);
57 ekf_pub_ =
nh_.
advertise<nav_msgs::Odometry>(
"/odometry/filtered/global/corrected_latency", 1000);
69 sensor_msgs::NavSatFix gps_latency_msg;
70 gps_latency_msg = *gps_msg;
72 gps_latency_msg.header.stamp = gps_msg->header.stamp - gps_latency_2rosdur;
83 sensor_msgs::Imu heading_latency_msg;
84 heading_latency_msg = *heading_msg;
86 heading_latency_msg.header.stamp = heading_msg->header.stamp - gps_latency_2rosdur;
93 nav_msgs::Odometry ekf_latency_msg;
94 ekf_latency_msg = *ekf_msg;
96 ekf_latency_msg.header.stamp = ekf_msg->header.stamp - ekf_latency_2rosdur;
100 int main(
int argc,
char **argv)
void ekfCallback(const nav_msgs::OdometryConstPtr &ekf_msg)
ros::Publisher heading_pub_
RemoveLatency(const ros::NodeHandle &node_handle, const ros::NodeHandle &private_node_handle)
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void gpsCallback(const sensor_msgs::NavSatFixConstPtr &msg)
ROSCPP_DECL void spin(Spinner &spinner)
ros::Subscriber heading_sub_
int main(int argc, char **argv)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
bool getParam(const std::string &key, std::string &s) const
void headingCallback(const sensor_msgs::ImuConstPtr &heading_msg)