Main contributor: @PENG Zhenghao
Please download and install PyCapture2 from PointGrey.
- Power up your LiDAR
- Connect it to your computer
- Close your internet connection
- Assign a fixed IP for your LiDAR (anyone should be OK)
- Run the program!
Example usage:
- Run the data collector for nearly half hour:
python collect_data.py --exp-name 0101-Trimaran-Tracking --timestep 18000
or
python collect_data.py --exp-name 0101-Trimaran-Tracking -t 18000
- Run the data collector for not pre-defined time duration:
python collect_data.py --exp-name 0101-Trimaran-Tracking
(Note that you should press Ctrl+C to terminate this program!)
- Load the stored data:
# This is a python script
from recorder import Recorder
config = {"exp_name": "2019-04-16_17-02-20", "save_dir": "experiment"}
r = Recorder(config)
data = r.read()
lidar_data = data["lidar_data"]
frames = data["frame"]
extra_data = data["extra_data"]
print("lidar_data contains {} and its shape is {}.".format(lidar_data, lidar_data.shape))
import cv2
for i in frames:
cv2.imshow("example", i)
cv2.waitKey(50)
cv2.destroyAllWindows()
experiment
+exp-name.h5 # The following is the structure of .h5 file.
+/config (attrubite)
+/lidar_data (dataset, a np.ndarray with shape (-1, 30600), is the raw data collected from LiDar)
+/extra_data (dataset, a np.ndarray with shape (-1, 8), the GPS information)
+/frame (dataset, a np.ndarray with shape (-1, 960, 1280, 3), camera captured image at the same frequence of LiDAR)
+/timestamp (dataset, a np.ndarray with shape (-1,))
Note that in current implementation, all data are synced sampled, which means they have same length in temporal dimension.