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
255c80b4
Commit
255c80b4
authored
Jan 13, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交消息发送类型
parent
4d6b851f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
TrackingRosEx.cpp
TrackingRosEx.cpp
+12
-3
TrackingRosEx.h
TrackingRosEx.h
+2
-0
No files found.
TrackingRosEx.cpp
View file @
255c80b4
...
...
@@ -276,6 +276,9 @@ void TrackingRos::Init(ros::NodeHandle& nh)
values
.
push_back
(
matrix_angle_r_value
);
m_tracker
.
SetValues
(
values
);
nh
.
param
<
int32_t
>
(
"detect_recv_msg_only"
,
m_recvMsgBit
,
0
b1111
);
SDK_LOG
(
SDK_INFO
,
"detect_recv_msg_only = %d"
,
m_recvMsgBit
);
YAML
::
Node
config
=
YAML
::
LoadFile
(
file
.
c_str
());
auto
cfg
=
config
[
"TRACKING"
];
m_trans
=
cfg
[
"TRANS"
].
as
<
std
::
vector
<
std
::
vector
<
double
>>>
();
...
...
@@ -384,7 +387,11 @@ void TrackingRos::TrackingCallBackFunc(const jfx_common_msgs::det_tracking_array
//m_pubCloud.publish(msg->cloud);
}
inline
int
_GET_VALID_VALUE
(
unsigned
char
position
,
int
bits
)
{
unsigned
int
the_mask
=
(((
unsigned
int
)
1
)
<<
position
);
return
(
the_mask
&=
bits
)
>>
position
;
}
void
TrackingRos
::
TrackingCameraCallBackFunc
(
const
jfx_common_msgs
::
InferResesConstPtr
&
msg
)
{
...
...
@@ -432,7 +439,8 @@ void TrackingRos::TrackingCameraCallBackFunc(const jfx_common_msgs::InferResesCo
}
else
continue
;
objsPtr
->
array
.
push_back
(
obj
);
if
(
_GET_VALID_VALUE
(
0
,
m_recvMsgBit
))
objsPtr
->
array
.
push_back
(
obj
);
}
//SDK_LOG(SDK_INFO, "camera msg [0] size = %d,[1] = %d,[2] = %d",msg->reses[0].results.size(), msg->reses[1].results.size(), msg->reses[2].results.size());
for
(
int
i
=
0
;
i
<
3
;
i
++
)
...
...
@@ -548,7 +556,8 @@ void TrackingRos::TrackingCameraCallBackFunc(const jfx_common_msgs::InferResesCo
//objMsg.type = 7;
//SDK_LOG(SDK_INFO, "camera 1,2 x = %f,y = %f", objMsg.x, objMsg.y);
}
objsPtr
->
array
.
push_back
(
objMsg
);
if
(
_GET_VALID_VALUE
(
i
+
1
,
m_recvMsgBit
))
objsPtr
->
array
.
push_back
(
objMsg
);
}
}
}
...
...
TrackingRosEx.h
View file @
255c80b4
...
...
@@ -57,4 +57,6 @@ public:
int
m_frameNum
=
0
;
float
m_lidar_x_angle
=
0
.
0
f
;
//修改rot_y的参数,从配置里读取
int
m_recvMsgBit
=
0
b1111
;
//处理消息的类型
};
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