-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlocalization.orogen
114 lines (83 loc) · 3.34 KB
/
localization.orogen
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name "localization"
pcl_registration = Utilrb::PkgConfig.each_package.find { |name| /^pcl_registration/.match(name) }
if(!pcl_registration)
raise "cannot find the pcl_registration pkg-config package"
end
using_library pcl_registration
pcl_io = Utilrb::PkgConfig.each_package.find { |name| /^pcl_io/.match(name) }
if(!pcl_io)
raise "cannot find the pcl_io pkg-config package"
end
using_library pcl_io
using_library 'depth_map_preprocessing'
using_library 'base-logging'
import_types_from 'base'
import_types_from 'LocalizationConfig.hpp'
task_context "Task" do
needs_configuration
# Load initial point cloud in PLY format
property('ply_path', 'string', "")
# Start pose of the robot in the map frame
property('start_pose', '/base/Pose')
# icp configuration
property('gicp_configuration', '/localization/GICPConfiguration')
# Diagonal of the pose process noise covariance
property('process_noise_diagonal', '/base/Vector6d')
# Subsamples the input pointclouds according to this configuration
property('subsampling', '/localization/SubSampling', :None)
property('subsampling_resolution', '/base/Vector3d')
# Name of the frame, of the provided transformations by this component. E.g. body to localization
property('output_frame_name', 'string', 'localization')
# If true the result of the alignment will be written to debug_map_pointcloud
property('write_debug_pointcloud', 'bool', false)
## input ports
# updates the model pointcloud
input_port('model_pointcloud', '/base/samples/Pointcloud')
# allows an external and unaligned pose update
input_port('pose_update', '/base/samples/RigidBodyState')
## output ports
# timestamped samples of the current pose of the robot
output_port('pose_samples', '/base/samples/RigidBodyState')
# Shows the aligned measurement in the reference map
output_port('debug_map_pointcloud', '/base/samples/Pointcloud')
# icp debug information
output_port('icp_debug_information', '/localization/ICPDebugInformation')
## states
runtime_states :MISSING_TRANSFORMATION, :ICP_ALIGNMENT_FAILED
end
task_context "PointcloudInMLS" do
subclasses "Task"
needs_configuration
## input ports
input_port('pointcloud_samples', '/base/samples/Pointcloud').
doc 'pointcloud data in body frame'
## transformer config
transformer do
max_latency( 0.2 )
transformation("pointcloud", "body")
transformation("body", "odometry")
align_port("pointcloud_samples", 0.1)
end
port_driven
end
task_context "VelodyneInMLS" do
subclasses "Task"
needs_configuration
## point cloud filter parameter
property('maximum_angle_to_neighbor', 'double', 0.95).
doc('valid neigbors have an angle not greater than this value.').
doc('the angle is always defined from the origin to the more distant point.')
property('minimum_valid_neighbors', 'int', 2).
doc('minimum amount of valid neigbors')
## input ports
input_port('lidar_samples', '/base/samples/DepthMap').
doc 'timestamped 3d laser scans'
## transformer config
transformer do
max_latency( 0.2 )
transformation("velodyne", "body")
transformation("body", "odometry")
align_port("lidar_samples", 0.1)
end
port_driven
end