Gazebo | Ignition | Community
Ask Your Question

is there any distance measuring sensor in gazebo ?

asked 2013-08-01 16:14:13 -0500

suvrat gravatar image

I m beginner in gazebo and robotics .is there any sensor in gazebo by which i find the distance of object ,i used Hokuyo laser range finders which is given in tutorial .as far i understood it send a broad laser so it detect any object in that area(circumference ) ,but how can i know in which direction obstacle is present and how can i navigate my robot to avoid obstacle .

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-02 02:50:28 -0500

Chris gravatar image

updated 2013-08-02 02:52:42 -0500

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.

edit flag offensive delete link more


thanks @Chris i will try this .thank you very much for help.

suvrat gravatar imagesuvrat ( 2013-08-02 03:23:21 -0500 )edit

No problem. If you have further questions, let me know

Chris gravatar imageChris ( 2013-08-02 03:24:18 -0500 )edit

thanks a lot @Chris ,i solved my problem

suvrat gravatar imagesuvrat ( 2013-08-03 05:04:20 -0500 )edit

Hey. I am also doing the same work of obstacle avoidance but when i did it with polarisrangermodel this control model tutorial is not working . Polaris dont stop. Can you plz suggest how will i do it with polaris ranger model so that it should stop when it detects the object. Thanks!

anonymous gravatar imageanonymous ( 2014-11-21 07:33:30 -0500 )edit

Question Tools



Asked: 2013-08-01 16:14:13 -0500

Seen: 3,649 times

Last updated: Aug 02 '13