Skip to content

Run from source code #67

@ajay1606

Description

@ajay1606

Hello,

I am able to run and test kitti2bag by following instructions from here ( thanks to Magic-wei )and am able to get the bag file as expected.

But I am looking to test kitti2bag from the source code. Since i would like to modify the some part of code in kitti2bag.py

def save_gps_vel_data(bag, kitti, gps_frame_id, topic):
    for timestamp, oxts in zip(kitti.timestamps, kitti.oxts):
        twist_msg = TwistStamped()
        twist_msg.header.frame_id = gps_frame_id
        twist_msg.header.stamp = rospy.Time.from_sec(float(timestamp.strftime("%s.%f")))

Velocity to be published in Vehicle body coordinate, InsteaHello,
def save_gps_vel_data(bag, kitti, gps_frame_id, topic):
    for timestamp, oxts in zip(kitti.timestamps, kitti.oxts):
        twist_msg = TwistStamped()
        twist_msg.header.frame_id = gps_frame_id
        twist_msg.header.stamp = rospy.Time.from_sec(float(timestamp.strftime("%s.%f")))
//Here Velocity to be published in Vehicle body coordinate, Instead of FLU coordinate (vn ve vu instead of vf vl vu)
        twist_msg.twist.linear.x = oxts.packet.vf  
        twist_msg.twist.linear.y = oxts.packet.vl
        twist_msg.twist.linear.z = oxts.packet.vu
        twist_msg.twist.angular.x = oxts.packet.wf
        twist_msg.twist.angular.y = oxts.packet.wl
        twist_msg.twist.angular.z = oxts.packet.wu
        bag.write(topic, twist_msg, t=twist_msg.header.stamp) 

Any help much appreciated.

Regards,
Ajay

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions