ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

alternatives to 3d sensors

asked 2013-09-20 07:18:16 -0500

Massbuilder gravatar image

updated 2013-11-18 07:18:25 -0500

tfoote gravatar image

Is there any way to use a sonar or a sharps Ir sensor in place of a laser scanner or 3d depth sensor like a conenct in the navigation stack? If so please send examples or a very detailed explination.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2013-09-22 05:46:59 -0500

Yeah. I beleive it is possible and you can run navigation stack with Sharp's IR scanner, although the resolution may not be good as the default methods. See the following links

This is how its done in Pi-Robot

and here is some code

edit flag offensive delete link more


Just a note, we pretty much abandoned the PML stuff when the Kinect came out -- it works a lot better with ROS navigation than the slow-updating PML did.

fergs gravatar image fergs  ( 2013-09-23 01:55:33 -0500 )edit

do I have to install openni to use the kinect(or other camera depth sensor) with the naviagtion stack?

Massbuilder gravatar image Massbuilder  ( 2013-09-23 09:50:56 -0500 )edit

yes sure, u need openni, Kinect outputs a pointcloud , then using the package pointcloud_to_laserscan (depthimage_to_laserscan in ROS Hydro), you have to fake it as a laserscanner.

achuwilson gravatar image achuwilson  ( 2013-09-24 02:14:38 -0500 )edit

Parallax sells a 1d laser rangefinder on their website, maybe the PML can be used with that.

Massbuilder gravatar image Massbuilder  ( 2013-10-02 03:04:13 -0500 )edit

answered 2014-10-24 20:21:18 -0500

TimboInSpace gravatar image

It's totally possible. I have a little robot that does some basic SLAM, just using two ultrasonic rangefinders. However, I found that gmapping took some heavy tweaking to get to work properly using such noisy & low spatial resolution sensors. The whole project took a couple XBees, some servos, an arduino, the rangefinders, and my laptop.

edit flag offensive delete link more


would you mind sharing those tweaks in detail

Massbuilder gravatar image Massbuilder  ( 2014-10-27 20:55:42 -0500 )edit

Now I said it's possible, but the disclaimer is that it will never be as good as a laser. The main gmapping tweaks: - Set resolution to match sensors. For my SRF-04s, I used 4cm - Increase particle count, to account for relatively low sample rate. - Buffer the ultrasonic, publish as sets of points!!

TimboInSpace gravatar image TimboInSpace  ( 2014-11-02 13:46:38 -0500 )edit

answered 2013-09-24 03:29:08 -0500

Hendrik Wiese gravatar image

You definitely can. We are using Sharp's IR sensors to generate a point cloud which is then given to the navigation/tf stack.

Here's the code of our IR sensor interface:

edit flag offensive delete link more


I've changed the frame the points were published in due to this misbehavior:

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-09-24 04:54:27 -0500 )edit

thanks this will be rally useful but I have some questions about the code, first your code references a #include "otter4_eth_interface/CAN.h" which also the msg type received by ir interface class. I am guessing it is specific to your project so what would be the equivalent msg for me to use

Massbuilder gravatar image Massbuilder  ( 2013-09-27 14:00:40 -0500 )edit

Exactly. The CAN message is specific to my robot. That's got to be substituted by your specific message containing your IR data.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-09-27 20:58:32 -0500 )edit

The micro controller that will be very likely sending the data uses strings sent via usb, can I use those?

Massbuilder gravatar image Massbuilder  ( 2013-09-28 06:36:22 -0500 )edit

what type of data is in the can msg anyway? I am assuming it is distance data.

Massbuilder gravatar image Massbuilder  ( 2013-09-29 03:57:28 -0500 )edit

I forgot about this one, I'm sorry. The CAN msg is just a container that contains different types of commands and parameters highly specific to our hardware. You can use whatever kind of message you like. You've just got to decode/unpack/parse them. Pretty easy with Python in my book.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-10-27 14:52:11 -0500 )edit

Question Tools

1 follower


Asked: 2013-09-20 07:18:16 -0500

Seen: 1,638 times

Last updated: Oct 24 '14