ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

This sample could should work.

void mapper_direct::laserCallback(const sensor_msgs::LaserScan::ConstPtr& msg) { float theta = msg -> angle_min; for(int i = 0; i < (int)(msg -> ranges.size()); i++) { // ROS_INFO("Treating %dth laser from scan with value", i,msg->range[i]); float r; } }

This sample could should work.

void mapper_direct::laserCallback(const sensor_msgs::LaserScan::ConstPtr& msg) { float theta = msg -> angle_min; for(int i = 0; i < (int)(msg -> ranges.size()); i++) { // ROS_INFO("Treating %dth laser from scan with value", i,msg->range[i]); float r; i,msg->range[i]);

} }