0
$\begingroup$

Rosanswers logo

Hello. I am a ROS beginner. I am doing SLAM of turtlebot 3 (waffle) in the ubuntu 16.04, ros (kinetic) personal computer environment. I modified local_costmap_params.yaml to use the costmap _ 2 d plugin (Inflation Layer). After the change, it became as follows.

local_costmap: global_frame: /odom robot_base_frame: /base_footprint

update_frequency: 10.0 publish_frequency: 10.0 transform_tolerance: 0.5

static_map: false rolling_window: true width: 3 height: 3 resolution: 0.05 plugins: - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

However, after starting gazebo normally,

$ export TURTLEBOT3_MODEL=waffle $roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml

When you do this,

Warning: Invalid argument "/map" passed to canTransform argument target_frame in tf2 frame_ids cannot start with a '/' like: at line 134 in /tmp/binarydeb/ros-kinetic-tf2-0.5.18/src/buffer_core.cpp

The error will come out in succession. Could I ask the reason? I feel that I am doing some fundamental mistake. Thank you.!thisplugin


Originally posted by saito on ROS Answers with karma: 50 on 2018-10-15

Post score: 0


Original comments

Comment by pavel92 on 2018-10-29:
Do you have a costmap_common_params.yaml file? If yes please update your answers with it.

Comment by saito on 2018-10-29:
thank you.I have a costmap_common_params_waffle.yaml .this is OK?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Try using the following local_costmap_params.yaml:

local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  map_type: costmap

  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.05
  always_send_full_costmap: true

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5

  plugins:
  - {name: inflater_layer, type: "costmap_2d::InflationLayer"}

  inflater_layer:
    inflation_radius: 0.2 # adjust the inflation for your system setup
    cost_scaling_factor: 1.0

The problem most probably is a TF2 thing. It does not accept leading slashes on TF2 frame names so make sure that in your common, local and global params files you dont use a "/" in the frame names


Originally posted by pavel92 with karma: 1655 on 2018-10-29

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by saito on 2018-10-29:
I did that. However, I get an error message. Also, even if you restore the same error message will appear. This error message will appear continuously.

Warning: Invalid argument "/map" passed to canTransform argument target_frame in tf2 frame_ids cannot start with a '/' like: at line 134

Comment by pavel92 on 2018-10-29:
according to your question you had something like:

local_costmap: 
  global_frame: /odom 
  robot_base_frame: /base_footprint
...

Did you try setting the frames without "/" so it looks like:

local_costmap: 
  global_frame: odom 
  robot_base_frame: base_footprint

Comment by saito on 2018-10-29:
The same error occurs in either way. Also, reinstalling the package of turtlebot 3 will cause the same error, so it may be due to a different location somewhere.Image added. The costmap is in error in RViz.

Comment by pavel92 on 2018-10-29:
maybe it is coming from the global_costmap_params.yaml or costmap_common_params.yaml. Check if there the frame is put with a "/"

Comment by pavel92 on 2018-10-29:
Looks like it is a TF2 thing. It does not accept leading slashes on TF2 frame names so make sure that in your common, local and global params files you dont use a "/" in the frame names

Comment by saito on 2018-10-29:
Thank you. The "/" in global was the cause.However, this image is displayed even though you do not use the plugin. Is plugin(static,obstacle,inflation) being used as a standard?

Comment by pavel92 on 2018-10-30:
I am glad it fixed your initial problem. You can mark the answer as correct now by clicking the green tick. As for the plugins, the static, obstacle or inflation layers are used as standard plugins. You can also write and implement your own custom plugin

Comment by saito on 2018-10-30:
Thank you! I have made a new question about the new plugin. Please answer if you are good!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.