modified version of *https://github.com/tomas789/kitti2bag*
-
Install pykitti
pip install pykitti -
Modify pykitti/odometry.py file located in
/usr/local/lib/python2.7/dist-packages/pykitti. At the end of the odometry.py, add:
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| import os | |
| import struct | |
| import numpy as np | |
| """ | |
| Loosely inspired by http://abel.ee.ucla.edu/cvxopt/_downloads/mnist.py | |
| which is GPL licensed. | |
| """ | |
| def read(dataset = "training", path = "."): |
| from __future__ import absolute_import | |
| from __future__ import division | |
| from __future__ import print_function | |
| import gzip | |
| import os | |
| import sys | |
| import time | |
| from six.moves import urllib |
| #include <stdio.h> | |
| #include <math.h> | |
| #define FIXED_BIT 12 | |
| float fix2float(unsigned short int n) | |
| { | |
| float ret = 0.0; | |
| int integer_part; | |
| int i; |
| #include <stdio.h> | |
| #include <math.h> | |
| #define FIXED_BIT 12 | |
| unsigned short int float2fix(float n) | |
| { | |
| unsigned short int int_part = 0, frac_part = 0; | |
| int i; | |
| float t; |