Error tf2_ros StaticTransformBroadcaster API in Python
Update: In an attempt to get around losing the ability to pub latch transforms in the API in python I have tried doing the following which does not seem to work. Anyone have a way to do this? And in general does anyone know why there is no StaticTransformBroadcaster.py in Indigo why was this not implemented?
def publishLatchTransforms(self):
self.pub_tf = rospy.Publisher("/tf_static", TFMessage , queue_size=1)
# Send static link transforms
msg = TransformStamped()
msg.header.stamp = rospy.Time.now()
msg.transform.rotation.x = 0.0
msg.transform.rotation.y = 0.0
msg.transform.rotation.z = 0.0
msg.transform.rotation.w = 1
msg.header.frame_id = "base_footprint"
msg.transform.translation.x = 0.
msg.transform.translation.y = 0.0
msg.transform.translation.z = 0.1
msg.child_frame_id = "base_link"
self.pub_tf.publish([msg])
How do you call static transform broadcaster in Python? I can do this in cpp but I can not seem to get this to work in python.
thanks.
#include <tf2_ros/static_transform_broadcaster .h>
ok in cpp but
from tf2_ros import static_transform_broadcaster
fails in python unable to find import
Static_Transform_Broadcaster() fails invalid gobal
OR
How can I send a transform to the tf/static topic using sendTransform as a work around. Rather then using the static transform broadcaster in the launch file.