Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
J
jfx_kalman_filter_src
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
oscar
jfx_kalman_filter_src
Commits
007cbd4a
Commit
007cbd4a
authored
Dec 23, 2021
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交更新
parent
f1f699e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
TrackingRos.cpp
TrackingRos.cpp
+22
-11
No files found.
TrackingRos.cpp
View file @
007cbd4a
...
...
@@ -67,12 +67,6 @@ void CalculateGuassPos(float x, float y,float z,std::vector<std::vector<float>>&
svTmp
<<
x
,
y
,
z
,
1
;
Eigen
::
Matrix4f
S
=
svTmp
.
asDiagonal
();
//生成对角矩阵
Eigen
::
Matrix4f
Trans
=
Eigen
::
Matrix4f
::
Zero
();
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
Trans
(
i
,
j
)
=
trans
[
i
][
j
];
}
}
Eigen
::
Matrix4f
Kit2Ori
=
Eigen
::
Matrix4f
::
Zero
();
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
...
...
@@ -82,12 +76,29 @@ void CalculateGuassPos(float x, float y,float z,std::vector<std::vector<float>>&
auto
tmp4x8
=
S
*
corners_3d
;
auto
origin4x8
=
Kit2Ori
*
tmp4x8
;
auto
world_corners_3d
=
Trans
*
origin4x8
;
auto
res_corners_3d
=
world_corners_3d
.
block
(
0
,
0
,
3
,
8
).
transpose
();
auto
res_corners_3d
=
origin4x8
.
block
(
0
,
0
,
3
,
8
).
transpose
();
auto
head_pnt
=
(
res_corners_3d
(
1
)
+
res_corners_3d
(
2
))
/
2
;
auto
tail_pnt
=
(
res_corners_3d
(
0
)
+
res_corners_3d
(
3
))
/
2
;
float
inter_len
;
float
total_len
;
auto
lidar_loc
=
(
tail_pnt
-
head_pnt
)
*
inter_len
/
(
1.0
*
total_len
)
+
head_pnt
;
Eigen
::
Vector4f
tranTmp
;
tranTmp
<<
lidar_loc
(
0
),
lidar_loc
(
1
),
lidar_loc
(
2
),
1
;
Eigen
::
Matrix4f
Trans
=
Eigen
::
Matrix4f
::
Zero
();
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
{
Trans
(
i
,
j
)
=
trans
[
i
][
j
];
}
}
auto
world_pos
=
Trans
*
tranTmp
;
//auto world_corners_3d = Trans * svTmp;
gx
=
res_corners_3d
[
0
];
gy
=
res_corners_3d
[
1
];
gx
=
world_pos
[
0
];
gy
=
world_pos
[
1
];
}
TrackingRos
::~
TrackingRos
()
...
...
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