Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
multiTraj
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
multiTraj
Commits
046e5fb8
Commit
046e5fb8
authored
Feb 10, 2023
by
limingbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change filter by position stratgy and add startTime and endTime
parent
b3ec79fe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
11 deletions
+20
-11
CMakeLists.txt.user
CMakeLists.txt.user
+1
-1
multi_traj_functions.cpp
apps/function/multi_traj_functions.cpp
+0
-0
multi_traj_functions.h
apps/function/multi_traj_functions.h
+3
-1
trajectory.cpp
libs/trajectory/trajectory.cpp
+9
-8
trajectory.h
libs/trajectory/trajectory.h
+7
-1
No files found.
CMakeLists.txt.user
View file @
046e5fb8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.2, 2023-02-09T1
3:22:15
. -->
<!-- Written by QtCreator 4.5.2, 2023-02-09T1
6:55:42
. -->
<qtcreator>
<data>
<variable>
EnvironmentId
</variable>
...
...
apps/function/multi_traj_functions.cpp
View file @
046e5fb8
This diff is collapsed.
Click to expand it.
apps/function/multi_traj_functions.h
View file @
046e5fb8
...
...
@@ -10,6 +10,8 @@ struct TaskInfo{
string
trajPath
=
""
;
string
meshOutPath
=
""
;
uint32_t
meshId
=
0
;
double
startTime
=
0
;
double
endTime
=
0
;
};
struct
CloseTrajInfo
{
...
...
@@ -46,7 +48,7 @@ bool checkMeshOut(
vector
<
CloseTrajInfo
>
crossFilter
(
const
vector
<
TaskInfo
>
&
filteredTaskInfo
);
bool
initTrajectory
(
const
string
&
trajPath
,
bool
initTrajectory
(
const
TaskInfo
&
taskInfo
,
boost
::
shared_ptr
<
Trajectory
>
&
trajectory
);
vector
<
PointCloudExport
::
Ptr
>
multiThreadGetPointCloud
(
...
...
libs/trajectory/trajectory.cpp
View file @
046e5fb8
...
...
@@ -21,8 +21,10 @@ Trajectory::~Trajectory()
if
(
io_
)
delete
io_
;
}
bool
Trajectory
::
init
()
bool
Trajectory
::
init
(
double
startTime
,
double
endTime
)
{
startTime_
=
startTime
;
endTime_
=
endTime
;
string
range
;
switch
(
trajType_
){
case
PPK
:
...
...
@@ -303,9 +305,6 @@ bool Trajectory::checkSatisfied(const int32_t &supposed_floor_index, const doubl
}
}
double
gpsToUtc
(
const
uint32_t
&
gps_week
,
const
double
&
gps_sec
)
{
return
(
315936000
+
gps_week
*
7
*
24
*
3600
+
gps_sec
-
18
);
}
void
Trajectory
::
parseAndPush
(
const
vector
<
string
>
&
vec
,
uint8_t
index
)
{
...
...
@@ -350,11 +349,13 @@ void Trajectory::parseAndPush(const vector<string> &vec, uint8_t index)
trajPoint
.
rotation
=
EulerToMatrix3d
(
Vector3d
(
ppk_raw_info
.
pitch
,
ppk_raw_info
.
roll
,
ppk_raw_info
.
yaw
));
trajPoint
.
nodeId
=
trajectory_
.
size
();
trajPoint
.
timestamp
=
gpsToUtc
(
ppk_raw_info
.
gps_week
,
ppk_raw_info
.
gps_sec
);
if
(
multiTrajectory_
[
index
].
size
()
==
0
){
multiTrajectory_
[
index
].
push_back
(
trajPoint
);
}
else
{
if
((
trajPoint
.
translation
-
multiTrajectory_
[
index
].
back
().
translation
).
norm
()
>
1
){
if
(
trajPoint
.
timestamp
>
startTime_
&&
trajPoint
.
timestamp
<
endTime_
){
if
(
multiTrajectory_
[
index
].
size
()
==
0
){
multiTrajectory_
[
index
].
push_back
(
trajPoint
);
}
else
{
if
((
trajPoint
.
translation
-
multiTrajectory_
[
index
].
back
().
translation
).
norm
()
>
1
){
multiTrajectory_
[
index
].
push_back
(
trajPoint
);
}
}
}
...
...
libs/trajectory/trajectory.h
View file @
046e5fb8
...
...
@@ -16,7 +16,7 @@ public:
~
Trajectory
();
bool
init
();
bool
init
(
double
startTime
,
double
endTime
);
string
getTrajPath
()
const
;
...
...
@@ -47,6 +47,10 @@ public:
Vector3d
reverse
(
const
TrajPoint
&
trajPoint
);
double
getFrequency
();
static
double
gpsToUtc
(
const
uint32_t
&
gps_week
,
const
double
&
gps_sec
)
{
return
(
315936000
+
gps_week
*
7
*
24
*
3600
+
gps_sec
-
18
);
}
private
:
bool
checkSatisfied
(
const
int32_t
&
supposed_floor_index
,
const
double
&
timestamp
)
const
;
...
...
@@ -67,6 +71,8 @@ private:
boost
::
shared_ptr
<
LocalCartesian
>
proj_
;
boost
::
shared_mutex
Mtx_
;
double
startTime_
;
double
endTime_
;
};
#endif // TRAJECTORY_H
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