Ask Your Question

What shall I do after installing the navigation stack?

asked 2016-04-03 06:40:21 -0500

mukut_noob gravatar image

I have installed ROS Indigo on my Raspberry Pi 2 running Ubuntu 14.04, I want my robot to make a map of the surrounding and then autonomously navigate in it. I installed the navigation stack and gmapping but I am really confused on what to do and where to follow. I tried out the tutorials on ros/wiki, made a tf_listener and tf_broadcaster and the tutorials assume that I am using a laser scanner but I am using a sonar, so how to write the code for it? where to write? also the code for the motors and the wheel encoder? where to follow? Please assume that I know nothing and help me.

Thanks and Regards, Mukut.

edit retag flag offensive close merge delete


Highly recommended: There are multiple chapters on how to integrate new robots with ROS. And also on how to use SLAM and navigation.

spmaniato gravatar image spmaniato  ( 2016-04-03 15:49:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-03 08:47:38 -0500

Mork gravatar image

updated 2016-04-03 08:48:03 -0500

I assume you have a self made robot or something. The gmapping and amcl (for localization only) need 3 thinks to work: - Odometry - Laser scans (can also be fake laser scans) - Transformations from the laser scan to the global position as measured by the motor encoders (which later will be corrected by the localization)

You have to figure out by your own how to code it for your robot in particular. A good starting point are the tutorials at Navigation tutorials.

What kind of sonar do you use? A single sonar sensor won't make it, you need to fake a laser scanner with at least 20-30 directions. Maybe a Kinect or a similar sensor would be a better choice.

edit flag offensive delete link more


I am using a HC-SR04. Do I need multiple of sonars? Because the kinect and laser scanners are too expensive.

mukut_noob gravatar image mukut_noob  ( 2016-04-03 22:11:31 -0500 )edit

What about an IR Range finder?

mukut_noob gravatar image mukut_noob  ( 2016-04-04 10:21:04 -0500 )edit

You need something what can deliver similar data like a laser scanner. I don't think a single IR sensor will make it. Try to get a second hand kinect online (e.g. ebay), they aren't that expensive.

Mork gravatar image Mork  ( 2016-04-05 19:03:13 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2016-04-03 06:40:21 -0500

Seen: 691 times

Last updated: Apr 03 '16