One way to implement a transition function is by generating rough trajectories for each accessible "next state" and then finding the best. To "find the best" we generally use cost functions. We can then figure out how costly each rough trajectory is and then select the state with the lowest cost trajectory.

We'll discuss this in more detail later, but first read carefully through the pseudocode below to get a better sense for how a transition function might work.

def transition_function(predictions, current_fsm_state, current_pose, cost_functions, weights):
# only consider states which can be reached from current FSM state.
possible_successor_states = successor_states(current_fsm_state) # keep track of the total cost of each state.
costs = []
for state in possible_successor_states:
# generate a rough idea of what trajectory we would
# follow IF we chose this state.
trajectory_for_state = generate_trajectory(state, current_pose, predictions) # calculate the "cost" associated with that trajectory.
cost_for_state =
for i in range(len(cost_functions)) :
# apply each cost function to the generated trajectory
cost_function = cost_functions[i]
cost_for_cost_function = cost_function(trajectory_for_state, predictions) # multiply the cost by the associated weight
weight = weights[i]
cost_for_state += weight * cost_for_cost_function
costs.append({'state' : state, 'cost' : cost_for_state}) # Find the minimum cost state.
best_next_state = None
min_cost =
for i in range(len(possible_successor_states)):
state = possible_successor_states[i]
cost = costs[i]
if cost < min_cost:
min_cost = cost
best_next_state = state return best_next_state

Obviously we are glossing over some important details here. Namely: what are these cost functions and how do we create them? We'll talk about that next!

behavior planning——10 behaior planning pseudocode的更多相关文章

  1. Behavior Trees for Path Planning (Autonomous Driving)

    Behavior Trees for Path Planning (Autonomous Driving) 2019-11-13 08:16:52 Path planning in self-driv ...

  2. HOW TO RUN A SPRINT PLANNING MEETING (THE WAY I LIKE IT)

    This is a sample agenda for a sprint planning meeting. Depending on your context you will have to ch ...

  3. 运动规划 (Motion Planning): MoveIt! 与 OMPL

    原创博文:转载请标明出处:http://www.cnblogs.com/zxouxuewei 最近有不少人询问有关MoveIt!与OMPL相关的话题,但是大部分问题都集中于XXX功能怎么实现,XXX错 ...

  4. Urban Planning and Public Health - Reflection on Professor Webster's article in Urban Planning Forum

    1. General review. Professor Webster published this article in Urban Planning Forum, one of the top ...

  5. planning深度剖析

    planning深度剖析 结合find命令过滤目录及文件名后缀: find /home/hadoop/nisj/automationDemand/ -type f -name '*.py'|xargs ...

  6. 运动规划 (Motion Planning): MoveIt! 与 OMPL---44

    原创博文:转载请标明出处:http://www.cnblogs.com/zxouxuewei 最近有不少人询问有关MoveIt!与OMPL相关的话题,但是大部分问题都集中于XXX功能怎么实现,XXX错 ...

  7. Oracle Hyperion Planning 11.1 .1:创建与管理应用程序 第1课:Planning概述

    第1课:Planning概述 1.说明 Oracle Enterprise Performance Management system Oracle Enterprise Performance Ma ...

  8. 2017.10.31 Enginer+position+statement

    一.The basic information Post name Engineering manager Department Engineering Post member A24645 imme ...

  9. 《Note --- Unreal 4 --- behavior tree》

    Web: https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/index.html Test project: D:\En ...

随机推荐

  1. SELECT (@i :=@i + 1)生成序列号

    转载自https://blog.csdn.net/qq_27922171/article/details/86477544 同类别自动生成序列号:https://bbs.csdn.net/topics ...

  2. WebSocket前后端实现

    websocket.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" ...

  3. 数据库设计 ch.7

    数据库建设的基本规律 三分技术 七分管理 十二分基础数据 阶段 需求分析阶段 概念设计阶段 逻辑设计阶段 物理设计阶段 数据库实施阶段 数据库维护阶段 1 需求分析 2 概念设计 形成概念模型 3 逻 ...

  4. Win7系统中wmiprvse.exe占用CPU高如何解决

    该进程的详细路径是在:C:\WINDOWS\System32\Wbem  我们可以在任务管理器中“wmiprvse.exe”进程上单击右键,选择“打开文件位置”即可看到,如果该文件不在该文件夹中,那么 ...

  5. LintCode_173 链表插入排序

    题目 用插入排序对链表排序 样例 Given 1->3->2->0->null, return 0->1->2->3->null C++代码 ListN ...

  6. python之高阶函数--map()和reduce()

    以下为学习笔记:来自廖雪峰的官方网站 1.高阶函数:简单来说是一个函数里面嵌入另一个函数 2.python内建的了map()和reduce()函数 map()函数接收两参数,一个是函数,一个是Iter ...

  7. 2019-8-31-C#-对-byte-数组进行模式搜索

    title author date CreateTime categories C# 对 byte 数组进行模式搜索 lindexi 2019-08-31 16:55:58 +0800 2018-07 ...

  8. Amazon Redshift数据迁移到MaxCompute

    Amazon Redshift数据迁移到MaxCompute Amazon Redshift 中的数据迁移到MaxCompute中经常需要先卸载到S3中,再到阿里云对象存储OSS中,大数据计算服务Ma ...

  9. linux类库之log4j-LogBack-slf4j-commons-logging

    log4j http://commons.apache.org/proper/commons-logging/ http://logging.apache.org/log4j/2.x/ The Com ...

  10. java视频长度读取 方案参照文件

    ffmpeg库 必须http://ffmpeg.org/download.html#build-windows 第三方jar sauronsoftwarehttp://www.sauronsoftwa ...