forked from pengzhenghao/Graduation-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
90 lines (67 loc) · 2.38 KB
/
Copy pathconfig.py
File metadata and controls
90 lines (67 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import os
import os.path as osp
from math import ceil
# VLP16 Settings
vlp_frequency = 10 # frequency of vlp16, matching its setting on web
res_azi = vlp_frequency * 2 # resolution of azimuth angle
num_packet = int(ceil(36000 / (res_azi * 24)))
grid_size = 0.1
lidar_config = {
"grid_size": grid_size,
"map_size": 50,
"min_dis": 1,
"z_limit": 1.5,
"num_packet": num_packet
}
# TODO check if every value here are PHYSICAL values s.t. international standard, not index!
detector_config = {
"grid_size": grid_size,
"map_size": 50,
"vrange": 5,
"init_confidence": 0,
"min_detected_confidence": 20,
"min_removal_confidence": 0,
"max_confidence": 300,
"search_range_coefficient": 1.01, # (max_conf - current_conf) * ratio * length = search range
"min_cluster_occupied_grids": 1,
"max_object_length": 5, # Not reasonable, should be larger. 5M (checked)
"max_object_bottom_height": 1.5,
"neighborhood_size": 2,
"neighborhood_min_samples": 3,
"overlap_threshold": 0.05 # should be larger, 0.1 is too small.
}
class BaseConfig(object):
# 本机的ip地址,即在network界面看到的值。以192.168开头。
local_ip = "127.0.0.1"
log_level = "INFO"
# route_ip = "192.168.1.1"
vlp_port = "55010"
image_port = "55011"
class VLPConfig(BaseConfig):
def __init__(self):
super(VLPConfig, self).__init__()
# 原生VLP输入端口
vlp_raw_port = 2368
fake_run_time = True
update_interval = 0 # in second.
class ImageConfig(BaseConfig):
def __init__(self):
super(ImageConfig, self).__init__()
if not osp.exists(self.log_dir):
os.mkdir(self.log_dir)
image_refresh_interval = 1 # period to refresh in second
if_record_rawdata = True # record raw data from lidar
log_dir = './test'
class RecorderConfig(BaseConfig):
metadata = {
"buffer_size": 5,
"save_dir": "experiment",
"compress": "gzip",
"log_level": "INFO",
"dataset_names": ("lidar_data", "extra_data", "frame", "timestamp"),
"dataset_dtypes": {"lidar_data": "uint16", "extra_data": "float32", "frame": "uint8",
"timestamp": "float64"},
"dataset_shapes": {"lidar_data": (30600,), "extra_data": (8,), "frame": (960, 1280, 3),
"timestamp": (1,)},
"use_video_writer": True
}