融合动态障碍物

简介:考虑怎样把其他节点发布的动态障碍物考虑进来

1.本部分演示了动态障碍物该如何被包含到teb_local_planner中。

2.写一个简单的动态障碍物的发布器publish_dynamic_obstacles.py

#!/usr/bin/env python

    import rospy, math, tf
from costmap_converter.msg import ObstacleArrayMsg, ObstacleMsg
from geometry_msgs.msg import Point32, QuaternionStamped, Quaternion, TwistWithCovariance
from tf.transformations import quaternion_from_euler def publish_obstacle_msg():
pub = rospy.Publisher('/test_optim_node/obstacles', ObstacleArrayMsg, queue_size=)
rospy.init_node("test_obstacle_msg") y_0 = -3.0
vel_x = 0.0
vel_y = 0.3
range_y = 6.0 obstacle_msg = ObstacleArrayMsg()
obstacle_msg.header.stamp = rospy.Time.now()
obstacle_msg.header.frame_id = "odom" # CHANGE HERE: odom/map # Add point obstacle
obstacle_msg.obstacles.append(ObstacleMsg())
obstacle_msg.obstacles[].id =
obstacle_msg.obstacles[].polygon.points = [Point32()]
obstacle_msg.obstacles[].polygon.points[].x = -1.5
obstacle_msg.obstacles[].polygon.points[].y =
obstacle_msg.obstacles[].polygon.points[].z = yaw = math.atan2(vel_y, vel_x)
q = tf.transformations.quaternion_from_euler(,,yaw)
obstacle_msg.obstacles[].orientation = Quaternion(*q) obstacle_msg.obstacles[].velocities.twist.linear.x = vel_x
obstacle_msg.obstacles[].velocities.twist.linear.y = vel_y
obstacle_msg.obstacles[].velocities.twist.linear.z =
obstacle_msg.obstacles[].velocities.twist.angular.x =
obstacle_msg.obstacles[].velocities.twist.angular.y =
obstacle_msg.obstacles[].velocities.twist.angular.z = r = rospy.Rate() # 10hz
t = 0.0
while not rospy.is_shutdown(): # Vary y component of the point obstacle
if (vel_y >= ):
obstacle_msg.obstacles[].polygon.points[].y = y_0 + (vel_y*t)%range_y
else:
obstacle_msg.obstacles[].polygon.points[].y = y_0 + (vel_y*t)%range_y - range_y t = t + 0.1 pub.publish(obstacle_msg) r.sleep() if __name__ == '__main__':
try:
publish_obstacle_msg()
except rospy.ROSInterruptException:
pass

运行:

roslaunch teb_local_planner test_optim_node.launch
roslaunch mypublisher publish_dynamic_obstacles.py

3.设置规划器来考虑动态障碍物

启动rosrun rqt_reconfigure rqt_reconfigure;选中参数include_dynamic_obstacles,teb local planner使用一个常速度模型来预测障碍物将来的行为。现在的轨迹是根据时间和空间来避免障碍物而不是仅仅考当前障碍物的位置来避免。对于速度模型的估计精确性是很重要的,常速度假设是合理且满足的。

如果调节参数visualize_with_time_as_z_axis,可以可视化规划的和预测的速度的时间变化。设置该参数值为0.1。在rviz中的z轴被解释为时间轴,且可被扩展。也可以看到homotopy-class-planning把动态障碍物的预测考虑进去。

相关的参数

~<name>/min_obstacle_dist: Desired minimal distance from (static and dynamic) obstacles

~<name>/inflation_dist: Non-zero cost region around (static) obstacles

~<name>/include_dynamic_obstacles: Specify whether the motion of dynamic obstacles should be included (constant-velocity-model) or not.

~<name>/dynamic_obstacle_inflation_dist: Non-zero cost region around (dynamic) obstacles

~<name>/include_costmap_obstacles: Deactivate costmap obstacles completely

~<name>/costmap_obstacles_behind_robot_dist: Maximum distance behind the robot searched for occupied costmap cells.

~<name>/obstacle_poses_affected: Specify how many trajectory configurations/poses should be taken into account next to the closest one.

~<name>/weight_obstacle: Optimization weight for keeping a distance to static obstacles.

~<name>/weight_inflation: Optimization weight for inflation costs of static obstacles.

~<name>/weight_dynamic_obstacle: Optimization weight for keeping a distance to dynamic obstacles.

~<name>/weight_dynamic_obstacle_inflation: Optimization weight for inflation costs of dynamic obstacles.

~<name>/footprint_model: The robot footprint model 

teb教程8的更多相关文章

  1. teb教程1

    http://wiki.ros.org/teb_local_planner/Tutorials/Setup%20and%20test%20Optimization 简介:本部分关于teb怎样优化轨迹以 ...

  2. teb教程3

    配置和运行机器人导航 简介:配置teb_local_planner作为navigation中local planner的插件 参考teb安装 由于局部代价地图的大小和分辨率对优化性能影响很大,因为占据 ...

  3. teb教程10 teb questions

    http://wiki.ros.org/teb_local_planner/Tutorials/Frequently%20Asked%20Questions

  4. teb教程9

    通过costmap_converter来跟踪和包含动态障碍物 简介:利用costmap_converter来很容易跟踪动态障碍物 1.costmap_converter中提供了一个插件称之为costm ...

  5. teb教程7

    融合自定义的障碍物 简介:本部分讲解怎样考虑其他节点发布的多边形的障碍物. 1.在一些应用当中,可能不想依赖于代价地图或者想添加其他的除了点状的障碍物.你可以发送你自己的障碍物列表到teb_local ...

  6. teb教程6

    代价地图的转换 简介:本部分关于怎样把代价地图转换插件应用到转换占据栅格costmap2d到几何形状来优化(测试阶段) teb_local_planner包支持costmap_converter插件, ...

  7. teb教程5

    跟随全局规划器 简介:本部分是关于如何配置局部规划器严格跟随全局规划,也包括调节在时优和路径跟随上的权衡. 1.先看一下via-points当前的优化行为:启动下面节点 roslaunch teb_l ...

  8. teb教程4

    障碍物避障以及机器人足迹模型 简介:障碍物避障的实现,以及必要参数的设置对于机器人足迹模型和其对应的影响 1.障碍物避障是怎样工作的 1.1 惩罚项 障碍物避障作为整个路径优化的一部分.显然,优化是找 ...

  9. teb教程2

    http://wiki.ros.org/teb_local_planner/Tutorials/Inspect%20optimization%20feedback 检查优化反馈 简介:怎样检查优化的轨 ...

随机推荐

  1. DOM查询的其他方法

    document.body 保存的是body的引用 documen.documentElement 保存的是html根标签 document.all 代表页面中所有的元素 getElementsByC ...

  2. spring 事物(三)—— 声明式事务管理详解

    spring的事务处理分为两种: 1.编程式事务:在程序中控制事务开始,执行和提交:详情请点此跳转: 2.声明式事务:在Spring配置文件中对事务进行配置,无须在程序中写代码:(建议使用) 我对&q ...

  3. 转载:java面试题(一)

    1.面向对象的特征有哪些方面? 答:面向对象的特征主要有以下几个方面: - 抽象:抽象是将一类对象的共同特征总结出来构造类的过程,包括数据抽象和行为抽象两方面.抽象只关注对象有哪些属性和行为,并不关注 ...

  4. web storage 简单的网页留言版

    html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <ti ...

  5. spring boot 依赖配置

    虽然springboot号称是零配置 配置文件确实不需要,但是 依赖还是要有的 <parent>        <groupId>org.springframework.boo ...

  6. 洛谷P1122 最大子树和 (树状dp)

    题目描述 小明对数学饱有兴趣,并且是个勤奋好学的学生,总是在课后留在教室向老师请教一些问题.一天他早晨骑车去上课,路上见到一个老伯正在修剪花花草草,顿时想到了一个有关修剪花卉的问题.于是当日课后,小明 ...

  7. 获取FileSystem

    /** * 根据配置文件获取HDFS操作对象 * 有两种方法: * 1.使用conf直接从本地获取配置文件创建HDFS对象 * 2.多用于本地没有hadoop系统,但是可以远程访问.使用给定的URI和 ...

  8. 前端每日实战:58# 视频演示如何用纯 CSS 创作一只卡通鹦鹉

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/vrRmWy 可交互视频 此视频是可 ...

  9. JDK换版本问题解决

    在jdk安装第一个版本的时候,就默认在path配置值中加入C:\ProgramData\Oracle\Java\javapath; 所以我们需要把Path最前面的C:\ProgramData\Orac ...

  10. python的OS模块生成100个txt文件

    #!/user/bin/env/python35 # -*-coding:utf-8-*- # author:Keekuun """ 问题:生成一个文件夹,文件夹下面生成 ...