5 from dynamic_reconfigure.server
import Server
6 from dynamic_tf_publisher.cfg
import TfParameterConfig
10 g_parent_frame_id =
None 13 global g_broadcaster, g_frame_id, g_parent_frame_id, g_params
14 g_frame_id = config.frame_id
15 g_parent_frame_id = config.parent_frame_id
16 g_params = (config.x, config.y, config.z, config.roll, config.pitch, config.yaw)
20 global g_broadcaster, g_frame_id, g_parent_frame_id, g_params
21 if g_frame_id
and g_parent_frame_id
and g_params:
22 g_broadcaster.sendTransform(
24 tf.transformations.quaternion_from_euler(*g_params[3:6]),
32 srv = Server(TfParameterConfig, callback)
33 rospy.Timer(rospy.Duration(0.1), timerCallback)
36 if __name__ ==
"__main__":
37 rospy.init_node(
"tf_reconfigure_publisher")