Skip to content

Commit

Permalink
Merge pull request MIT-SPARK#129 from SPARK/feature/scripts_rosbag
Browse files Browse the repository at this point in the history
Hardcodes tf timestamps in first column
  • Loading branch information
ToniRV authored and GitHub Enterprise committed Oct 9, 2020
2 parents 960dbdc + 0d0b2d0 commit 28734e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/write_tfs_in_rosbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def transform_msg_from_csv(path_to_csv, child_frame_id, frame_id):
tf_stamped = geometry_msgs.msg.TransformStamped()
tf_stamped.header.frame_id = frame_id
tf_stamped.child_frame_id = child_frame_id
tf_stamped.header.stamp = rospy.Time.from_sec(tf['#timestamp']*1e-9) # ns to sec
# tf_stamped.header.stamp = rospy.Time.from_sec(tf["#timestamp"]*1e-9) # ns to sec
# Assumes timestamps are in the first column
tf_stamped.header.stamp = rospy.Time.from_sec(tf[0]*1e-9) # ns to sec
tf_stamped.transform.translation.x = tf['x']
tf_stamped.transform.translation.y = tf['y']
tf_stamped.transform.translation.z = tf['z']
Expand Down

0 comments on commit 28734e1

Please sign in to comment.