Generate map with underwater sonar data
I would like to create a map with underwater sonar intensity data. What I did so far was creating a pointcloud2 message from the intensity data, with a simple threshold for the intensities. Due to the nature of an underwater sonar, the Pointclouds are quite noisy.
Since I am relatively new to ROS Navigation, I have no idea how to generate a 2D/3D map from this data. Are there any tutorials for map generation in ROS? Which are most suitable for this kind of sonar data?
Any advices or directions are welcome.
The node is running on Groovy with Ubuntu 12.04 LTS.
EDIT2:
self.pointcloud2_pub = rospy.Publisher('/sonar_pointcloud2', smsgs.PointCloud2, latch=True)
self.clock_pub = rospy.Publisher('/clock', rgmsgs.Clock, latch=True)
#Create Header
msg_header = stdmsgs.Header()
msg_header.seq = self.incId
self.incId += 1
msg_header.frame_id = "/sonar_pointcloud2"
msg_header.stamp = rospy.Time.now()
#.... filling the Pointcloud
#.... calculating new position and quaternion
#Transform Broadcaster
br.sendTransform((self.pose.x, self.pose.y, self.pose.z), (quat[0], quat[1], quat[2], quat[3]), msg_header.stamp, "/sonar_pointcloud2", "/map")
#Pointcloud2 Publisher
self.pointcloud2_pub.publish(msg_pointcloud2)
#Clock Publisher
self.clock_pub.publish(msg_header.stamp)