Skip to content

Commit 6f79557

Browse files
author
jyakaranda
committed
ImageProjection ok
1 parent d0660dd commit 6f79557

File tree

6 files changed

+286
-14
lines changed

6 files changed

+286
-14
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
# A-LeGO-LOAM
1+
# A-LeGO-LOAM
2+
3+
## ImageProjection
4+
5+
这 outlier 也太多了(将近 1/3),而且原始数据中有很多点相邻太近(将近一半),不知道是不是雷达的问题

include/imageProjection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ImageProjection : public nodelet::Nodelet
2121
PointCloudT::Ptr outlier_cloud_;
2222

2323
Eigen::Matrix<float, N_SCAN, Horizon_SCAN> range_mat_;
24-
Eigen::Matrix<bool, N_SCAN, Horizon_SCAN> label_mat_;
24+
Eigen::Matrix<int, N_SCAN, Horizon_SCAN> label_mat_;
2525
Eigen::Matrix<bool, N_SCAN, Horizon_SCAN> ground_mat_;
2626

2727
int label_cnt_;

include/utility.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
using PointT = pcl::PointXYZI;
3939
using PointCloudT = pcl::PointCloud<PointT>;
4040

41-
#define RAD2ANGLE(x) ((x) / M_PI * 180.0)
41+
#define RAD2ANGLE(x) ((x) * 180.0 / M_PI)
4242
#define ANGLE2RAD(x) ((x) / 180.0 * M_PI)
4343

4444
const int N_SCAN = 16;
@@ -57,6 +57,9 @@ const float seg_theta = 1.0472;
5757
const int seg_valid_point_num = 5;
5858
const int seg_valid_line_num = 3;
5959

60+
const bool use_imu = true;
61+
const bool use_odom = true;
62+
6063
class TicToc
6164
{
6265
public:

launch/test.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
<param name="use_sim_time" value="true" />
44

5-
<node pkg="nodelet" type="nodelet" name="lego_manager" args="manager" output="screen" />
6-
<node pkg="nodelet" type="nodelet" name="ImageProjection" args="load loam/ImageProjection lego_manager" output="screen" />
5+
<node pkg="nodelet" type="nodelet" name="lego_manager" args="manager" output="log" />
6+
<node pkg="nodelet" type="nodelet" name="ImageProjection" args="load loam/ImageProjection lego_manager" output="log" />
77
</launch>

rviz/test.rviz

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
Panels:
2+
- Class: rviz/Displays
3+
Help Height: 78
4+
Name: Displays
5+
Property Tree Widget:
6+
Expanded:
7+
- /Global Options1
8+
- /Status1
9+
Splitter Ratio: 0.5
10+
Tree Height: 773
11+
- Class: rviz/Selection
12+
Name: Selection
13+
- Class: rviz/Tool Properties
14+
Expanded:
15+
- /2D Pose Estimate1
16+
- /2D Nav Goal1
17+
- /Publish Point1
18+
Name: Tool Properties
19+
Splitter Ratio: 0.588679016
20+
- Class: rviz/Views
21+
Expanded:
22+
- /Current View1
23+
Name: Views
24+
Splitter Ratio: 0.5
25+
- Class: rviz/Time
26+
Experimental: false
27+
Name: Time
28+
SyncMode: 0
29+
SyncSource: ground
30+
Visualization Manager:
31+
Class: ""
32+
Displays:
33+
- Alpha: 0.5
34+
Cell Size: 1
35+
Class: rviz/Grid
36+
Color: 160; 160; 164
37+
Enabled: true
38+
Line Style:
39+
Line Width: 0.0299999993
40+
Value: Lines
41+
Name: Grid
42+
Normal Cell Count: 0
43+
Offset:
44+
X: 0
45+
Y: 0
46+
Z: 0
47+
Plane: XY
48+
Plane Cell Count: 10
49+
Reference Frame: <Fixed Frame>
50+
Value: true
51+
- Alpha: 0.699999988
52+
Class: rviz/Map
53+
Color Scheme: map
54+
Draw Behind: false
55+
Enabled: false
56+
Name: Map
57+
Topic: /realtime_cost_map
58+
Unreliable: false
59+
Use Timestamp: false
60+
Value: false
61+
- Alpha: 1
62+
Autocompute Intensity Bounds: true
63+
Autocompute Value Bounds:
64+
Max Value: 10
65+
Min Value: -10
66+
Value: true
67+
Axis: Z
68+
Channel Name: intensity
69+
Class: rviz/PointCloud2
70+
Color: 255; 0; 0
71+
Color Transformer: FlatColor
72+
Decay Time: 0
73+
Enabled: false
74+
Invert Rainbow: false
75+
Max Color: 255; 255; 255
76+
Max Intensity: 255
77+
Min Color: 0; 0; 0
78+
Min Intensity: 4
79+
Name: lslidar
80+
Position Transformer: XYZ
81+
Queue Size: 10
82+
Selectable: true
83+
Size (Pixels): 3
84+
Size (m): 0.0500000007
85+
Style: Flat Squares
86+
Topic: /lslidar_point_cloud
87+
Unreliable: false
88+
Use Fixed Frame: true
89+
Use rainbow: true
90+
Value: false
91+
- Alpha: 1
92+
Autocompute Intensity Bounds: true
93+
Autocompute Value Bounds:
94+
Max Value: 10
95+
Min Value: -10
96+
Value: true
97+
Axis: Z
98+
Channel Name: intensity
99+
Class: rviz/PointCloud2
100+
Color: 255; 255; 255
101+
Color Transformer: FlatColor
102+
Decay Time: 0
103+
Enabled: true
104+
Invert Rainbow: false
105+
Max Color: 255; 255; 255
106+
Max Intensity: 255
107+
Min Color: 0; 0; 0
108+
Min Intensity: 4
109+
Name: ground
110+
Position Transformer: XYZ
111+
Queue Size: 10
112+
Selectable: true
113+
Size (Pixels): 1
114+
Size (m): 0.100000001
115+
Style: Flat Squares
116+
Topic: /ground
117+
Unreliable: false
118+
Use Fixed Frame: true
119+
Use rainbow: true
120+
Value: true
121+
- Alpha: 1
122+
Autocompute Intensity Bounds: true
123+
Autocompute Value Bounds:
124+
Max Value: 10
125+
Min Value: -10
126+
Value: true
127+
Axis: Z
128+
Channel Name: intensity
129+
Class: rviz/PointCloud2
130+
Color: 255; 255; 255
131+
Color Transformer: Intensity
132+
Decay Time: 0
133+
Enabled: true
134+
Invert Rainbow: false
135+
Max Color: 255; 255; 255
136+
Max Intensity: 15.1721001
137+
Min Color: 0; 0; 0
138+
Min Intensity: 9.99999975e-05
139+
Name: segmented
140+
Position Transformer: XYZ
141+
Queue Size: 10
142+
Selectable: true
143+
Size (Pixels): 3
144+
Size (m): 0.100000001
145+
Style: Flat Squares
146+
Topic: /segmented_cloud
147+
Unreliable: false
148+
Use Fixed Frame: true
149+
Use rainbow: true
150+
Value: true
151+
- Alpha: 1
152+
Autocompute Intensity Bounds: true
153+
Autocompute Value Bounds:
154+
Max Value: 10
155+
Min Value: -10
156+
Value: true
157+
Axis: Z
158+
Channel Name: intensity
159+
Class: rviz/PointCloud2
160+
Color: 255; 255; 255
161+
Color Transformer: FlatColor
162+
Decay Time: 0
163+
Enabled: true
164+
Invert Rainbow: false
165+
Max Color: 255; 255; 255
166+
Max Intensity: 15.1964998
167+
Min Color: 0; 0; 0
168+
Min Intensity: 8.00450039
169+
Name: outlier
170+
Position Transformer: XYZ
171+
Queue Size: 10
172+
Selectable: true
173+
Size (Pixels): 3
174+
Size (m): 0.0500000007
175+
Style: Flat Squares
176+
Topic: /outlier
177+
Unreliable: false
178+
Use Fixed Frame: true
179+
Use rainbow: true
180+
Value: true
181+
Enabled: true
182+
Global Options:
183+
Background Color: 48; 48; 48
184+
Default Light: true
185+
Fixed Frame: laser
186+
Frame Rate: 30
187+
Name: root
188+
Tools:
189+
- Class: rviz/Interact
190+
Hide Inactive Objects: true
191+
- Class: rviz/MoveCamera
192+
- Class: rviz/Select
193+
- Class: rviz/FocusCamera
194+
- Class: rviz/Measure
195+
- Class: rviz/SetInitialPose
196+
Topic: /initialpose
197+
- Class: rviz/SetGoal
198+
Topic: /move_base_simple/goal
199+
- Class: rviz/PublishPoint
200+
Single click: true
201+
Topic: /clicked_point
202+
Value: true
203+
Views:
204+
Current:
205+
Class: rviz/Orbit
206+
Distance: 77.0821152
207+
Enable Stereo Rendering:
208+
Stereo Eye Separation: 0.0599999987
209+
Stereo Focal Distance: 1
210+
Swap Stereo Eyes: false
211+
Value: false
212+
Focal Point:
213+
X: 2.85808182
214+
Y: 1.35583115
215+
Z: 3.23869038
216+
Focal Shape Fixed Size: true
217+
Focal Shape Size: 0.0500000007
218+
Invert Z Axis: false
219+
Name: Current View
220+
Near Clip Distance: 0.00999999978
221+
Pitch: 0.864796996
222+
Target Frame: <Fixed Frame>
223+
Value: Orbit (rviz)
224+
Yaw: 2.12711835
225+
Saved: ~
226+
Window Geometry:
227+
Displays:
228+
collapsed: false
229+
Height: 1053
230+
Hide Left Dock: false
231+
Hide Right Dock: false
232+
QMainWindow State: 000000ff00000000fd00000004000000000000016a00000393fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002800000393000000d600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f00000393fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000002800000393000000ac00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007320000003efc0100000002fb0000000800540069006d00650100000000000007320000030000fffffffb0000000800540069006d00650100000000000004500000000000000000000004ad0000039300000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
233+
Selection:
234+
collapsed: false
235+
Time:
236+
collapsed: false
237+
Tool Properties:
238+
collapsed: false
239+
Views:
240+
collapsed: false
241+
Width: 1842
242+
X: 78
243+
Y: 27

0 commit comments

Comments
 (0)