Giter Club home page Giter Club logo

kitti2bag's Introduction

kitti2bag

Hello everybody! I'm looking for more people that can bring this package to the next level. If you'd like to help you can contact me via the email. I'll be happy for every news contribution!

Gitter Build Status

Convert KITTI dataset to ROS bag file the easy way!

KITTI playback preview

Collaboration

This package enjoyed significant interest from more people then I could have thought at the beginning. I'm really glad to see that. I see many PRs and issues being raised but my day job does not allow me to push this repository further. In order to allow this package to prosper, I'm opening it up for the community. I'm more than happy to add you as a collaborator to this repository. Just send me an email.

And by the way. To ensure we maintain the quality of the repo you are required to get the PR approval from at least one other collaborator. You can use the Gitter to communicate with others.

TODOs

Help me make this feature rich and complete. Just fork this repo, implement new features (very easy in this case) and make pull request.

Feature request list:

  • make URDF of a car so transformations between frames are easily done by ROS itself.
  • deal with tracklets
  • support for unsynced+unrectified version
  • provide documentation via ROS wiki
  • provide simple GUI
  • distribute publically available bagfiles (is there a reliable public storage for this purpose?)
  • export only subset of sensors

Contributions

Thanks to the work of @jnitsch, kitti2bag can now export velodyne laser data and dynamic tf transformations. Thanks to @emreay-, this tool can now convert odometry datasets too. Thank you both!

How to install it?

It is very easy! On the machine with ROS installed, just run

pip install kitti2bag

How to run it?

One example is better then thousand words so here it is

$ wget https://s3.eu-central-1.amazonaws.com/avg-kitti/raw_data/2011_09_26_drive_0002/2011_09_26_drive_0002_sync.zip
$ wget https://s3.eu-central-1.amazonaws.com/avg-kitti/raw_data/2011_09_26_calib.zip
$ unzip 2011_09_26_drive_0002_sync.zip
$ unzip 2011_09_26_calib.zip
$ kitti2bag -t 2011_09_26 -r 0002 raw_synced .
Exporting static transformations
Exporting time dependent transformations
Exporting IMU
Exporting camera 0
100% (77 of 77) |##########################| Elapsed Time: 0:00:00 Time: 0:00:00
Exporting camera 1
100% (77 of 77) |##########################| Elapsed Time: 0:00:00 Time: 0:00:00
Exporting camera 2
100% (77 of 77) |##########################| Elapsed Time: 0:00:01 Time: 0:00:01
Exporting camera 3
100% (77 of 77) |##########################| Elapsed Time: 0:00:01 Time: 0:00:01
Exporting velodyne data
100% (77 of 77) |##########################| Elapsed Time: 0:00:15 Time: 0:00:15
## OVERVIEW ##
path:        kitti_2011_09_26_drive_0002_synced.bag
version:     2.0
duration:    7.8s
start:       Sep 26 2011 13:02:44.33 (1317042164.33)
end:         Sep 26 2011 13:02:52.16 (1317042172.16)
size:        417.2 MB
messages:    1078
compression: none [308/308 chunks]
types:       geometry_msgs/TwistStamped [98d34b0043a2093cf9d9345ab6eef12e]
             sensor_msgs/CameraInfo     [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/Image          [060021388200f6f0f447d0fcd9c64743]
             sensor_msgs/Imu            [6a62c6daae103f4ff57a132d6f95cec2]
             sensor_msgs/NavSatFix      [2d3a8cd499b9b4a0249fb98fd05cfa48]
             sensor_msgs/PointCloud2    [1158d486dd51d683ce2f1be655c3c181]
             tf2_msgs/TFMessage         [94810edda583a504dfda3829e70d7eec]
topics:      /kitti/camera_color_left/camera_info    77 msgs    : sensor_msgs/CameraInfo    
             /kitti/camera_color_left/image_raw      77 msgs    : sensor_msgs/Image         
             /kitti/camera_color_right/camera_info   77 msgs    : sensor_msgs/CameraInfo    
             /kitti/camera_color_right/image_raw     77 msgs    : sensor_msgs/Image         
             /kitti/camera_gray_left/camera_info     77 msgs    : sensor_msgs/CameraInfo    
             /kitti/camera_gray_left/image_raw       77 msgs    : sensor_msgs/Image         
             /kitti/camera_gray_right/camera_info    77 msgs    : sensor_msgs/CameraInfo    
             /kitti/camera_gray_right/image_raw      77 msgs    : sensor_msgs/Image         
             /kitti/oxts/gps/fix                     77 msgs    : sensor_msgs/NavSatFix     
             /kitti/oxts/gps/vel                     77 msgs    : geometry_msgs/TwistStamped
             /kitti/oxts/imu                         77 msgs    : sensor_msgs/Imu           
             /kitti/velo/pointcloud                  77 msgs    : sensor_msgs/PointCloud2   
             /tf                                     77 msgs    : tf2_msgs/TFMessage        
             /tf_static                              77 msgs    : tf2_msgs/TFMessage

That's it. You have file kitti_2011_09_26_drive_0002_sync.bag that contains your data.

Other source files can be found at KITTI raw data page.

If you got an error saying something like command not found it means that your python installation is in bad shape. You might try running python -m kitti2bag -t 2011_09_26 -r 0002 raw_synced . Or maybe use Docker.

Prefer Docker?

That is easy too. There is a pre-built image tomas789/kitti2bag.

$ wget https://s3.eu-central-1.amazonaws.com/avg-kitti/raw_data/2011_09_26_drive_0002/2011_09_26_drive_0002_sync.zip
$ wget https://s3.eu-central-1.amazonaws.com/avg-kitti/raw_data/2011_09_26_calib.zip
$ unzip 2011_09_26_drive_0002_sync.zip
$ unzip 2011_09_26_calib.zip
$ docker run -v `pwd`:/data -it tomas789/kitti2bag -t 2011_09_26 -r 0002 raw_synced
Exporting static transformations
Exporting time dependent transformations
...

This might also be a better alternative if you are having troubles installing the package.

Bug reporting, support and feature requests.

I appreciate pull requests with bug fixes and new features. You you want to help with something please use GitHub issue tracker.

Related works

  • pykitti is very simple library for dealing with KITTI dataset in python.
  • kitti_player allows to play dataset directly. No bag file needed. I found difficult to get it work. Some bug fixed can be found in my fork of kitti_player but still not good enough.

kitti2bag's People

Contributors

jnitsch avatar tomas789 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kitti2bag's Issues

Example is not working (section: How to run it?)

Hello,

the links for downloading the dataset in the "How to run it?" section are not working:

  • wget http://kitti.is.tue.mpg.de/kitti/raw_data/2011_09_26_drive_0002/2011_09_26_drive_0002_sync.zip

  • wget http://kitti.is.tue.mpg.de/kitti/raw_data/2011_09_26_calib.zip

Looking at the links at the KIT website it seems they moved their files (https://s3.eu-central-1.amazonaws.com/avg-kitti/raw_data/2011_09_26_drive_0001/2011_09_26_drive_0001_sync.zip)

Best,
Alex

No module named kitti2bag.__main__

kitti2bag is successfully installed after using pip(9.0.1), but when I execute 'kitti2bag -t 2011_09_26 -r 0001 raw_synced .'
I got mistakes as belows:

Traceback (most recent call last):
  File "/usr/local/bin/kitti2bag", line 9, in <module>
    load_entry_point('kitti2bag==1.5', 'console_scripts', 'kitti2bag')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named kitti2bag.__main__

/kitti/velo/pointcloud data seq =0

when I run rostopic echo /kitti/velo/pointcloud/header
the seq always equals to 0, do you now how to solve it to make the seq increase frame by frame.

---
seq: 0
stamp: 
  secs: 1317671741
  nsecs: 258542060
frame_id: "velo_link"
---
seq: 0
stamp: 
  secs: 1317671741
  nsecs: 362260103
frame_id: "velo_link"
---
seq: 0
stamp: 
  secs: 1317671741
  nsecs: 465951919
frame_id: "velo_link"

Convert ground truth data to bag

Hi,

I wanted to convert the odometry benchmark data to bags, but since it's currently not possible to convert the point clouds from that set I used the already proposed solution, namely to convert the corresponding raw data sequences. However I also need the ground truth data for comparison. Is there a way of converting just the ground truth data, for example using the -s flag?

psutil.ZombieProcess process still exists but it's a zombie

Hi, when I converted the kitti data to bag file using kitti2bag, I met the following error.

Traceback (most recent call last):
  File "/usr/local/bin/kitti2bag", line 16, in <module>
    import rosbag
  File "/opt/ros/melodic/lib/python2.7/site-packages/rosbag/__init__.py", line 33, in <module>
    from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
  File "/opt/ros/melodic/lib/python2.7/site-packages/rosbag/bag.py", line 55, in <module>
    import gnupg
  File "/usr/local/lib/python2.7/site-packages/gnupg/__init__.py", line 23, in <module>
    from . import gnupg
  File "/usr/local/lib/python2.7/site-packages/gnupg/gnupg.py", line 42, in <module>
    from ._meta    import GPGBase
  File "/usr/local/lib/python2.7/site-packages/gnupg/_meta.py", line 134, in <module>
    class GPGBase(object):
  File "/usr/local/lib/python2.7/site-packages/gnupg/_meta.py", line 72, in __new__
    if cls._find_agent():
  File "/usr/local/lib/python2.7/site-packages/gnupg/_meta.py", line 115, in _find_agent
    if (proc.name() == "gpg-agent") and proc.is_running():
  File "/usr/local/lib/python2.7/site-packages/psutil/__init__.py", line 610, in name
    cmdline = self.cmdline()
  File "/usr/local/lib/python2.7/site-packages/psutil/__init__.py", line 663, in cmdline
    return self._proc.cmdline()
  File "/usr/local/lib/python2.7/site-packages/psutil/_psosx.py", line 342, in wrapper
    return fun(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/psutil/_psosx.py", line 426, in cmdline
    return cext.proc_cmdline(self.pid)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python2.7/site-packages/psutil/_psosx.py", line 373, in catch_zombie
    raise ZombieProcess(proc.pid, proc._name, proc._ppid)
psutil._exceptions.ZombieProcess: psutil.ZombieProcess process still exists but it's a zombie (pid=62522)

how to change the output topic name saved in the rosbag?

Hi there,
I'm very new to this,
I tried installing and running your package and it works fine.
However when I try to change a topic name in kiiti2bag.py lines 284 to 287, nothing changes in the output rosbag, please advise?
Thanks a lot

From /kitti/oxts/gps/fix to /tf

Does anybody know where the world reference system of /tf is centered?
I am trying to convert /kitti/oxts/gps/fix (NavSatFix - lat, long, alt) in the /tf world (x, y, z) reference system.

Thanks.

command not found

@tomas789 Dear sir, when I successfully finished all the previous installation procedures and run the command "kitti2bag -t 2011_09_26 -r 0002 raw_synced .". There is an error "kitti2bag: command not found". I checked the kitti2bag package with "pip list", which was installed successfully.

Jumps in tf

Hi Tomas,
Firstly, thanks for developing this amazing package.
Regarding my issue, when I use velodyne cloud topic in a SLAM I am testing the following jumps in tf occur:
52871402-45ce4e00-314a-11e9-9171-d89570ef6634
Could it be a issue of the bag conversion?
Thanks,
Bruno

{raw_synced,odom_color,odom_gray}

Would it be possible to just transform odometry dataset (velodyne laser data, 80 GB) into .bag file? There are 3 parameters to select: {raw_synced,odom_color,odom_gray} , but I have no idea which one to choose if I just want to save laser point into .bag.
Any suggestions?

How to work with Velodyne Laser Data

Hi Tomas,

Thanks for your work. When I checked the code, there was node option to support the Velodyne laser data, I wonder if it is supported?

ValueError: need more than 1 value to unpack

Hi,I followed the Readme introduction to convert Kitti datasets,but when I execute 'kitti2bag -t 2011_09_30 -r 0027 raw_synced .',I got mistakes as belows:

Traceback (most recent call last):
  File "/usr/local/bin/kitti2bag", line 394, in <module>
    main()
  File "/usr/local/bin/kitti2bag", line 302, in main
    kitti = pykitti.raw(args.dir, args.date, args.drive)
  File "/usr/local/lib/python2.7/dist-packages/pykitti/raw.py", line 34, in __init__
    self._load_calib()
  File "/usr/local/lib/python2.7/dist-packages/pykitti/raw.py", line 232, in _load_calib
    data['T_velo_imu'] = self._load_calib_rigid('calib_imu_to_velo.txt')
  File "/usr/local/lib/python2.7/dist-packages/pykitti/raw.py", line 147, in _load_calib_rigid
    data = utils.read_calib_file(filepath)
  File "/usr/local/lib/python2.7/dist-packages/pykitti/utils.py", line 74, in read_calib_file
    key, value = line.split(':', 1)
ValueError: need more than 1 value to unpack

Please tell me how to fix it,thank you!

Fuck

What a bad program

What does /tf contain?

Hello

I'm not sure what does /tf message contains. Does it containt the pose of the left camera obtained with GPS/IMU fusion?

Can I use it as ground truth?

Installing from source results in ModuleNotFoundError

I tried to install kitti2bag from the source repository, using the setup.py script. While running "python setup.py install" seemed to work, running kitti2bag after that results in the following error:

Traceback (most recent call last):
File "/home/thully/anaconda3/bin/kitti2bag", line 11, in
load_entry_point('kitti2bag==1.5', 'console_scripts', 'kitti2bag')()
File "/home/thully/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/thully/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 2793, in load_entry_point
return ep.load()
File "/home/thully/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 2411, in load
return self.resolve()
File "/home/thully/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 2417, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
ModuleNotFoundError: No module named 'kitti2bag'

I tried this with Python 2 as well as on a system without Anaconda installed, and get the same error. Installing using pip works, though isn't desired as I wanted to work on some potential enhancements to the script (in particular, handling tracklets)

To Solve tornado requires an up-to-date SSL module probme

When I pip install kitti2bag, got the problem:

ImportError("Tornado requires an up-to-date SSL module. This means "
ImportError: Tornado requires an up-to-date SSL module. This means Python 2.7.9+ or 3.4+ (although some distributions have backported the necessary changes to older versions).

I solved it by following this command:

sudo pip install 'Tornado>=4.0.0,<5.0.0'

Reference:

JuliaDocs/Documenter.jl#659 (comment)

wrong message

you throw an error that 'please run pip install pykitti' when a importError happens
but that is not absolutely meaning we have not installed pykitti
it might be caused by a low version of numpy

input

$ python

import pykitti

to see what is the real reason

Camera info height and width swapped

I have observed that the output sensor_msgs/CameraInfo messages have their height and width fields flipped, while the sensor_msgs/Image messages do not.

I am running OpenCV 3 and with the latest version of kitti2bag, and have not tested if this issue occurs with OpenCV 2.x.

Run the Example

Hello,
I wanted to try the example. But when I enter the line
wget http://kitti.is.tue.mpg.de/kitti/raw_data/2011_09_26_drive_0002/2011_09_26_drive_0002_sync.zip
I get the following error:
--2018-09-06 16:29:10-- http://kitti.is.tue.mpg.de/kitti/raw_data/2011_09_26_drive_0002/2011_09_26_drive_0002_sync.zip Auflösen des Hostnamen »kitti.is.tue.mpg.de (kitti.is.tue.mpg.de)«... fehlgeschlagen: Der Name oder der Dienst ist nicht bekannt. wget: kann die Host-Adresse »kitti.is.tue.mpg.de« nicht auflösen

I think the website is not available. Is there another way to get the sample data?

How to convert odometry datasets?

Hi,in Readme introduction,it said "Thanks to @emreay-, this tool can now convert odometry datasets too." but What are the specific instructions for executing this method?Could anyone help me?Thank you.

How can I only convert velodyne data to rosbag?

How can I only convert velodyne data (*.bin) to rosbag? Only need to convert velodyne data, without image data.
I can use it to convert raw_data to rosbag.
But I can not use it to convert only odometry data in this website odometry:
In other words, this tools only can convert data that meets the formatting requirements( format in raw_data .
How can I convert odometry sequences in this website to rosbag?

So how to use folder "velodyne_points" without calibration file or image folder?
Looking forward to any reply

Docker hub image is broken

Just followed instruction in README and got the following error:

docker run -v `pwd`:/data -it tomas789/kitti2bag -t 2011_09_26 -r 0002 raw_synced 
Traceback (most recent call last):
  File "/usr/local/bin/kitti2bag", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 1.11.0 (/usr/lib/python2.7/dist-packages), Requirement.parse('numpy>=1.12.0'), set(['pandas']))

I don't understand the cause of the error exactly but pandas dropped support for python2 in version 0.24 (so much for semver), and pykitti specifies pandas as a dependency without a version (so much for semver. Semver is dead, long live semver.)

Pre-build docker image does not work.

Thanks for sharing codes.
I pulled the docker image of tomas789/kitti2bag then run docker, but the following error occurred.
So, tomas789/kitti2bag needs to be updated.

$ docker run -v `pwd`:/data -it tomas789/kitti2bag -t 2011_09_26 -r 0002 raw_synced
Traceback (most recent call last):
  File "/usr/local/bin/kitti2bag", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 1.11.0 (/usr/lib/python2.7/dist-packages), Requirement.parse('numpy>=1.12.0'), set(['pandas']))

Elevation angles do not match the HDL 64 E manual

In order to calculate the scanline Id one has to use the "algorithm":

  1. omega = asin(Z/norm(P))
  2. Lookup omega in the UserManual which gives the angle increments for each laser sensor

However when I apply step 1 to the points generated from this python project I get omega values which are outside of the manufacturer supplied threshold of +2 to -24.8 degrees.

This leads me to believe there is a bug when reading the binary velodyne data.

Can anybody confirm or deny this?

Best,
Marc

The ground truth for visual odometry/SLAM

hi, I want to compare the trajectory of my algorithm with the ground truth in the kitti odometry data set, i need to project my trajectory into the coordinate system of the left camera after rectification. To verify that the projection is correct or not,replace my trajectory with the output of the GPS/IMU poses in the kitti raw data set,if the conversion is correct, the output should be consistent with the ground truth in the kitti odometry data set. Formula is as follows:
T_cam0_to_world = kitti.oxts.T_w_imu.dot(inv(kitti.calib.T_cam0_imu))
But the result is not ideal. Can you point out my mistakes and correct them?

[TODOs] About deal with tracklets

Hello, maintainers. @tomas789 @emreay- @jnitsch .
I'm interested in contribution to develop "deal with tracklets" as a feature request.
I'm going to make a Pull-Request for that.
So, I check the Kitti Tracklet file and I think it is good to use this util from here

We can use the module as parser like following codes.

from parseTrackletXML import Tracklet,parseXML

tracklets = parseXML('data/2011_09_26/2011_09_26_drive_0002_sync/tracklet_labels.xml')

After this parsing progress, what kind of the type we need for kitti2bag ?
How about just making a custom topic message for item of tracklet_labels.xml?

If you have a good other way, please recommend it.

How to convert odometry_sequences to bag

I'm running this package on Ubuntu 16.04 with python aliased to python2.7, I ran into this exception message:
Traceback (most recent call last): File "/usr/local/bin/kitti2bag", line 394, in <module> main() File "/usr/local/bin/kitti2bag", line 359, in main kitti = pykitti.odometry(args.dir, args.sequence) File "/usr/local/lib/python2.7/dist-packages/pykitti/odometry.py", line 34, in __init__ self._load_calib() File "/usr/local/lib/python2.7/dist-packages/pykitti/odometry.py", line 172, in _load_calib data['T_cam0_velo'] = np.reshape(filedata['Tr'], (3, 4)) KeyError: 'Tr'
How to resolve this question

Missing information about GPS

There is few things that are not clear to me:

  • Where can I find sections navstat_to_string, gps_mode_to_string, gps_mode_to_string, gps_mode_to_string?
  • How to determine if it is GPS fix see status
  • How to determine position covariance matrix correctly see position_covariance?
  • Is it ok to provide pos_accuracy^2 as diagonal part of position_covariance field and set position_covariance_type to COVARIANCE_TYPE_DIAGONAL_KNOWN?

Segmentation fault (core dumped)

Hi.
I'm trying to use your converter.
Ubuntu 16.04.
Python 2.7.12 & 3.5.2
ROS installed

kitti2bag was installed using pip

Executing next string
kitti2bag -t 2011_09_26 -r 0001 raw_synced .

always leads to

Segmentation fault (core dumped)

Could not load module 'pykitti'. Although installed.

nils@europa:~/KITTI$ pip show pykitti
Name: pykitti
Version: 0.3.1
Summary: A minimal set of tools for working with the KITTI dataset in Python
Home-page: https://github.com/utiasSTARS/pykitti
Author: Lee Clement
Author-email: [email protected]
License: MIT
Location: /home/nils/.local/lib/python2.7/site-packages
Requires: numpy, pandas, Pillow, matplotlib
nils@europa:~/KITTI$ pip show kitti2bag
Name: kitti2bag
Version: 1.5
Summary: Convert KITTI dataset to ROS bag file the easy way!
Home-page: https://github.com/tomas789/kitti2bag/
Author: Tomas Krejci
Author-email: [email protected]
License: UNKNOWN
Location: /home/nils/.local/lib/python2.7/site-packages
Requires: progressbar2, pykitti
nils@europa:~/KITTI$ kitti2bag -t 2011_09_26 -r 0002 raw_synced .
Could not load module 'pykitti'. Please run `pip install pykitti`

About the Imu data

Hi, I pay attention to that in kitti2bag.py, imu message is assigned as

        imu.linear_acceleration.x = oxts.packet.af
        imu.linear_acceleration.y = oxts.packet.al
        imu.linear_acceleration.z = oxts.packet.au
        imu.angular_velocity.x = oxts.packet.wf
        imu.angular_velocity.y = oxts.packet.wl
        imu.angular_velocity.z = oxts.packet.wu

But in the definition of kitti raw_data:

af: forward acceleration (m/s^2).
al: leftward acceleration (m/s^2).
au: upward acceleration (m/s^2).
wf: angular rate around forward axis (rad/s).
wl: angular rate around leftward axis (rad/s).
wu: angular rate around upward axis (rad/s).

That is the absolute values, but IMU measures the relative acceleration and angular rate in its coordinate. Why doesn't use the following values?

ax: acceleration in x, i.e. in direction of vehicle front (m/s^2).
ay: acceleration in y, i.e. in direction of vehicle left (m/s^2).
ay: acceleration in z, i.e. in direction of vehicle top (m/s^2).
wx: angular rate around x (rad/s).
wy: angular rate around y (rad/s).
wz: angular rate around z (rad/s).

No module named '_tf2'

I'm running this package on Ubuntu 16.04 with python aliased to python3, I ran into this exception message:

Traceback (most recent call last):
  File "/usr/local/bin/kitti2bag", line 12, in <module>
    import tf
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf/__init__.py", line 28, in <module>
    from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 37, in <module>
    from tf2_py import *
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 37, in <module>
    from _tf2 import *
ImportError: No module named '_tf2'

Is there some dependencies I'm missing? It seems to be related to this issue: ros/geometry2#259 but I'm not sure. I've followed the tutorial on tf to install the packages.

Thanks!

tf data doesn't seem to exactly match up with gnd truth

Hi,

I generated a bag file of sequence 6 of the KITTI odometry dataset from the raw data recordings using this tool. I then wrote a simple node that uses the rosbag tf to lookup the left camera coordinate pose at each frame and then stores this trajectory. I used the KITTI evaluation tool to plot and evaluate the trajectory.

06

As you can see, it is pretty close to the ground truth which is expected. However, I would expect it to be exactly the same or very near to it as the paper (Are we ready for autonomous driving? the KITTI vision benchmark suite) says: "The ground truth for visual odometry/SLAM is directly given by the output of the GPS/IMU localization unit projected into the coordinate system of the left camera after rectification."

I did a pose by pose comparison and plotted the translation RMSE (distance between the poses) and for the most part it is close, but there is some significant error at some frames. I haven't been able to determine why there is that error as the ground truth is from the GPS/IMU data directly and the tfs are based off of that.

rmse_6_rmse

Do you have any idea what may be the cause?

Thanks,
Vincent

run sample error

when i run it ,error occured:
kitti2bag -t 2011_09_26 -r 0002 raw_synced .
Traceback (most recent call last):
File "/home/lizj/.local/bin/kitti2bag", line 12, in
import tf
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf/init.py", line 30, in
from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/init.py", line 38, in
from tf2_py import *
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_py/init.py", line 38, in
from ._tf2 import *
ImportError: dynamic module does not define module export function (PyInit__tf2)

ImportError: No module named cv_bridge

Traceback (most recent call last):
File "/usr/local/bin/kitti2bag", line 24, in
from cv_bridge import CvBridge
ImportError: No module named cv_bridge

set custom name for fields of point cloud data

Hello,
I converted the kitti data to bag file using kitti2bag. When I want to use it in ros and using the following command:
pcl::PointCloudpcl::PointXYZI::Ptr current_sensor_cloud_ptr(new pcl::PointCloudpcl::PointXYZI);
pcl::fromROSMsg(in_sensor_cloud, *current_sensor_cloud_ptr);

it says that "Failed to find match for field 'intensity'.".
When I print names of filed of point cloud data I see that the third filed name is "i". how can I change the name or set the name manually to "intensity"?

export velodyne data raise error if there are empty lines in 'timestamps.txt'

on the 113th line of kitti2bag

    velo_datetimes = map(lambda x: datetime.strptime(x[:-4], '%Y-%m-%d %H:%M:%S.%f'), f.readlines())

so if there are empty lines in the timestamps.txt file, this code will fail with:

    ValueError: time data '' does not match format '%Y-%m-%d %H:%M:%S.%f'

And there are indeed empty lines in some kitti datasets, e.g. 2011_09_26_drive_0009_sync

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.