ROS pointcloud assembler service call not returning pcd
Hi I am trying to publish pointclouds that have been most recently entered into the pointcloud assembler http://wiki.ros.org/laser_assembler#point_cloud_assembler However i only get PCD when last_time = rospy.Time(0,0). The point cloud assembler service call is meant to give pcd which is between a begin and an end time. Entering rospy.Time(0,0) into the begin field will give back everything in the buffer. But I only want PCD that is newly entered... But the following code does not return any PCD.
last_time = rospy.Time(0,0)
rate = rospy.Rate(0.5)
while not rospy.is_shutdown():
try:
rospy.wait_for_service("assemble_scans")
assemble_scans = rospy.ServiceProxy('assemble_scans', AssembleScans)
resp = assemble_scans( last_time, rospy.get_rostime())
last_time = rospy.get_rostime()
pub.publish(resp.cloud)
except rospy.ServiceException, e:
print "Service call failed: %s"%e
rate.sleep()
add a comment