mrpt_rbpf_slam_node.cpp
Go to the documentation of this file.
2 
3 int main(int argc, char** argv)
4 {
5  ros::init(argc, argv, "mrpt_rpbf_slam");
7  ros::NodeHandle nh_p("~");
8 
9  // Setup ros loop frequency from params
10  double frequency;
11  nh_p.param("update_loop_frequency", frequency, 100.);
12  ros::Rate rate(frequency);
13 
15  // Read parameters and configure node
16  // and setup callbacks
17  if (!slam.getParams(nh_p) || !slam.init(nh))
18  {
19  return EXIT_FAILURE;
20  }
21 
22  ros::Duration(1).sleep();
23 
24  // If play from rawlog file options is specified
25  // play and then terminate application
26  if (slam.rawlogPlay())
27  {
28  return EXIT_SUCCESS;
29  }
30 
31  // Otherwise work as a usual rosnode
32  while (ros::ok())
33  {
34  ros::spinOnce();
35  rate.sleep();
36  }
37 }
bool sleep() const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
The PFslamWrapper class provides the ROS wrapper for Rao-Blackwellized Particle filter SLAM from MRPT...
bool getParams(const ros::NodeHandle &nh_p)
Read the parameters from launch file.
bool init(ros::NodeHandle &nh)
Initialize publishers subscribers and RBPF slam.
bool param(const std::string &param_name, T &param_val, const T &default_val) const
ROSCPP_DECL bool ok()
bool sleep()
int main(int argc, char **argv)
ROSCPP_DECL void spinOnce()


mrpt_rbpf_slam
Author(s): Vladislav Tananaev
autogenerated on Thu Jun 6 2019 19:37:56