ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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; } }
2 | No.2 Revision |
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]);
} }