Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
sample
sample_int_publisher_from_pose_array.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
import
time
4
5
from
geometry_msgs.msg
import
PoseArray
6
from
jsk_recognition_msgs.msg
import
Int32Stamped
7
import
rospy
8
9
10
def
cb
(msg):
11
out_msg = Int32Stamped()
12
out_msg.header = msg.header
13
out_msg.data = int(time.time() % len(msg.poses))
14
pub.publish(out_msg)
15
16
17
if
__name__ ==
'__main__'
:
18
rospy.init_node(
'sample_int_publisher_from_pose_array'
)
19
pub = rospy.Publisher(
'~output'
, Int32Stamped, queue_size=1)
20
sub = rospy.Subscriber(
'~input'
, PoseArray, cb, queue_size=1)
21
rospy.spin()
msg
msg
sample_int_publisher_from_pose_array.cb
def cb(msg)
Definition:
sample_int_publisher_from_pose_array.py:10
jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Mon May 3 2021 03:03:47