Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you take a look into the hokuyo model's SDF you can see, that the laser takes 640 samples (<samples>640</samples>). With the resolution (<resolution>1</resolution>) and the min angle and max angle (<min_angle>-2.26889</min_angle>, <max_angle>2.268899</max_angle>) you have everything you need.

Then for example in a plugin go through the samples (for this you should take a look in the control model tutorial) and check the distances: If sample 0 detects a low range then you know, that from your sensor direction in the angle of -2.26889 there is an object.

If you take a look into the hokuyo model's SDF you can see, that the laser takes 640 samples (<samples>640</samples>). With the resolution (<resolution>1</resolution>) and the min angle and max angle (<min_angle>-2.26889</min_angle>, <max_angle>2.268899</max_angle>) you have everything you need.

Then for example in a plugin go through the samples (for this you should take a look in the control model tutorial) and check the distances: If sample 0 detects a low range then you know, that from your sensor direction in the angle of -2.26889 there is an object.

Edit: perhaps its easier to connect a simple ray sensor to your mobile robot. Then you can control things like angle and samples without editing the hokuyo model.