ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to change number of particles in gmapping package?

asked 2022-05-24 22:45:40 -0600

MirulJ gravatar image

updated 2022-07-02 08:02:03 -0600

lucasw gravatar image

I would like to ask is this is the correct coding to change the number of particles of the gmapping package in launch file?

<launch>
  <!-- Arguments -->
  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
  <arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>
  <arg name="set_base_frame" default="base_footprint"/>
  <arg name="set_odom_frame" default="odom"/>
  <arg name="set_map_frame"  default="map"/>

  <!-- Gmapping -->
  <node pkg="gmapping" type="slam_gmapping" name="turtlebot3_slam_gmapping" output="screen">
    <param name="base_frame" value="$(arg set_base_frame)"/>
    <param name="odom_frame" value="$(arg set_odom_frame)"/>
    <param name="map_frame"  value="$(arg set_map_frame)"/>
    <param name="particles"  value="100"/>
    <rosparam command="load" file="$(find turtlebot3_slam)/config/gmapping_params.yaml" />
  </node>
</launch>

Im adding <param name="particles" value="100"/> in the launch file as above. Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-05-24 23:13:29 -0600

The best place would be the file:

$(find turtlebot3_slam)/config/gmapping_params.yaml

Since the line:

<rosparam command="load" file="$(find turtlebot3_slam)/config/gmapping_params.yaml" />

Is going to overwrite any ros parameters that you have defined before.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2022-05-24 22:45:40 -0600

Seen: 99 times

Last updated: May 24 '22