33 #ifndef ROBOT_LOCALIZATION_ROS_ROBOT_LOCALIZATION_LISTENER_H 34 #define ROBOT_LOCALIZATION_ROS_ROBOT_LOCALIZATION_LISTENER_H 43 #include <nav_msgs/Odometry.h> 44 #include <geometry_msgs/AccelWithCovarianceStamped.h> 85 bool getState(
const double time,
const std::string& frame_id,
86 Eigen::VectorXd& state, Eigen::MatrixXd& covariance,
87 std::string world_frame_id =
"")
const;
101 Eigen::VectorXd& state, Eigen::MatrixXd& covariance,
102 const std::string& world_frame_id =
"")
const;
125 void odomAndAccelCallback(
const nav_msgs::Odometry& odom,
const geometry_msgs::AccelWithCovarianceStamped& accel);
171 #endif // ROBOT_LOCALIZATION_ROS_ROBOT_LOCALIZATION_LISTENER_H
RosRobotLocalizationListener class.
std::string world_frame_id_
Frame id received from the odometry message.
bool getState(const double time, const std::string &frame_id, Eigen::VectorXd &state, Eigen::MatrixXd &covariance, std::string world_frame_id="") const
Get a state from the localization estimator.
ros::NodeHandle nh_p_
A private handle to the ROS node.
message_filters::Subscriber< geometry_msgs::AccelWithCovarianceStamped > accel_sub_
Subscriber to the acceleration state topic (output of a filter node)
ros::NodeHandle nh_
A public handle to the ROS node.
Robot Localization Listener class.
~RosRobotLocalizationListener()
Destructor.
const std::string & getBaseFrameId() const
getBaseFrameId Returns the base frame id of the localization listener
void odomAndAccelCallback(const nav_msgs::Odometry &odom, const geometry_msgs::AccelWithCovarianceStamped &accel)
Callback for odom and accel.
tf2_ros::TransformListener tf_listener_
Transform listener to fill the tf_buffer.
message_filters::TimeSynchronizer< nav_msgs::Odometry, geometry_msgs::AccelWithCovarianceStamped > sync_
Waits for both an Odometry and an Accel message before calling a single callback function.
RobotLocalizationEstimator * estimator_
The core state estimator that facilitates inter- and extrapolation between buffered states...
const std::string & getWorldFrameId() const
getWorldFrameId Returns the world frame id of the localization listener
tf2_ros::Buffer tf_buffer_
Tf buffer for looking up transforms.
RosRobotLocalizationListener()
Constructor.
std::string base_frame_id_
Child frame id received from the Odometry message.
message_filters::Subscriber< nav_msgs::Odometry > odom_sub_
Subscriber to the odometry state topic (output of a filter node)