Robotics StackExchange | Archived questions

Global costmap issue when using cartographer.

hi, im running cartographer on a robot and can produce good map.

after following some tutorial about turtlebot 3 simulator, i decide to try it using my real robot and rplidar without pre existing map. here the url of youtube about the tutorial:

https://www.youtube.com/watch?v=dDODrSy6cYU&t=203s

after i change some parameter and launch file, every thigs look fine until i realize that the global costmap took time so long to show lethal obstacle. besides, the local costmap its seems dont appear at all.

here my launch file:

<launch>
  <!-- Arguments -->
  <arg name="model" default="burger" doc="model type [burger, waffle, waffle_pi]"/>
  <arg name="slam_methods" default="gmapping" doc="slam type [gmapping, cartographer, hector, karto, frontier_exploration]"/>
  <arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>
  <arg name="open_rviz" default="true"/>
  <arg name="move_forward_only" default="false"/>

  <!-- Turtlebot3 -->
  <include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
    <arg name="model" value="$(arg model)" />
  </include>

  <!-- AMCL -->
  <include file="$(find auto_nav)/launch/amcl.launch"/>


  <!--SLAM-->
  <include file="$(find turtlebot3_slam)/launch/turtlebot3_$(arg slam_methods).launch">
    <arg name="model" value="$(arg model)" />
    <arg name="configuration_basename" value="$(arg configuration_basename)"/>
  </include>

  <!-- move_base -->
  <include file="$(find auto_nav)/launch/move_base.launch">
    <arg name="model" value="$(arg model)" />
    <arg name="move_forward_only" value="$(arg move_forward_only)"/>
  </include>

  <!-- rviz -->
  <group if="$(arg open_rviz)"> 
    <node pkg="rviz" type="rviz" name="rviz" required="true"
          args="-d $(find auto_nav)/rviz/turtlebot3_auto_nav.rviz"/>
  </group>
</launch>

here my local costmap param:

local_costmap:
  global_frame: odom
  robot_base_frame: base_link

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5  

  static_map: false  
  rolling_window: true
  width: 1
  height: 1
  resolution: 0.05

global costmap param:

global_costmap:
  global_frame: map
  robot_base_frame: base_link

  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 0.5

  static_map: true
  rolling_window: true 

in my opinion but not sure. its becaue the cartographer obstacle value is between 0-255 mean while the other slam algorith its not.

its seems there are already people have same problem like me: https://github.com/cartographer-project/cartographer/issues/1498

its seems they provide some nodes file. But im still dont understand how to do with this file: https://github.com/cartographer-project/cartographer/blob/d7b4656741bbf99f922c5ea7dddf15a1a74aec0f/cartographer/io/submap_painter.cc#L209

i really need help. thx

cartographer, ubuntu 18, ros melodic, rplidar,

cartographer source: https://medium.com/robotics-weekends/2d-mapping-using-google-cartographer-and-rplidar-with-raspberry-pi-a94ce11e44c5

my rviz view: https://drive.google.com/file/d/1DuncrFipKhCVHrb83kk_JBm42PsQS661/view?usp=sharing

Asked by frans on 2022-09-12 21:57:48 UTC

Comments

Can you please format your post properly? For example, please select the content of your launch file and click on the button having 101010 label and so on.

Asked by ravijoshi on 2022-09-13 06:31:10 UTC

Answers