Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run from source code #67

Open
ajay1606 opened this issue Sep 18, 2022 · 0 comments
Open

Run from source code #67

ajay1606 opened this issue Sep 18, 2022 · 0 comments

Comments

@ajay1606
Copy link

ajay1606 commented Sep 18, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant