Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ros_camera_bev
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yangxue
ros_camera_bev
Commits
2dcb1204
Commit
2dcb1204
authored
May 14, 2025
by
yangxue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new model
parent
adab96f8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
12 deletions
+30
-12
README.md
README.md
+5
-3
CameraBevParam.yaml
src/camera_bev_infer/configs/CameraBevParam.yaml
+1
-1
ips_2504m_xisan_ft.onnx
src/camera_bev_infer/configs/weights/ips_2504m_xisan_ft.onnx
+0
-0
multi_yolov5m.yaml
src/camera_bev_infer/configs/weights/multi_yolov5m.yaml
+2
-2
sensor_manager.cpp
src/camera_bev_infer/src/sensor_manager.cpp
+2
-1
vision_3d.cpp
src/camera_bev_infer/src/vision_transform/vision_3d.cpp
+20
-5
No files found.
README.md
View file @
2dcb1204
...
...
@@ -2,7 +2,7 @@
*
@Author: yangxue && xue.yang@waytous.com
*
@Date: 2025-04-07 09:26:17
*
@LastEditors: yangxue xue.yang@waytous.com
*
@LastEditTime: 2025-04-1
0 09:45:19
*
@LastEditTime: 2025-04-1
7 06:22:11
*
@FilePath: /ubuntu/projects/ros_camera_bev/README.md
*
@Description:
*
...
...
@@ -21,7 +21,7 @@ catkin_make -DCATKIN_WHITELIST_PACKAGES="perception_camera_bev" -DCUDA_nppicom_L
# 参数修改
■
有
*
.engine文件则删除
(不要删除onnx文件):/configs/weights/ips_241107m_stone_best_fp16.engine
■
如果部署到不同平台上,有
*
.engine文件则删除,程序重新生成
(不要删除onnx文件):/configs/weights/ips_241107m_stone_best_fp16.engine
■ 修改参数文件 configs/CameraBevParam.yaml
● rgb_sub_topic_name 图像数据话题
● pointcloud_sub_topic_name 点云数据话题
...
...
@@ -37,6 +37,7 @@ catkin_make -DCATKIN_WHITELIST_PACKAGES="perception_camera_bev" -DCUDA_nppicom_L
```
bash launch.sh
```
-
注意:部署到新平台上,第一次运行会生成engine文件,耗时较长是正常现象。
# 本地天准域控测试的一些关键命令
```
...
...
@@ -58,5 +59,5 @@ rviz
```
# 压缩部署关键文件
```
zip -r ros_camera_bev.zip ros_camera_bev/ -x "ros_camera_bev/.vscode/*" -x "ros_camera_bev/devel/*" -x "ros_camera_bev/build/*" -x "ros_camera_bev/sdk/*" -x "ros_camera_bev/src/camera_back_warn/*" -x "*.engine" -x "*.bag" -x "ros_camera_bev/.git/*" -x "*.gitignore"
zip -r ros_camera_bev.zip ros_camera_bev/ -x "ros_camera_bev/.vscode/*" -x "ros_camera_bev/devel/*" -x "ros_camera_bev/build/*" -x "ros_camera_bev/sdk/*" -x "ros_camera_bev/src/camera_back_warn/*" -x "*.engine" -x "*.bag" -x "ros_camera_bev/.git/*" -x "*.gitignore"
-x "*.catkin_workspace"
```
\ No newline at end of file
src/camera_bev_infer/configs/CameraBevParam.yaml
View file @
2dcb1204
...
...
@@ -12,7 +12,7 @@ device: 0
period_time
:
5
vis_res
:
true
vis_frame_id
:
livox_frame_hap
# vehicle_link
vis_project
:
tru
e
vis_project
:
fals
e
# ["pedestrian", "vehicle", "stone"]
pub_classes
:
[
"
pedestrian"
,
"
vehicle"
]
# ["stone", "cone"]
obstacle_height_threshold
:
25
# cm
...
...
src/camera_bev_infer/configs/weights/ips_2504m_xisan_ft.onnx
0 → 100644
View file @
2dcb1204
File added
src/camera_bev_infer/configs/weights/multi_yolov5m.yaml
View file @
2dcb1204
...
...
@@ -28,8 +28,8 @@ units:
inputNames
:
[
resizeNormImages
]
outputNames
:
[
detections
,
seg_protos
,
depths
,
semantics
]
runMode
:
1
# 0-fp32 1-fp16 2-int8 (int8 not supported)
weightsPath
:
"
configs/weights/ips_2
41107m_stone_bes
t.onnx"
# "configs/weights/isp_x0228m_last.onnx"
engineFile
:
"
configs/weights/ips_2
41107m_stone_bes
t_fp16.engine"
# "configs/weights/isp_x0228m_last_fp16.engine"
weightsPath
:
"
configs/weights/ips_2
504m_xisan_f
t.onnx"
# "configs/weights/isp_x0228m_last.onnx"
engineFile
:
"
configs/weights/ips_2
504m_xisan_f
t_fp16.engine"
# "configs/weights/isp_x0228m_last_fp16.engine"
inferDynamic
:
false
inferBatchSize
:
1
inputWidth
:
960
...
...
src/camera_bev_infer/src/sensor_manager.cpp
View file @
2dcb1204
...
...
@@ -5,7 +5,7 @@
* @Date: 2023-09-03 02:18:07
* @email: xin.wang@waytous.com
* @LastEditors: yangxue xue.yang@waytous.com
* @LastEditTime: 2025-04-1
7 03:47:34
* @LastEditTime: 2025-04-1
8 01:48:25
*/
...
...
@@ -286,6 +286,7 @@ void sensorManager::publishDetection()
// int8 label_type = 9
ob
.
label_type
=
(
name2type
.
find
(
obj
.
names
)
==
name2type
.
end
()
?
Perception_Default_Classification
:
name2type
[
obj
.
names
]);
obTrack
.
track_type
=
(
name2type
.
find
(
obj
.
names
)
==
name2type
.
end
()
?
Perception_Default_Classification
:
name2type
[
obj
.
names
]);
obTrack
.
bounding_box
.
label
=
obTrack
.
track_type
;
//float32[] type_probs = 10
// std::vector<float> probs(waytous_perception_msgs::Object::TYPE_UNKNOWN_STATIC + 1, 0); // main-type length
...
...
src/camera_bev_infer/src/vision_transform/vision_3d.cpp
View file @
2dcb1204
...
...
@@ -5,7 +5,7 @@
* @Date: 2023-09-03 03:13:41
* @email: xin.wang@waytous.com
* @LastEditors: yangxue xue.yang@waytous.com
* @LastEditTime: 2025-04-
10 09:24:17
* @LastEditTime: 2025-04-
21 08:11:54
*/
...
...
@@ -922,6 +922,9 @@ int Visione_3D::Process_Instance_Objects(object_Seg_info& obj, const cv::Mat& in
int
objY1
=
objBin
.
rows
,
objY2
=
0
;
int
objX1
=
objBin
.
cols
,
objX2
=
0
;
int
nearest_px
=
100
;
int
nearest_py
=
100
;
//目标 mask
// clock_t start_ = clock();
int
mask_count
=
0
,
project_count
=
0
;
...
...
@@ -944,7 +947,8 @@ int Visione_3D::Process_Instance_Objects(object_Seg_info& obj, const cv::Mat& in
project_count
++
;
auto
&
p3d
=
pcl_cloud
->
points
[
index
];
ix
=
int
(
p3d
.
y
/
BEV_GRID_RESOLUTION
+
BEV_GridMap
::
m_nCenterX
);
// BEV Frame: left-bottom as origin, ix: right, iy: forward
ix
=
int
(
p3d
.
y
/
BEV_GRID_RESOLUTION
+
BEV_GridMap
::
m_nCenterX
);
// lidar frame -> BEV frame
iy
=
int
(
p3d
.
x
/
BEV_GRID_RESOLUTION
+
BEV_GridMap
::
m_nCenterY
);
if
(
ix
>=
BEV_IAGE_WIDTH
||
ix
<
0
||
iy
>=
BEV_IAGE_HEIGHT
||
iy
<
0
)
...
...
@@ -954,11 +958,18 @@ int Visione_3D::Process_Instance_Objects(object_Seg_info& obj, const cv::Mat& in
if
(
ix
!=
0
&&
iy
!=
0
)
{
// 当前目标所有点云的bev范围
objY1
=
MIN
(
iy
,
objY1
);
objY2
=
MAX
(
iy
,
objY2
);
objX1
=
MIN
(
ix
,
objX1
);
objX2
=
MAX
(
ix
,
objX2
);
// 找最近点
if
(
nearest_py
>
iy
)
{
nearest_py
=
iy
;
nearest_px
=
ix
;
}
objBin
.
at
<
uchar
>
(
iy
,
ix
)
=
255
;
objBinCount
.
at
<
uchar
>
(
iy
,
ix
)
=
MIN
(
255
,
objBinCount
.
at
<
uchar
>
(
iy
,
ix
)
+
1
);
cv
::
Point3d
p3d_
(
ix
,
iy
,
p3d
.
z
);
...
...
@@ -989,7 +1000,14 @@ int Visione_3D::Process_Instance_Objects(object_Seg_info& obj, const cv::Mat& in
InstanceBevObject
insobj
;
if
(
nValidNum
>=
3
&&
objRc
.
width
>
0
&&
objRc
.
height
>
0
)
{
// 根据目标bev点云,计算其bev边界框
insobj
.
rrc
=
getObjectAreaRect
(
objBin
,
objBinCount
,
objRc
,
insobj
.
vPoints
,
color
,
obj
.
name
);
if
(
obj
.
name
==
"pedestrian"
)
{
std
::
cout
<<
"update pedestrian position: "
<<
nearest_py
<<
" --> "
<<
insobj
.
rrc
.
center
.
y
<<
std
::
endl
;
insobj
.
rrc
.
center
.
x
=
nearest_px
;
insobj
.
rrc
.
center
.
y
=
nearest_py
;
}
if
(
insobj
.
rrc
.
size
.
height
>
0
&&
insobj
.
rrc
.
size
.
width
>
0
)
{
pointEnough
=
true
;
...
...
@@ -1174,8 +1192,5 @@ int Visione_3D::Process_objects(const cv::Mat& image, const cv::Mat& depth, Clou
}
}
return
0
;
};
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