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
fe166c5e
Commit
fe166c5e
authored
Jun 02, 2023
by
wangdawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
map dir
parent
b80c1fe2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
17 deletions
+44
-17
adjust_ppk.cpp
libs/locate_system/adjust_ppk_by_locate/adjust_ppk.cpp
+44
-17
No files found.
libs/locate_system/adjust_ppk_by_locate/adjust_ppk.cpp
View file @
fe166c5e
...
...
@@ -93,7 +93,7 @@ void AdjustPPK::ReadBag(const string &bagPath)
void
AdjustPPK
::
ReadCenter
()
{
string
centerPath
=
mapDir_
+
"/2329_station_jf.txt"
;
string
centerPath
=
mapDir_
+
"/2329
/2329
_station_jf.txt"
;
std
::
ifstream
ifs
(
centerPath
);
string
line
;
vector
<
string
>
line_vec
;
...
...
@@ -207,25 +207,52 @@ void AdjustPPK::LoadMapInfo()
// meshVec_.insert(make_pair(ulong(stoi(meshId)), meshMap));
// }
// }
string
meshDir
=
mapDir_
+
"/pcd_cart"
;
if
(
is_directory
(
meshDir
)){
directory_iterator
pcd_iter
(
meshDir
);
directory_iterator
pcd_end_iter
;
for
(;
pcd_iter
!=
pcd_end_iter
;
pcd_iter
++
)
{
if
(
pcd_iter
->
path
().
extension
().
string
()
!=
".pcd"
){
continue
;
}
auto
fileName
=
pcd_iter
->
path
().
filename
().
string
();
ulong
meshId
=
stoi
(
split_string
(
fileName
,
'_'
).
front
());
if
(
meshVec_
.
find
(
meshId
)
==
meshVec_
.
end
()){
MashMap
meshMap
;
meshMap
.
pcdPathVec
.
push_back
(
pcd_iter
->
path
().
string
());
meshVec_
.
insert
(
make_pair
(
meshId
,
meshMap
));
}
else
{
meshVec_
.
at
(
meshId
).
pcdPathVec
.
push_back
(
pcd_iter
->
path
().
string
());
if
(
is_directory
(
mapDir_
)){
directory_iterator
mesh_iter
(
mapDir_
);
directory_iterator
mesh_end_iter
;
for
(;
mesh_iter
!=
mesh_end_iter
;
mesh_iter
++
)
{
string
meshDir
=
mesh_iter
->
path
().
string
()
+
"/pcd_cart"
;
if
(
is_directory
(
meshDir
)){
directory_iterator
pcd_iter
(
meshDir
);
directory_iterator
pcd_end_iter
;
for
(;
pcd_iter
!=
pcd_end_iter
;
pcd_iter
++
)
{
if
(
pcd_iter
->
path
().
extension
().
string
()
!=
".pcd"
){
continue
;
}
auto
fileName
=
pcd_iter
->
path
().
filename
().
string
();
ulong
meshId
=
stoi
(
split_string
(
fileName
,
'_'
).
front
());
if
(
meshVec_
.
find
(
meshId
)
==
meshVec_
.
end
()){
MashMap
meshMap
;
meshMap
.
pcdPathVec
.
push_back
(
pcd_iter
->
path
().
string
());
meshVec_
.
insert
(
make_pair
(
meshId
,
meshMap
));
}
else
{
meshVec_
.
at
(
meshId
).
pcdPathVec
.
push_back
(
pcd_iter
->
path
().
string
());
}
}
}
}
}
// string meshDir = mapDir_ + "/pcd_cart";
// if(is_directory(meshDir)){
// directory_iterator pcd_iter(meshDir);
// directory_iterator pcd_end_iter;
// for(; pcd_iter != pcd_end_iter; pcd_iter++) {
// if(pcd_iter->path().extension().string() != ".pcd"){
// continue;
// }
// auto fileName = pcd_iter->path().filename().string();
// ulong meshId = stoi(split_string(fileName, '_').front());
// if(meshVec_.find(meshId) == meshVec_.end()){
// MashMap meshMap;
// meshMap.pcdPathVec.push_back(pcd_iter->path().string());
// meshVec_.insert(make_pair(meshId, meshMap));
// }else{
// meshVec_.at(meshId).pcdPathVec.push_back(pcd_iter->path().string());
// }
// }
// }
LOG
(
INFO
)
<<
"meshVec_.size(): "
<<
meshVec_
.
size
();
}
...
...
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