The [[cob_3d_mapping_point_map]] package provides a configurable node for aggregating point maps from point cloud data. It mainly performs registration.
== ROS API ==
{{{
#!clearsilver CS/NodeAPI
 name = point_map
 desc = The `point_map` node takes in <<MsgLink(sensor_msgs/PointCloud2)>> messages and aggregates a point map. If possible, point clouds should be registered in advance. The map can be cleared using a service call.

sub{
 0.name = /point_cloud2
 0.type = sensor_msgs/PointCloud2
 0.desc = The input point cloud
}

pub{
 0.name = /point_cloud2_map
 0.type = sensor_msgs/PointCloud2
 0.desc = The aggregated point map
}

srv{
 1.name = clear_map
 1.type = cob_srvs/Trigger
 1.desc = Clears the point map.
 2.name = get_map
 2.type = cob_3d_mapping_msgs/GetPointMap
 2.desc = Returns the current point map.
 3.name = set_map
 3.type = cob_3d_mapping_msgs/SetPointMap
 3.desc = Sets a map, overrides existing map
}

param{
 0.name = ~voxel_leafsize_x
 0.type = double
 0.default = 0.03
 0.desc = Map resolution in x direction
 1.name = ~map_frame_id
 1.type = string
 1.default = map
 1.desc = Frame ID for the map
 2.name = ~save
 2.type = bool
 2.default = false
 2.desc = Flag for saving the map as a PCD file after each update (for debugging)
 3.name = ~file_path
 3.type = string
 3.default = /tmp
 3.desc = File path for saving the map
}

req_tf{
}

prov_tf{
}

}}}

== Usage/Examples ==
Launch the point map node
{{{
roslaunch cob_3d_mapping_point_map aggregate_point_map.launch
}}}
Save map to a PCD file
{{{
rosrun cob_3d_mapping_point_map get_point_map map.pcd
}}}
Clear the map
{{{
rosservice call point_map/clear_map
}}}
Load an initial map from a PCD file (PointXYZRGB)
{{{
rosrun cob_3d_mapping_point_map set_point_map map.pcd
}}}