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
baaf0e62
Commit
baaf0e62
authored
Jun 01, 2023
by
wangdawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
3cfe2e58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
maparea.h
libs/voxel_map/libs/area/maparea.h
+37
-37
No files found.
libs/voxel_map/libs/area/maparea.h
View file @
baaf0e62
...
...
@@ -201,44 +201,44 @@ public:
}
auto
ret
=
currMesh_
->
GetCellValue
(
type
,
index
,
length
);
std
::
ofstream
ofs
;
ofs
.
open
(
"/home/wdw/grid_use_"
+
to_string
(
type
)
+
".txt"
,
std
::
ios
::
app
);
int32_t
blockIndexX
=
index
.
x
.
blockId
;
int32_t
blockIndexY
=
index
.
y
.
blockId
;
uint32_t
gridIndexX
=
index
.
x
.
gridId
;
uint32_t
gridIndexY
=
index
.
y
.
gridId
;
Vector2f
gridCenter
;
gridCenter
.
x
()
=
blockIndexX
*
23
.
04
+
(
0
.
5
+
gridIndexX
)
*
0
.
09
+
currMesh_
->
GetOffset
().
x
();
gridCenter
.
y
()
=
blockIndexY
*
23
.
04
+
(
0
.
5
+
gridIndexY
)
*
0
.
09
+
currMesh_
->
GetOffset
().
y
();
// if(fabs(gridCenter.x() - (-0.045)) < 0.01
// && fabs(gridCenter.y() - 9.315) < 0.01){
// LOG(INFO) << "blockIndexX: " << blockIndexX << " blockIndexY: " << blockIndexY
// << " gridIndexX: " << gridIndexX << " gridIndexY: " << gridIndexY
// << " type: " << (uint16_t)type << " length: " << (uint16_t)length;
// std::ofstream ofs;
// ofs.open("/home/wdw/grid_use_" + to_string(type) + ".txt", std::ios::app);
// int32_t blockIndexX = index.x.blockId;
// int32_t blockIndexY = index.y.blockId;
// uint32_t gridIndexX = index.x.gridId;
// uint32_t gridIndexY = index.y.gridId;
// Vector2f gridCenter;
// gridCenter.x() = blockIndexX * 23.04 + (0.5 + gridIndexX) * 0.09 + currMesh_->GetOffset().x();
// gridCenter.y() = blockIndexY * 23.04 + (0.5 + gridIndexY) * 0.09 + currMesh_->GetOffset().y();
//// if(fabs(gridCenter.x() - (-0.045)) < 0.01
//// && fabs(gridCenter.y() - 9.315) < 0.01){
//// LOG(INFO) << "blockIndexX: " << blockIndexX << " blockIndexY: " << blockIndexY
//// << " gridIndexX: " << gridIndexX << " gridIndexY: " << gridIndexY
//// << " type: " << (uint16_t)type << " length: " << (uint16_t)length;
//// }
// if(ret == nullptr){
//// std::ofstream nullOfs;
//// nullOfs.open("/home/juefx/null_" + to_string(type) + ".txt", std::ios::app);
//// nullOfs << gridCenter.x() << "," << gridCenter.y() << "," << 0 << std::endl;
//// nullOfs.close();
// return nullptr;
// }
if
(
ret
==
nullptr
){
// std::ofstream nullOfs;
// nullOfs.open("/home/juefx/null_" + to_string(type) + ".txt", std::ios::app);
// nullOfs << gridCenter.x() << "," << gridCenter.y() << "," << 0 << std::endl;
// nullOfs.close();
return
nullptr
;
}
for
(
int
i
=
0
;
i
<
length
;
i
++
){
for
(
int32_t
j
=
0
;
j
<
(
ret
+
i
)
->
height
/
3
;
j
++
){
int32_t
indexZ
=
j
+
(
ret
+
i
)
->
floor
/
3
;
float
point
[
4
];
point
[
0
]
=
gridCenter
.
x
();
point
[
1
]
=
gridCenter
.
y
();
point
[
2
]
=
((
float
)
indexZ
+
0
.
5
)
*
3
/
100
;
point
[
3
]
=
(
ret
+
i
)
->
intensity
;
ofs
<<
point
[
0
]
<<
","
<<
point
[
1
]
<<
","
<<
point
[
2
]
<<
","
<<
point
[
3
]
<<
std
::
endl
;
}
}
ofs
.
close
();
// for(int i = 0; i < length; i++){
// for(int32_t j = 0;
// j < (ret + i)->height / 3;
// j++){
// int32_t indexZ = j + (ret + i)->floor / 3;
// float point[4];
// point[0] = gridCenter.x();
// point[1] = gridCenter.y();
// point[2] = ((float)indexZ + 0.5) * 3 / 100;
// point[3] = (ret + i)->intensity;
// ofs << point[0] << "," << point[1] << ","
// << point[2] << "," << point[3] << std::endl;
// }
// }
// ofs.close();
return
ret
;
}
...
...
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