Skip to content

Commit

Permalink
doc: add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yangmingustb committed Dec 28, 2023
1 parent d29ed6d commit cc907da
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 338 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@
* 编译规则使用cmake;
* 程序运行不再依赖docker,而是可以直接在ubuntu 18/20运行;
* 适配c++17;
* 增加快速碰撞检测系统,gjk/epa/bvh,由张玉博士、我在2019-2020年开发,可以参考(https://arxiv.org/abs/2011.09117);
* 增加快速碰撞检测系统,gjk/epa/bvh,由张玉博士、我在2019-2020年开发,可以参考(https://arxiv.org/abs/2011.09117),可以将系统耗时2秒降低为20毫秒;
* 增加2d的交互界面,用来实时调试系统状态;
* 增加仿真底盘,用来测试决策规划控制;
* 增加path decision调试工具;
* 增加speed decision调试工具;
* 增加record解析脚本;
* 增加log文件解析脚本;
* 通过cyber rt c++/python版本,实时订阅cyber 消息,并且完成解析,可以实时分析问题或者单步调试问题;
* hmi可以自主添加障碍物,并且可以控制障碍物的运动状态;
* hmi可以自主控制红绿灯,并且可以发布红绿灯;
* 增加路由点的配置文件,自动化读取;
* 跟车不使用单一的跟车距离,引入了st point of interest,来生成可变的可行驶区域;
* 限速优化,限速构成的边界考虑到车辆速度,不然速度优化经常无解;
* 修复routing lane change的bug;



# 软件依赖
基本库:
Expand Down
117 changes: 0 additions & 117 deletions modules/planning/tasks/deciders/speed_decider/speed_decider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,118 +91,6 @@ common::Status SpeedDecider::Execute(Frame* frame,

record_constraints(reference_line_info);

// 识别是否在car follow scenario

bool has_follow_decision = false;
bool is_only_following_decision = true;
double following_min_s = 200.0;
std::string following_obs_id;

double stopping_min_s = 200.0;
std::string stop_obs_id;

for (const auto* obstacle :
reference_line_info->path_decision()->obstacles().Items())
{
#if debug_speed_decider
AINFO << obstacle->DebugString();

#endif

if (obstacle->IsVirtual())
{
continue;
}

if (obstacle->LongitudinalDecision().has_stop())
{
is_only_following_decision = false;

if (obstacle->path_st_boundary().min_s() < stopping_min_s)
{
stopping_min_s = obstacle->path_st_boundary().min_s();
stop_obs_id = obstacle->Id();
}
}

if (obstacle->LongitudinalDecision().has_overtake() ||
obstacle->LongitudinalDecision().has_yield())
{
is_only_following_decision = false;
}

if (obstacle->LongitudinalDecision().has_follow())
{
has_follow_decision = true;

if (obstacle->path_st_boundary().min_s() < following_min_s)
{
following_min_s = obstacle->path_st_boundary().min_s();
following_obs_id = obstacle->Id();
}
}
}

#if debug_speed_decider
AINFO << "is car follow scenario " << has_follow_decision;

#endif

SpeedDecision speed_decision;
speed_decision.Clear();

if (has_follow_decision && is_only_following_decision)
{
speed_decision.set_type(INTERACTION_SECENERIO_FOLLOW);

reference_line_info->set_close_following_obstacle(following_obs_id);

// update time headway

double time_headway;

double adc_speed = reference_line_info->get_veh_linear_velocity();
if (adc_speed < 0.1)
{
time_headway = 1000.0;
}
else
{
time_headway = following_min_s / adc_speed;
}

speed_decision.set_time_headway(time_headway);

Obstacle* close_following_obs =
reference_line_info->get_mutable_close_following_obstacle();

if (close_following_obs != nullptr)
{

close_following_obs->set_time_of_headway(time_headway);

double ttc = 1000.0;

if (close_following_obs->speed() < adc_speed && adc_speed > 0.1)
{
ttc = following_min_s /
(adc_speed - close_following_obs->speed());
}

close_following_obs->set_time_to_collision(ttc);
speed_decision.set_ttc(ttc);
}

reference_line_info->set_speed_decision(speed_decision);

AINFO << "print_adc_time_headway:"
<< "(" << time_headway << ","
<< ")";
}
else
{
reference_line_info->clear_following_obstacle();
}

return Status::OK();
}
Expand Down Expand Up @@ -635,9 +523,6 @@ Status SpeedDecider::MakeObjectDecision(const SpeedData& speed_profile,
<< ", obs id: " << obstacle->Id()
<< ", st curve is below";

// will be retired if bev perception fix reverse obs
continue;

ObjectDecisionType stop_decision;

if (create_stop_decision_for_reverse_obs(*mutable_obstacle,
Expand Down Expand Up @@ -710,8 +595,6 @@ Status SpeedDecider::MakeObjectDecision(const SpeedData& speed_profile,
<< ", obs id: " << obstacle->Id()
<< ", st curve is cross";

// will be retired if bev perception fix reverse obs
continue;

ObjectDecisionType stop_decision;

Expand Down
Loading

0 comments on commit cc907da

Please sign in to comment.