Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
localize_for_ppk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangdawei
localize_for_ppk
Commits
bb858edf
Commit
bb858edf
authored
Jun 15, 2023
by
wangdawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse test
parent
b4b256d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
localize_ppk.cpp
apps/localize_ppk.cpp
+2
-1
adjust_ppk.cpp
libs/locate_system/adjust_ppk_by_locate/adjust_ppk.cpp
+8
-6
No files found.
apps/localize_ppk.cpp
View file @
bb858edf
...
@@ -61,8 +61,9 @@ int main(int argc, char *argv[])
...
@@ -61,8 +61,9 @@ int main(int argc, char *argv[])
boost
::
filesystem
::
create_directory
(
FLAGS_log_dir
);
boost
::
filesystem
::
create_directory
(
FLAGS_log_dir
);
}
}
AdjustPPK
adjustPPK
(
FLAGS_ie_base_dir
,
FLAGS_map_dir
);
AdjustPPK
adjustPPK
(
FLAGS_ie_base_dir
,
FLAGS_map_dir
);
adjustPPK
.
ConfigConvert
(
FLAGS_ie_base_dir
+
"/P
andar128_Firetimes
.csv"
,
adjustPPK
.
ConfigConvert
(
FLAGS_ie_base_dir
+
"/P
12838CC539738CE52
.csv"
,
FLAGS_ie_base_dir
+
"/Pandar128_Correction.csv"
);
FLAGS_ie_base_dir
+
"/Pandar128_Correction.csv"
);
adjustPPK
.
ReadBag
(
"/home/wdw/Documents/test/test.bag"
);
directory_iterator
bag_iter
(
FLAGS_ie_base_dir
);
directory_iterator
bag_iter
(
FLAGS_ie_base_dir
);
directory_iterator
bag_end_iter
;
directory_iterator
bag_end_iter
;
for
(;
bag_iter
!=
bag_end_iter
;
bag_iter
++
)
{
for
(;
bag_iter
!=
bag_end_iter
;
bag_iter
++
)
{
...
...
libs/locate_system/adjust_ppk_by_locate/adjust_ppk.cpp
View file @
bb858edf
...
@@ -81,10 +81,10 @@ void AdjustPPK::ReadBag(const string &bagPath)
...
@@ -81,10 +81,10 @@ void AdjustPPK::ReadBag(const string &bagPath)
continue
;
continue
;
}
}
PPointCloud
cloud
;
PPointCloud
cloud
;
if
(
cloudCnt_
%
20
!=
0
){
//
if(cloudCnt_ % 20 != 0){
cloudCnt_
++
;
//
cloudCnt_++;
continue
;
//
continue;
}
//
}
if
(
convert_
->
processScan
(
m
.
instantiate
<
pandar_msgs
::
PandarScan
>
(),
cloud
)){
if
(
convert_
->
processScan
(
m
.
instantiate
<
pandar_msgs
::
PandarScan
>
(),
cloud
)){
OnReceivedCloud
(
cloud
);
OnReceivedCloud
(
cloud
);
}
}
...
@@ -110,7 +110,7 @@ Vector3d AdjustPPK::ReadCenter(const string& taskName)
...
@@ -110,7 +110,7 @@ Vector3d AdjustPPK::ReadCenter(const string& taskName)
boost
::
split
(
line_vec
,
line
,
boost
::
is_any_of
(
":"
),
boost
::
token_compress_on
);
boost
::
split
(
line_vec
,
line
,
boost
::
is_any_of
(
":"
),
boost
::
token_compress_on
);
center
.
z
()
=
stof
(
line_vec
.
at
(
1
));
center
.
z
()
=
stof
(
line_vec
.
at
(
1
));
}
}
LOG
(
INFO
)
<<
"center_: "
<<
center
.
transpose
();
//
LOG(INFO) << "center_: " << center.transpose();
return
center
;
return
center
;
}
}
...
@@ -141,6 +141,8 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud)
...
@@ -141,6 +141,8 @@ void AdjustPPK::OnReceivedCloud(const PPointCloud &cloud)
// << " frontPTime: " << cloud.front().timestamp
// << " frontPTime: " << cloud.front().timestamp
// << " backPTime: " << cloud.back().timestamp;
// << " backPTime: " << cloud.back().timestamp;
pcl
::
io
::
savePCDFileBinary
(
ieBaseDir_
+
"/baseCloud/"
+
to_string
(
cloudPacket
.
timestamp
)
+
"_ori.pcd"
,
cloud
);
exit
(
0
);
for
(
size_t
i
=
0
;
i
<
cloud
.
size
();
i
++
){
for
(
size_t
i
=
0
;
i
<
cloud
.
size
();
i
++
){
if
(
i
%
5
!=
0
){
if
(
i
%
5
!=
0
){
continue
;
continue
;
...
@@ -412,7 +414,7 @@ bool AdjustPPK::Undisort(
...
@@ -412,7 +414,7 @@ bool AdjustPPK::Undisort(
Quaterniond
q
(
increasePose
.
linear
());
Quaterniond
q
(
increasePose
.
linear
());
Vector3d
rpy
=
RotationQuaternionToEulerVector
(
q
);
Vector3d
rpy
=
RotationQuaternionToEulerVector
(
q
);
LOG_EVERY_N
(
INFO
,
100
)
<<
setprecision
(
15
)
LOG_EVERY_N
(
INFO
,
100
)
<<
setprecision
(
15
)
<<
"
periodPose.front(): "
<<
periodPose
.
front
().
timestamp
<<
"periodPose.front(): "
<<
periodPose
.
front
().
timestamp
<<
" periodPose.back(): "
<<
periodPose
.
back
().
timestamp
<<
" periodPose.back(): "
<<
periodPose
.
back
().
timestamp
<<
" increasePose: "
<<
increasePose
.
translation
().
transpose
()
<<
" increasePose: "
<<
increasePose
.
translation
().
transpose
()
<<
" rpy: "
<<
rpy
.
transpose
();
<<
" rpy: "
<<
rpy
.
transpose
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment