# Revision history [back]

### I created a gpu_ray sensor, with 4 beams, why am I only getting 2 different numbers?

So I am trying to construct a sensor that has 4 beams that are outward from vehicle. So I created a sensor with 2 horizontal samples, and 2 vertical samples. The problem is when I loop through the ranges, even if I have the beams tilted against the ground, so I should get 4 very different ranges, I get the first 2 that are very close, and the second 2 are very close. Am I misunderstand something with regards?

         <ray>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.02</stddev>
</noise>
<scan>
<horizontal>
<samples>2</samples>
<resolution>1</resolution>
<min_angle>-0.5236</min_angle>
<max_angle>0.5236</max_angle>
</horizontal>
<vertical>
<samples>2</samples>
<resolution>1</resolution>
<min_angle>-0.5236</min_angle>
<max_angle>0.5236</max_angle>
</vertical>
</scan>
<range>
<min>1</min>
<max>100</max>
<resolution>0.1</resolution>
</range>
</ray>

for (int i = 0; i < this->parentSensor->RangeCount() * this->parentSensor->VerticalRangeCount(); i++)
{
ss << "," << this->parentSensor->Range(i);
}