laser_simulator_node.cpp
Go to the documentation of this file.
1 #include "ros/ros.h"
2 
4 
5 int main(int argc, char **argv)
6 {
7  ros::init(argc,argv, "laser_simulator");
8  ros::NodeHandle nh("~");
9 
10  LaserScannerSimulator laser_sim(&nh);
12 
13  ROS_INFO("--- Starting LaserScanner simulator");
14 
15  ros::Duration(0.5).sleep();
16 
17  laser_sim.start();
18 
19  spinner.start();
20  while (nh.ok()) {
21  //ros::spinOnce();
22  ros::Duration(0.01).sleep();
23  }
24  spinner.stop();
25 
26  laser_sim.stop();
27 
28  return 0;
29 
30 } // end main
ros::init
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
ros.h
LaserScannerSimulator::start
void start()
Definition: laser_simulator.cpp:44
ros::AsyncSpinner
LaserScannerSimulator::stop
void stop()
Definition: laser_simulator.cpp:52
spinner
void spinner()
LaserScannerSimulator
Definition: laser_simulator.h:17
laser_simulator.h
main
int main(int argc, char **argv)
Definition: laser_simulator_node.cpp:5
ros::NodeHandle::ok
bool ok() const
ros::Duration::sleep
bool sleep() const
ROS_INFO
#define ROS_INFO(...)
ros::Duration
ros::NodeHandle


mobile_robot_simulator
Author(s): Mikkel Rath Pedersen
autogenerated on Thu Jun 2 2022 02:16:58