3 from __future__
import absolute_import
4 from __future__
import division
5 from __future__
import print_function
7 import dynamic_reconfigure.server
8 from geometry_msgs.msg
import PoseArray
9 from geometry_msgs.msg
import PoseStamped
10 from jsk_topic_tools
import ConnectionBasedTransport
12 from jsk_recognition_utils.cfg
import PoseArrayToPoseConfig
19 super(self.__class__, self).
__init__()
20 self.
pub = self.advertise(
'~output', PoseStamped, queue_size=1)
21 dynamic_reconfigure.server.Server(PoseArrayToPoseConfig,
25 self.
sub = rospy.Subscriber(
'~input', PoseArray, self.
_convert)
35 pose_msg = PoseStamped()
36 pose_msg.header = msg.header
39 elif self.
index < len(msg.poses):
40 pose_msg.pose = msg.poses[self.
index]
41 self.pub.publish(pose_msg)
44 'Invalid index {} is specified ' 45 'for pose array whose size is {}' 49 if __name__ ==
'__main__':
50 rospy.init_node(
'pose_array_to_pose')
def _config_callback(self, config, level)