Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
ad3880a9
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ad3880a9
编写于
9月 25, 2018
作者:
fengqikai1414
提交者:
Liangliang Zhang
9月 25, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
camera: use cybertron sleep for
上级
c6b57163
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
8 addition
and
8 deletion
+8
-8
modules/drivers/usb_cam/conf/usb_cam_front_conf.pb.txt
modules/drivers/usb_cam/conf/usb_cam_front_conf.pb.txt
+1
-1
modules/drivers/usb_cam/conf/usb_cam_long_conf.pb.txt
modules/drivers/usb_cam/conf/usb_cam_long_conf.pb.txt
+1
-1
modules/drivers/usb_cam/conf/usb_cam_short_conf.pb.txt
modules/drivers/usb_cam/conf/usb_cam_short_conf.pb.txt
+1
-1
modules/drivers/usb_cam/proto/config.proto
modules/drivers/usb_cam/proto/config.proto
+1
-1
modules/drivers/usb_cam/usb_cam_component.cc
modules/drivers/usb_cam/usb_cam_component.cc
+3
-3
modules/drivers/usb_cam/usb_cam_component.h
modules/drivers/usb_cam/usb_cam_component.h
+1
-1
未找到文件。
modules/drivers/usb_cam/conf/usb_cam_front_conf.pb.txt
浏览文件 @
ad3880a9
...
...
@@ -22,6 +22,6 @@ bytes_per_pixel: 2
trigger_internal: 0
trigger_fps: 20
channel_name: "/apollo/sensor/camera/obstacle/front_6mm"
device_wait
: 2.
0
device_wait
_ms: 200
0
spin_rate: 0.005
output_type: RGB
modules/drivers/usb_cam/conf/usb_cam_long_conf.pb.txt
浏览文件 @
ad3880a9
...
...
@@ -22,6 +22,6 @@ bytes_per_pixel: 2
trigger_internal: 0
trigger_fps: 20
channel_name: "/apollo/sensor/camera/traffic/image_long"
device_wait
: 2.
0
device_wait
_ms: 200
0
spin_rate: 0.005
output_type: RGB
modules/drivers/usb_cam/conf/usb_cam_short_conf.pb.txt
浏览文件 @
ad3880a9
...
...
@@ -22,6 +22,6 @@ bytes_per_pixel: 2
trigger_internal: 0
trigger_fps: 20
channel_name: "/apollo/sensor/camera/traffic/image_short"
device_wait
: 2.
0
device_wait
_ms: 200
0
spin_rate: 0.005
output_type: RGB
modules/drivers/usb_cam/proto/config.proto
浏览文件 @
ad3880a9
...
...
@@ -43,7 +43,7 @@ message Config {
required
uint32
trigger_fps
=
22
[
default
=
30
];
optional
string
channel_name
=
23
[
default
=
""
];
// wait time when camera select timeout
optional
float
device_wait
=
24
[
default
=
2.
0
];
optional
uint32
device_wait_ms
=
24
[
default
=
200
0
];
// camera select spin time
optional
float
spin_rate
=
25
[
default
=
0.005
];
required
OutputType
output_type
=
26
;
...
...
modules/drivers/usb_cam/usb_cam_component.cc
浏览文件 @
ad3880a9
...
...
@@ -37,7 +37,7 @@ bool UsbCamComponent::Init() {
raw_image_
->
height
=
camera_config_
->
height
();
raw_image_
->
bytes_per_pixel
=
camera_config_
->
bytes_per_pixel
();
device_wait_
=
camera_config_
->
device_wait
();
device_wait_
=
camera_config_
->
device_wait
_ms
();
spin_rate_
=
camera_config_
->
spin_rate
();
if
(
camera_config_
->
output_type
()
==
YUYV
)
{
...
...
@@ -67,8 +67,8 @@ bool UsbCamComponent::Init() {
void
UsbCamComponent
::
run
()
{
while
(
!
cybertron
::
IsShutdown
())
{
if
(
!
camera_device_
->
wait_for_device
())
{
// sleep
2s
for next check
sleep
(
device_wait_
);
// sleep for next check
cybertron
::
SleepFor
(
std
::
chrono
::
milliseconds
(
device_wait_
)
);
continue
;
}
...
...
modules/drivers/usb_cam/usb_cam_component.h
浏览文件 @
ad3880a9
...
...
@@ -48,7 +48,7 @@ class UsbCamComponent : public Component<> {
CameraImagePtr
raw_image_
=
nullptr
;
std
::
shared_ptr
<
Image
>
pb_image_
=
nullptr
;
float
spin_rate_
=
0.005
;
float
device_wait_
=
2.
0
;
uint32_t
device_wait_
=
200
0
;
};
CYBERTRON_REGISTER_COMPONENT
(
UsbCamComponent
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录