admin 管理员组

文章数量: 1184232

dwa

官方文档:
如何使用dwa_planner: /
ROS局部规划模块分析:

出现如下报错

[ WARN] [1465964041.914251209]: Control loop missed its desired rate of 3.0000Hz... the loop actually took 0.4875 seconds
[ERROR] [1465964059.033444014]: Aborting because a valid plan could not be found. Even after executing all recovery behaviors

TODO

teb_local_planer

teb_local_planner_params.yaml

TebLocalPlannerROS:odom_topic: odommap_frame: /odom# Trajectoryteb_autosize: Truedt_ref: 0.3dt_hysteresis: 0.1global_plan_overwrite_orientation: Truemax_global_plan_lookahead_dist: 3.0feasibility_check_no_poses: 5# Robotmax_vel_x: 0.2max_vel_x_backwards: 0.1max_vel_theta: 0.3acc_lim_x: 0.2acc_lim_theta: 0.2min_turning_radius: 0.0footprint_model: # types: "point", "circular", "two_circles", "line", "polygon"radius: 0.222 # for type "circular"# GoalTolerancexy_goal_tolerance: 0.2yaw_goal_tolerance: 0.1free_goal_vel: False# Obstaclesmin_obstacle_dist: 0.3include_costmap_obstacles: Truecostmap_obstacles_behind_robot_dist: 1.0obstacle_poses_affected: 15costmap_converter_plugin: ""costmap_converter_spin_thread: Truecostmap_converter_rate: 5# Optimizationno_inner_iterations: 5no_outer_iterations: 4optimization_activate: Trueoptimization_verbose: Falsepenalty_epsilon: 0.1weight_max_vel_x: 2weight_max_vel_theta: 1weight_acc_lim_x: 1weight_acc_lim_theta: 1weight_kinematics_nh: 1000weight_kinematics_forward_drive: 1weight_kinematics_turning_radius: 1weight_optimaltime: 1weight_obstacle: 300weight_dynamic_obstacle: 10 # not in use yetalternative_time_cost: False # not in use yet# Homotopy Class Plannerenable_homotopy_class_planning: Falseenable_multithreading: Truesimple_exploration: Falsemax_number_classes: 4roadmap_graph_no_samples: 15roadmap_graph_area_width: 5h_signature_prescaler: 0.5h_signature_threshold: 0.1obstacle_keypoint_offset: 0.1obstacle_heading_threshold: 0.45visualize_hc_graph: False

teb_move_base.launch

<launch><node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true"><rosparam file="$(find dashgo_nav)/config/dashgo/costmap_common_params.yaml" command="load" ns="global_costmap" /><rosparam file="$(find dashgo_nav)/config/dashgo/costmap_common_params.yaml" command="load" ns="local_costmap" /><rosparam file="$(find dashgo_nav)/config/dashgo/local_costmap_params.yaml" command="load" /><rosparam file="$(find dashgo_nav)/config/dashgo/global_costmap_params.yaml" command="load" /><rosparam file="$(find dashgo_nav)/config/dashgo/teb_local_planner_params.yaml" command="load" /><rosparam file="$(find dashgo_nav)/config/nav_obstacles_params.yaml" command="load" /><param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" /></node></launch>

teb_move_base_blank_map.launch

<launch><node name="arduino" pkg="dashgo_bringup" type="dashgo_driver.py" output="screen"><rosparam file="$(find dashgo_bringup)/config/my_dashgo_params.yaml" command="load" /></node><node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen"><param name="serial_port"         type="string" value="/dev/ttyUSB0"/>  <param name="serial_baudrate"     type="int"    value="115200"/><param name="frame_id"            type="string" value="laser_frame"/><param name="inverted"            type="bool"   value="false"/><param name="angle_compensate"    type="bool"   value="true"/></node><include file="$(find dashgo_description)/launch/dashgo_description.launch"/><node pkg="tf" type="static_transform_publisher" name="base_link_to_laser4" args="0.0 0.0 0.0 0.0 3.1415926 0.0 /base_link /laser_frame 40" /><!-- Launch move_base and load all navigation parameters --><include file="$(find dashgo_nav)/launch/teb_move_base.launch" /><!-- Run the map server with a blank map --><node name="map_server" pkg="map_server" type="map_server" args="$(find dashgo_nav)/maps/blank_map.yaml" /><!-- Run a static transform between /odom and /map --><node pkg="tf" type="static_transform_publisher" name="odom_map_broadcaster" args="0 0 0 0 0 0 /map /odom 100" /></launch>

teb_amcl_demo.launch

<launch><node name="arduino" pkg="dashgo_bringup" type="dashgo_driver.py" output="screen"><rosparam file="$(find dashgo_bringup)/config/my_dashgo_params.yaml" command="load" /></node><node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen"><param name="serial_port"         type="string" value="/dev/ttyUSB0"/>  <param name="serial_baudrate"     type="int"    value="115200"/><param name="frame_id"            type="string" value="laser_frame"/><param name="inverted"            type="bool"   value="false"/><param name="angle_compensate"    type="bool"   value="true"/></node><include file="$(find dashgo_description)/launch/dashgo_description.launch"/><node pkg="tf" type="static_transform_publisher" name="base_link_to_laser4" args="0.0 0.0 0.0 0.0 3.1415926 0.0 /base_link /laser_frame 40" /><!-- Map server --><arg name="map_file" default="$(find dashgo_nav)/maps/amcl_test.yaml"/><node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" /><arg name="initial_pose_x" default="0.0"/> <!-- Use 17.0 for willow's map in simulation --><arg name="initial_pose_y" default="0.0"/> <!-- Use 17.0 for willow's map in simulation --><arg name="initial_pose_a" default="0.0"/><include file="$(find dashgo_nav)/launch/amcl.launch.xml"><arg name="initial_pose_x" value="$(arg initial_pose_x)"/><arg name="initial_pose_y" value="$(arg initial_pose_y)"/><arg name="initial_pose_a" value="$(arg initial_pose_a)"/></include>
<include file="$(find dashgo_nav)/launch/teb_move_base.launch"/></launch>

运行

roslaunch dashgo_nav  teb_move_base_blank_map.launch
rviz

teb_local_planer支持自定义虚拟的障碍物

   /*** @brief Callback for custom obstacles that are not obtained from the costmap * @param obst_msg pointer to the message containing a list of polygon shaped obstacles*/void customObstacleCB(const teb_local_planner::ObstacleMsg::ConstPtr& obst_msg);

本文标签: dwa