Ros navigation in 5 days project

why the amcl is not working when i am using a param file?,
while when i putt the param in the same file(launch file) it works fine.

this is my launch file.

<launch>
  <arg name="scan_topic"  default="/scan" />
  <arg name="base_frame"  default="base_footprint"/>
  <arg name="odom_frame"  default="odom"/>
  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <rosparam file="$(find my_turtlebot_mapping/param/my_param.yaml)" command='load' />
    <remap from="scan" to="$(arg scan_topic)"/>
  </node>
</launch>

this is my param file.

base_frame: $(arg base_frame)
odom_frame: $(arg odom_frame)
map_update_interval: 15.0
maxUrange: 6.0
maxRange: 8.0
sigma: 0.05
kernelSize: 1
lstep: 0.05
astep: 0.05
iterations: 5
lsigma: 0.075
ogain: 3.0
lskip: 0
minimumScore: 200
srr: 0.01
srt: 0.02
str: 0.01
stt: 0.02
linearUpdate: 0.5
angularUpdate: 0.436
temporalUpdate: -1.0
resampleThreshold: 0.5
particles: 80
xmin: -5.0
ymin: -5.0
xmax: 5.0
ymax: 5.0
delta: 0.1
llsamplerange: 0.01
llsamplestep: 0.01
lasamplerange: 0.005
lasamplestep: 0.005

i also want to ask about the concept of bag files!! i created one and then played it while i am running the amcl, the laser data are being published correctly but the map is not updating i thought it might be because the gazebo is running , but when i shutdown gazebo an error shows also and i cannot play the bag file.??

Hi @80601 ,

That is the problem.

It should be defined properly, no arg substitutions in yaml file.

base_frame: base_footprint
odom_frame: odom

Also, indent your yaml file properly. Improper indentation will also cause problems.

When you playback a rosbag, make sure to pause gazebo physics and unpause gazebo physics after rosbag playback is complete. Otherwise, gazebo topics will interfere with ros topics.

Let me know if your problem is solved.

Regards,
Girish