Labels

Monday, July 7, 2014

Faking a Laser Scanner in ROS Hydro using Kinect

I've been searching for a solution to fake a laser scanner using a kinect for ROS Hydro. The traditional method seems to be using the pointcloud_to_laserscan package, but unfortunately it hasn't been confirmed to work with ROS hydro. I also am using the freeneck_stack instead of the openni packages for interfacing with the kinect since I've had some trouble with it and apparently there are known problems with it and Ubuntu 12.04, which I am using.

The solution I'm using right now is the depthimage_to_laserscan package. It seems to work well, and it also works with freenect_stack just fine. To install and run these packages, I used the following steps:

Install and run freenect_stack:
sudo apt-get intall ros-hydro-freenect-stack
roslaunch freenect_launch freenect-xyz.launch

Be sure to note, that on the freenect page it says:
If you are using Ubuntu 12.04, you need to blacklist the kernel module that gets loaded by default for the Kinect:
sudo modprobe -r gspca_kinect
echo 'blacklist gspca_kinect' | sudo tee -a /etc/modprobe.d/blacklist.conf

Install and run depthimage_to_laserscan:
sudo apt-get install ros-hydro-depthimage-to-laserscan
rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw

This will create the /scan topic and publish laserscan messages to it. To confirm data is being published, just use "rostopic echo /scan".

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi Waron, thank you for writing this useful article. I cope with nowadays ROS and Kinect. Could you please tell me how to make the fake laser scanner using pointcloud_to_laserscan.

    ReplyDelete