提交 5583a122 编写于 作者: J Jiangtao Hu 提交者: Dong Li

script: record meta info into all bags. (#1943)

* script: record meta info into all bags.

* planning: add a gflag to protect nudge slowdown behavior.
上级 10ed74a8
......@@ -173,6 +173,9 @@ DEFINE_double(static_obstacle_speed_threshold, 0.5,
"obstacles are considered as static obstacle if its speed is "
"less than this value (m/s)");
DEFINE_bool(enable_nudge_decision, true, "enable nudge decision");
DEFINE_bool(enable_nudge_slowdown, true,
"True to slow down when nudge obstacles.");
DEFINE_double(static_decision_nudge_l_buffer, 0.3, "l buffer for nudge");
DEFINE_double(longitudinal_ignore_buffer, 10.0,
"If an obstacle's longitudinal distance is further away "
......
......@@ -99,6 +99,7 @@ DECLARE_double(st_max_t);
// Decision Part
DECLARE_double(static_obstacle_speed_threshold);
DECLARE_bool(enable_nudge_decision);
DECLARE_bool(enable_nudge_slowdown);
DECLARE_double(static_decision_nudge_l_buffer);
DECLARE_double(longitudinal_ignore_buffer);
DECLARE_double(lateral_ignore_buffer);
......
......@@ -526,11 +526,19 @@ Status StBoundaryMapper::GetSpeedLimits(
}
}
const double curr_speed_limit = std::fmax(
double curr_speed_limit = 0.0;
if (FLAGS_enable_nudge_slowdown) {
curr_speed_limit = std::fmax(
st_boundary_config_.lowest_speed(),
common::util::MinElement(std::vector<double>{
centripetal_acceleration_limit, speed_limit_on_reference_line,
nudge_obstacle_speed_limit}));
} else {
curr_speed_limit = std::fmax(
st_boundary_config_.lowest_speed(),
common::util::MinElement(std::vector<double>{
centripetal_acceleration_limit, speed_limit_on_reference_line}));
}
speed_limit_data->AppendSpeedLimit(path_s, curr_speed_limit);
}
......
......@@ -51,12 +51,12 @@ function start() {
# record some meta info into bag
if [ -e /apollo/meta.ini ]; then
META_STR=`cat /apollo/meta.ini | sed 's/\[//g' | sed 's/\]//g' | sed 's/:/ /g' | tr '\n' ' '`
rostopic pub -1 -l /apollo/meta std_msgs/String "$META_STR" &
META_STR=`cat /apollo/meta.ini | tr '[]:\n' ' '`
nohup rostopic pub -l /apollo/meta std_msgs/String "$META_STR" < /dev/null &
else
META_STR=`git rev-parse HEAD`
META_STR="git commit $META_STR"
rostopic pub -1 -l /apollo/meta std_msgs/String "$META_STR" &
nohup rostopic pub -l /apollo/meta std_msgs/String "$META_STR" < /dev/null &
fi
# Start recording.
......@@ -98,6 +98,7 @@ function start() {
function stop() {
pkill -SIGINT -f record
pkill -SIGINT -f "rostopic pub"
}
function help() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册