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
7e8cf73e
Commit
7e8cf73e
authored
May 28, 2023
by
wangdawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c5240fe9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
localize_test.cpp
apps/localize_test.cpp
+4
-0
adjust_ppk.cpp
libs/locate_system/adjust_ppk_by_locate/adjust_ppk.cpp
+1
-0
convert.cc
libs/locate_system/adjust_ppk_by_locate/convert.cc
+1
-0
maparea.h
libs/voxel_map/libs/area/maparea.h
+2
-2
mesharea.h
libs/voxel_map/libs/area/mesharea.h
+3
-3
No files found.
apps/localize_test.cpp
View file @
7e8cf73e
...
...
@@ -140,6 +140,10 @@ void test_onemesh_voxel_map_matcher()
// map2base.block(0, 0, 3, 3) = mapPoseInv.linear();
// pcl::transformPointCloud(*raw_scan, *raw_scan, map2base.cast<float>());
// Eigen::Matrix4f imu2base = Eigen::Matrix4f::Identity();
// imu2base.block(0, 0, 3, 3) = Eigen::Matrix3f(Eigen::AngleAxisf(M_PI, Eigen::Vector3f::UnitZ()));
// pcl::transformPointCloud(*raw_scan, *raw_scan, imu2base);
PointCloudJ
mapCloud
;
pcl
::
transformPointCloud
(
*
raw_scan
,
mapCloud
,
mapPose
.
cast
<
float
>
());
pcl
::
io
::
savePCDFileBinary
(
"/home/wdw/Downloads/pcd/mapCloud.pcd"
,
mapCloud
);
...
...
libs/locate_system/adjust_ppk_by_locate/adjust_ppk.cpp
View file @
7e8cf73e
...
...
@@ -69,6 +69,7 @@ void AdjustPPK::ReadBag(const string &bagPath)
if
(
convert_
->
processScan
(
m
.
instantiate
<
pandar_msgs
::
PandarScan
>
(),
cloud
)){
OnReceivedCloud
(
cloud
);
}
exit
(
0
);
}
}
...
...
libs/locate_system/adjust_ppk_by_locate/convert.cc
View file @
7e8cf73e
...
...
@@ -1230,6 +1230,7 @@ void Convert::calcPointXYZIT(const pandar_msgs::PandarPacket &packet, int cursor
}
else
if
(
azimuthIdx
<
0
)
{
azimuthIdx
+=
CIRCLE
;
}
LOG
(
INFO
)
<<
"azimuthIdx: "
<<
azimuthIdx
;
point
.
x
=
xyDistance
*
m_fSinAllAngle
[
azimuthIdx
];
point
.
y
=
xyDistance
*
m_fCosAllAngle
[
azimuthIdx
];
...
...
libs/voxel_map/libs/area/maparea.h
View file @
7e8cf73e
...
...
@@ -204,8 +204,8 @@ public:
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
();
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
...
...
libs/voxel_map/libs/area/mesharea.h
View file @
7e8cf73e
...
...
@@ -72,10 +72,8 @@ public:
return
false
;
}
LOG
(
INFO
)
<<
"pose: "
<<
pose
.
transpose
();
double
x
=
pose
.
x
()
-
offset_
.
x
();
double
y
=
pose
.
y
()
-
offset_
.
y
();
Vector2i
shiftedIndexToLoad
=
calShiftedIndex
(
x
,
y
);
calShiftedIndex
(
pose
.
x
(),
pose
.
y
()
);
return
checkBlockAtAreaToLoad
(
shiftedIndexToLoad
);
}
...
...
@@ -251,6 +249,8 @@ private:
inline
Vector2i
calShiftedIndex
(
double
x
,
double
y
)
const
{
x
-=
offset_
.
x
();
y
-=
offset_
.
y
();
Vector2i
blockIndex
;
blockIndex
.
x
()
=
floor
(
x
*
100
/
blockResolution_
);
blockIndex
.
y
()
=
floor
(
y
*
100
/
blockResolution_
);
...
...
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