41 #include <boost/thread.hpp> 44 #include <sensor_msgs/LaserScan.h> 58 sensor_msgs::LaserScan scan;
59 scan.header.frame_id =
"/dummy_laser_link";
61 scan.angle_max = 99.0;
62 scan.angle_increment = 1.0;
63 scan.time_increment = .001;
66 scan.range_max = 100.0;
68 const unsigned int N = 100;
69 scan.ranges.resize(N);
70 scan.intensities.resize(N);
72 for (
unsigned int i=0; i<N; i++)
74 scan.ranges[i] = 10.0;
75 scan.intensities[i] = 10.0;
89 int main(
int argc,
char** argv)
93 boost::thread run_thread(&
runLoop);
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ROSCPP_DECL void spin(Spinner &spinner)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
int main(int argc, char **argv)