7 from jsk_recognition_msgs.msg
import ClusterPointIndices
8 from pcl_msgs.msg
import PointIndices
18 self.
pub = rospy.Publisher(
'~output', PointIndices, queue_size=1)
19 self.
sub = rospy.Subscriber(
'~input', ClusterPointIndices, self.
cb)
25 indices_msg = PointIndices()
26 while self.
msg is None:
27 indices_msg.header.stamp = rospy.Time.now()
28 indices_msg.indices = self.
indices 29 self.pub.publish(indices_msg)
32 self.assertEqual(len(self.msg.cluster_indices), 1)
33 self.assertTupleEqual(self.msg.cluster_indices[0].indices,
37 if __name__ ==
"__main__":
38 PKG =
'jsk_pcl_ros_utils' 39 ID =
'test_point_indices_to_cluster_point_indices' 41 rostest.rosrun(PKG, ID, TestPointIndicesToClusterPointIndices)
def test_conversion(self)