hector sonar
I want to know if libhector_gazebo_sonar works with only one array of Ray data in it field of view. I am testing the sonar right now but the lectures are very bad. If the object is inside the range and inside the field of view, over the mid of the field of view the range becomes the max range without detecting any object. I need detect all objects in the field of view because I want to know where I have to put my sensors.
I upload some images to explain better the case.
http://s15.postimage.org/k1gsg4k6j/sonarwrong_c.png
http://postimage.org/image/p04aunnzb/
4 images:
The first the sonar sensor works very well. The second: only a little up the sensor doesn't detect anything. The third and forth the same case but another perspective.
The field of view in libhector_gazebo_ros_sonar is calculate in this line of code:
range_.field_of_view = std::min(fabs((sensor_->GetAngleMax() - sensor_->GetAngleMin()).GetAsRadian()), fabs((sensor_->GetVerticalAngleMax() - sensor_->GetVerticalAngleMin().GetAsRadian()).GetAsRadian()));
I notice GetVerticalAngleMax() don't have the method .GetAsRadian() as angle min has. I don't know if this is the bug.
range_.field_of_view = std::min(fabs((sensor_->GetAngleMax() - sensor_->GetAngleMin()).GetAsRadian()), fabs((sensor_->GetVerticalAngleMax() - sensor_->GetVerticalAngleMin()).GetAsRadian()));
Any Ideas?
Which ROS distribution and version of Gazebo do you use? There was a bug in ray sensor simulation in the released simulator_gazebo stack for fuerte prior to 1.6.13, which caused the simulated rays to be shot towards the x-axis instead of downwards.
I am working in Fuerte with Gazebo 1.0.2 (release version last update 5 Sept 2012) How Could I fix this bug? If I roll pi/2 the sensor, works very well only with horizontal sensors. The vertical sensors don't work.