mrpt_rbpf_slam_node.cpp
Go to the documentation of this file.
00001 #include "mrpt_rbpf_slam/mrpt_rbpf_slam_wrapper.h"
00002 
00003 int main(int argc, char** argv)
00004 {
00005   ros::init(argc, argv, "mrpt_rpbf_slam");
00006   ros::NodeHandle nh;
00007   ros::NodeHandle nh_p("~");
00008 
00009   // Setup ros loop frequency from params
00010   double frequency;
00011   nh_p.param("update_loop_frequency", frequency, 100.);
00012   ros::Rate rate(frequency);
00013 
00014   mrpt_rbpf_slam::PFslamWrapper slam;
00015   // Read parameters and configure node
00016   // and setup callbacks
00017   if (!slam.getParams(nh_p) || !slam.init(nh))
00018   {
00019     return EXIT_FAILURE;
00020   }
00021 
00022   ros::Duration(1).sleep();
00023 
00024   // If play from rawlog file options is specified
00025   // play and then terminate application
00026   if (slam.rawlogPlay())
00027   {
00028     return EXIT_SUCCESS;
00029   }
00030 
00031   // Otherwise work as a usual rosnode
00032   while (ros::ok())
00033   {
00034     ros::spinOnce();
00035     rate.sleep();
00036   }
00037 }


mrpt_rbpf_slam
Author(s): Vladislav Tananaev
autogenerated on Thu Jun 6 2019 21:40:36