Ask Your Question
2

Adding ultrasonic sensor to the robot

asked 2017-04-24 15:59:39 -0500

FAIZ gravatar image

Hello everyone. I am new to ROS and was using gazebo for simulation of Innok_Heros robot. Is it possible to add ultrasonic sensor to this robot, if yes can someone please hint me on the method to do the same.

Thank you.

-FAIZ.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-04-24 20:45:30 -0500

Geoff gravatar image

updated 2017-04-24 20:45:51 -0500

You can use the gazebo_ros_range plugin to simulate an ultrasonic (sonar) sensor. Look at lines 82 to 115 of this test world file to see how to add one to your own simulated robot.

edit flag offensive delete link more

Comments

Thank you for the reply, I am using urdf file. Will this work on that.

FAIZ gravatar image FAIZ  ( 2017-04-25 00:10:31 -0500 )edit

Yes, you can put the relevant information in your URDF file wrapped in a <gazebo> tag. See this tutorial on using URDF with Gazebo and this one on adding a laser scanner to the URDF.

Geoff gravatar image Geoff  ( 2017-04-25 00:32:22 -0500 )edit
0

answered 2020-07-08 07:17:21 -0500

I agree with the top answer, I tried it, it worked for me.

You can have a look at my code if you want:

https://github.com/OpenPi-bot/robot-s... :)

The code for the sensor is plugin is in this file:

https://github.com/OpenPi-bot/robot-s...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-04-24 15:59:39 -0500

Seen: 3,732 times

Last updated: Apr 24 '17