Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
7d0e49ea
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,发现更多精彩内容 >>
提交
7d0e49ea
编写于
7月 15, 2017
作者:
H
henryhu6
提交者:
Capri2014
7月 15, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Limit aggressive steering based on vehicle speed (#206)
上级
a13012bf
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
21 addition
and
2 deletion
+21
-2
modules/control/conf/lincoln.pb.txt
modules/control/conf/lincoln.pb.txt
+1
-0
modules/control/controller/lat_controller.cc
modules/control/controller/lat_controller.cc
+15
-2
modules/control/controller/lat_controller.h
modules/control/controller/lat_controller.h
+3
-0
modules/control/proto/control_cmd.proto
modules/control/proto/control_cmd.proto
+1
-0
modules/control/proto/lat_controller_conf.proto
modules/control/proto/lat_controller_conf.proto
+1
-0
未找到文件。
modules/control/conf/lincoln.pb.txt
浏览文件 @
7d0e49ea
...
...
@@ -30,6 +30,7 @@ lat_controller_conf {
steer_transmission_ratio: 16
steer_single_direction_max_degree: 470
max_iteration: 150
max_lateral_acceleration: 5.0
}
lon_controller_conf {
ts: 0.01
...
...
modules/control/controller/lat_controller.cc
浏览文件 @
7d0e49ea
...
...
@@ -98,6 +98,8 @@ bool LatController::LoadControlConf(const ControlConf* control_conf) {
control_conf
->
lat_controller_conf
().
steer_transmission_ratio
();
steer_single_direction_max_degree_
=
control_conf
->
lat_controller_conf
().
steer_single_direction_max_degree
();
max_lat_acc_
=
control_conf
->
lat_controller_conf
().
max_lateral_acceleration
();
double
mass_fl
=
control_conf
->
lat_controller_conf
().
mass_fl
();
double
mass_fr
=
control_conf
->
lat_controller_conf
().
mass_fr
();
double
mass_rl
=
control_conf
->
lat_controller_conf
().
mass_rl
();
...
...
@@ -265,11 +267,21 @@ Status LatController::ComputeControlCommand(
double
steer_angle_feedforward
=
ComputeFeedForward
(
debug
->
curvature
());
double
steer_angle
=
steer_angle_feedback
+
steer_angle_feedforward
;
// Clamp the steer angle to -100.0 to 100.0
steer_angle
=
apollo
::
common
::
math
::
Clamp
(
steer_angle
,
-
100.0
,
100.0
);
steer_angle
=
digital_filter_
.
Filter
(
steer_angle
);
cmd
->
set_steering_target
(
steer_angle
);
double
steer_limit
=
std
::
atan
(
max_lat_acc_
*
wheelbase_
/
(
vehicle_state_
.
linear_velocity
()
*
vehicle_state_
.
linear_velocity
()))
*
steer_transmission_ratio_
*
180
/
M_PI
/
steer_single_direction_max_degree_
;
// Clamp the steer angle
double
steer_angle_limited
=
apollo
::
common
::
math
::
Clamp
(
steer_angle
,
-
steer_limit
,
steer_limit
);
steer_angle_limited
=
digital_filter_
.
Filter
(
steer_angle_limited
);
cmd
->
set_steering_target
(
steer_angle_limited
);
cmd
->
set_steering_rate
(
FLAGS_steer_angle_rate
);
// compute extra information for logging and debugging
...
...
@@ -303,6 +315,7 @@ Status LatController::ComputeControlCommand(
debug
->
set_steer_angle_feedback
(
steer_angle_feedback
);
debug
->
set_steering_position
(
chassis
->
steering_percentage
());
debug
->
set_ref_speed
(
vehicle_state_
.
linear_velocity
());
debug
->
set_steer_angle_limited
(
steer_angle_limited
);
ProcessLogs
(
debug
,
chassis
);
return
Status
::
OK
();
}
...
...
modules/control/controller/lat_controller.h
浏览文件 @
7d0e49ea
...
...
@@ -150,6 +150,9 @@ class LatController : public Controller {
// the maximum turn of steer
double
steer_single_direction_max_degree_
=
0.0
;
// limit steering to maximum theoretical lateral acceleration
double
max_lat_acc_
=
0.0
;
// number of control cycles look ahead (preview controller)
int
preview_window_
=
0
;
// number of states without previews, includes
...
...
modules/control/proto/control_cmd.proto
浏览文件 @
7d0e49ea
...
...
@@ -100,6 +100,7 @@ message SimpleLateralDebug {
optional
double
steer_angle_feedback
=
14
;
optional
double
steering_position
=
15
;
optional
double
ref_speed
=
16
;
optional
double
steer_angle_limited
=
17
;
}
message
InputDebug
{
...
...
modules/control/proto/lat_controller_conf.proto
浏览文件 @
7d0e49ea
...
...
@@ -22,4 +22,5 @@ message LatControllerConf {
optional
int32
steer_transmission_ratio
=
14
;
optional
int32
steer_single_direction_max_degree
=
15
;
// in degree
optional
int32
max_iteration
=
16
;
// maximum iteration for lqr solve
optional
double
max_lateral_acceleration
=
17
;
// limit aggressive steering
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录