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

local map subtraction for moving object detection

asked 2014-08-22 06:24:47 -0500

AliAs gravatar image

updated 2014-08-27 18:57:59 -0500

Hi all,

I am new in ROS and I am going to do a subtraction between a current laser measurement map at time t and time t-1 for moving object detection. the procedure is as follow:

  1. Convert laser measurement at time t to 2d grid form that contain free and occupied cells (I call it laser measurement map).
  2. Limit this (2d grid) laser measurement map in a rectangle with edge size of lets say 5 meters. So the robot can see 2.5 meters ahead, back, left and right.
  3. Next, I am going to do a subtraction between a current laser map at time t and laser map provided at time t-1. (each laser map associated with odometry data, so the laser measurement map provided at time t-1 will be projected on laser measurement map at time t, and subtraction is done in the joint area).

Could you please guide me how to do it with already available packages in ROS? I found two related packages: costmap_2d and Gmapping. I don't know if there is better packages available to use? Based on your experience which one has a potential to use for this purpose? What steps should I take to do it?

Thanks.

edit retag flag offensive close merge delete

Comments

You need good localisation to get good results from subsraction.

bvbdort gravatar image bvbdort  ( 2014-08-24 08:45:39 -0500 )edit

Yes, I am going to use Xsens IMU. Next, I will prune the result (remove small false detected regions) and just keep significant parts that I hope provides moving objects.

AliAs gravatar image AliAs  ( 2014-08-25 06:43:31 -0500 )edit

Can you post on how you had achieved this?

pravi gravatar image pravi  ( 2020-11-18 12:17:53 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-08-23 12:59:41 -0500

David Lu gravatar image

I don't believe there is an existing package that does this. The costmap_2d package is likely overkill for what you're trying to do. You might want to check out the http://wiki.ros.org/laser_geometry package which will help with putting the laser into a grid.

edit flag offensive delete link more

Comments

Thank you. I will study the package and report the result here.

AliAs gravatar image AliAs  ( 2014-08-25 06:53:56 -0500 )edit

According to http://wiki.ros.org/laser_geometry package it just converts a 2D laser scan into a point cloud. But I need an occupancy grid not a point cloud! (I am using kinect and I already transformed the 3d point cloud to laser scan with depthimage_to_laserscan package)

AliAs gravatar image AliAs  ( 2014-08-25 12:13:10 -0500 )edit

I would look at the implementations of costmap_2d's mapToWorld and worldToMap functions. https://github.com/ros-planning/navig...

Then use that to write your own specific script for your use case.

David Lu gravatar image David Lu  ( 2014-08-25 15:42:47 -0500 )edit

Thank you. As http://wiki.ros.org/costmap_2d says: costmap_2d only subscribes [/footprint (geometry_msgs/Polygon)]. It seems the costmap_2d doesn't subscribe the (sensor_msgs/LaserScan) that I have it published. what should I do to have costmap_2d subscribed to /scan topic? (I'm trying to use standalone costmap_2d node to check if it works)

AliAs gravatar image AliAs  ( 2014-08-26 05:47:57 -0500 )edit

I ask it as an another question here: http://answers.ros.org/question/19128...

AliAs gravatar image AliAs  ( 2014-08-26 09:08:34 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2014-08-22 06:19:58 -0500

Seen: 1,417 times

Last updated: Aug 27 '14