~mrol-dev/mrol/trunk

« back to all changes in this revision

Viewing changes to mrol_mapping/mapper.py

  • Committer: Vikas Dhiman
  • Date: 2012-04-23 16:56:16 UTC
  • Revision ID: wecacuee@gmail.com-20120423165616-o30a5qisur1fx4ef
Adding back backtrace changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import time
22
22
 
23
23
debug = True
24
 
FEATURES = dict(FREESPACE=True)
 
24
FREESPACE = 'freespace'
 
25
FEATURES = {FREESPACE:True}
25
26
 
26
27
 
27
28
_map_resolution_levels = 4 # number of different levels of resolution
246
247
            xyzs: The occupied PointCloud, with the sensor as origin.
247
248
            pose: The pose of `xyzs` PointCloud with respect to global map.
248
249
        '''
249
 
        self.mrol.clear_freespace(self, xyzs, pose)
 
250
        xyzs = xyzs.points
 
251
        xyzs, return_pose = poseutil.transformPoints(xyzs, pose)
 
252
        sensor_loc = poseutil.transformPoints(np.array([[0, 0, 0]]), pose)
 
253
        self.mrol.clear_freespace(self, xyzs, sensor_loc[0])
250
254
 
251
255
    def add_points(self, xyzs, pose, timestamp=None, userdata=None):
252
256
        '''Adds the pointcloud xyzs to the map, transforming them by the given