Complete the code to publish a static transform broadcaster in ROS.
static_broadcaster = tf2_ros.[1]()
The StaticTransformBroadcaster is used to publish static transforms in ROS.
Complete the code to create a TransformStamped message and set its header frame_id.
transform = geometry_msgs.msg.TransformStamped() transform.header.[1] = 'world'
child_frame_id in the header instead of frame_idstamp or seq incorrectlyThe frame_id in the header specifies the parent frame of the transform.
Fix the error in setting the translation of the transform.
transform.transform.translation.x = [1] transform.transform.translation.y = 0.0 transform.transform.translation.z = 0.0
The translation values must be floats, not strings or other types.
Fill both blanks to set the rotation as a quaternion representing no rotation.
transform.transform.rotation.[1] = 0.0 transform.transform.rotation.[2] = 1.0
For no rotation, quaternion x, y, z are 0.0 and w is 1.0.
Fill all three blanks to publish the static transform with the current time and child frame 'camera'.
transform.header.stamp = [1] transform.child_frame_id = [2] static_broadcaster.[3]([transform])
rospy.get_time() which returns float, not ROS timeUse rospy.Time.now() for current time, set child frame to 'camera', and call sendTransform to publish.
