Skip to content

Commit

Permalink
added sleep for subscribing to clock
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoussan committed Jul 9, 2024
1 parent 95b6d9e commit 920c2e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions localization/localization_node/tools/set_start_pose.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ def publish_pose(pose):
# Init publisher
pub = rospy.Publisher("/loc/ml/features", VisualLandmarks, queue_size=1)
rospy.init_node("PosePublisher")
# Sleep so node can subscribe to /clock topic and produce a valid header time
rospy.sleep(5)

msg = VisualLandmarks()
msg.header = std_msgs.msg.Header()
msg.header.stamp = rospy.Time.now()
msg.header.frame_id = "world"
msg.camera_id = 0
# Set pose values
msg.pose.position.x = pose[0]
Expand Down

0 comments on commit 920c2e5

Please sign in to comment.