admin管理员组

文章数量:1123200

I created simplified footprints combining a robot and the some tow attachment with given dimensions. I dont need any sensors as I just want to test the planners with created footprint using move_base in ROS noetic in Navigation stack. Think, I dont need any node but correct me if wrong. So I created, firstly navigation launch file. Here its

<?xml version="1.0" ?>
<launch>
  <!-- Map Server -->
  <node pkg="map_server" type="map_server" name="map_server" args="$(find robot_navigation)/maps/map.yaml"/>

  <!-- Static Transforms -->
  <node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0 0 0 0 0 0 map odom 0.1" />
  <node pkg="tf" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 odom base_link 0.1" />
  <node pkg="tf" type="static_transform_publisher" name="base_link_to_towing_attachment" args="0 -0.35 0 0 0 0 base_link towing_attachment 0.1" />


  <!-- Robot State Publisher -->
  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" value="10.0" />
    <param name="robot_description" command="$(find xacro)/xacro $(find robot_navigation)/urdf/robot.urdf.xacro" />
  </node>

  <!-- Joint State Publisher (Optional for Visualization) -->
  <node pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" name="joint_state_publisher_gui" />

  <!-- Move Base Node -->
  <node pkg="move_base" type="move_base" name="move_base" output="screen">
    <!-- Load costmap and planner parameters -->
    <rosparam file="$(find robot_navigation)/config/costmap_common_params.yaml" />
    <rosparam file="$(find robot_navigation)/config/global_planner_params.yaml" />
    <rosparam file="$(find robot_navigation)/config/local_planner_params.yaml" />
    <rosparam file="$(find robot_navigation)/config/recovery_behaviors.yaml" />

    <param name="base_global_planner" value="navfn/NavfnROS" />
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
  </node>

  <!-- RViz for Visualization -->
  <node pkg="rviz" type="rviz" name="rviz" args="-d $(find robot_navigation)/config/rviz_navigation_config.rviz" required="true" />
</launch>

Then the parameters file are the followings Common_costmap_parametars.yaml

plugins:
  - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

footprint: [[-0.35, 0.35], [-0.35, -0.35], [0.35, -0.35], [0.35, 0.35], [0.6, 0.0]]
footprint_padding: 0.02

robot_radius: 0.2
obstacle_range: 2.5
raytrace_range: 3.0
inflation_radius: 0.55

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true
  rolling_window: false  # Static map mode
  width: 30.0  # Adjust based on your map size
  height: 30.0
  resolution: 0.05

local_costmap:
  global_frame: odom
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true  # Local window for dynamic updates
  width: 6.0  # Focus on the robot's immediate surroundings
  height: 6.0
  resolution: 0.05

global_planner_params.yaml

 NavfnROS:
      allow_unknown: true
      planner_patience: 5.0
      default_tolerance: 0.0
      use_dijkstra: true
      use_quadratic: true
      use_grid_path: false

local_planner_params.yaml:

DWAPlannerROS:
  max_vel_x: 0.5
  min_vel_x: 0.1
  max_vel_theta: 1.0
  min_vel_theta: -1.0
  acc_lim_x: 2.5
  acc_lim_theta: 2.5
  xy_goal_tolerance: 0.2
  yaw_goal_tolerance: 0.1 # Increased for smoother stops
  sim_time: 1.5           # Increase simulation time for trajectory prediction
  vx_samples: 20          # More velocity samples for smoother path
  vtheta_samples: 40
  path_distance_bias: 32.0
  goal_distance_bias: 24.0
  occdist_scale: 0.01
  forward_point_distance: 0.2
  stop_time_buffer: 0.2

and recovery_behaviors.yaml:

recovery_behaviors:
  - {name: "clear_costmap_recovery", type: "clear_costmap_recovery/ClearCostmapRecovery"}
  - {name: "rotate_recovery", type: "rotate_recovery/RotateRecovery"}

TrajectoryPlannerROS:
  max_vel_x: 0.5
  acc_lim_x: 2.5
  recovery_behavior_enabled: true
  clear_costmap_on_fail: true
  rotate_recovery_enabled: true

But when launch the navigation file I got this warnings and errors

[ WARN] [1732561758.050841599]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.3805 seconds [ WARN] [1732561758.051388479]: Map update loop missed its desired rate of
5.0000Hz... the loop actually took 0.2305 seconds [ WARN] [1732561758.426344393]: Control loop missed its desired rate of
20.0000Hz... the loop actually took 0.3755 seconds [ WARN] [1732561758.426647247]: Map update loop missed its desired rate of
5.0000Hz... the loop actually took 0.4060 seconds [ERROR] [1732561758.427151469]: Extrapolation Error: Lookup would require extrapolation 0.000719340s into the future.  Requested time
1732561758.426456451 but the latest data is at time 1732561758.425737143, when looking up transform from frame [odom] to frame [map]

[ERROR] [1732561758.427307796]: Global Frame: odom Plan Frame size 588: map

[ WARN] [1732561758.427438369]: Could not transform the global plan to the frame of the controller [ERROR] [1732561758.427601409]: Could not get local plan [ INFO] [1732561758.476507989]: Got new plan [ERROR] [1732561758.477180604]: Extrapolation Error: Lookup would require extrapolation 0.000355752s into the future.  Requested time
1732561758.476354599 but the latest data is at time 1732561758.475998878, when looking up transform from frame [odom] to frame [map]

[ERROR] [1732561758.477320969]: Global Frame: odom Plan Frame size 588: map

In Rviz when send the Nav goal the robot is not moving. Any help?

本文标签: