DLu / navigation_layers

154 stars 136 forks source link

move base crushed when load social_navigation_layers plugin #81

Closed xinkai-jiang closed 3 years ago

xinkai-jiang commented 3 years ago

Hi,

I tried to used social_navigation_layers in move_base, but I find when I run move_base with social navigation plugin, the move_base always crush and don't know how. The error is following:

[ INFO] [1623608573.537931461, 1623586730.042040061]: odom received!
Warning: Invalid argument "/map" passed to canTransform argument source_frame in tf2 frame_ids cannot start with a '/' like: 
         at line 134 in /tmp/binarydeb/ros-melodic-tf2-0.6.5/src/buffer_core.cpp
terminate called after throwing an instance of 'tf2::InvalidArgumentException'
  what():  Invalid argument "/map" passed to lookupTransform argument source_frame in tf2 frame_ids cannot start with a '/' like: 
[move_base-1] process has died [pid 3338, exit code -6, cmd /home/jxk/nav_ws/devel/lib/move_base/move_base __name:=move_base __log:=/home/jxk/.ros/log/2ad50b08-cc65-11eb-9bf0-0800279946ab/move_base-1.log].
log file: /home/jxk/.ros/log/2ad50b08-cc65-11eb-9bf0-0800279946ab/move_base-1*.log

And there is my config file:

global_costmap_params.yaml

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 5.0
  static_map: true

  plugins:
    - {name: static_layer,            type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,          type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}
    - {name: social_layer,            type: "social_navigation_layers::PassingLayer"}

local_costmap_params.yaml

local_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05

  plugins:
   - {name: static_layer,        type: "costmap_2d::StaticLayer"}
   - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}
   - {name: social_layer,            type: "social_navigation_layers::PassingLayer"}

When I comment the plugin config in local costmap param and global costmap param. Move base will return to normal. Could you tell me how it happen. Thank you.

xinkai-jiang commented 3 years ago

Hi, I restarted the computer and everything went well hhhhh, I guess it might be something that plugin needs restart to load configuration.