Ask Your Question
0

Amcl particlecloud topic not publishing

asked 2020-03-26 06:06:19 -0500

Pytrik gravatar image

Hi,

I would like to know why rviz is not showing the particle cloud for any of my robots. Below I have provided my navigation stack launch file and my amcl parameters yaml file. Everything works (e.g. navigating from a to b), except the amcl localization.

Thank you very much.

move_base_decentralised.launch:

<launch>

  <master auto="start"/>
  Run the map server  
    <node name="map_server" pkg="map_server" type="map_server" args="$(find lasmultigazebo4)/maps/my_map.yaml"/>
  <node pkg="lasmulticontrol4" type="fixed_tf_broadcaster.py" name="broadcaster_fixed" />

  <group ns="n_1">

   <node pkg="amcl" type="amcl" name="amcl">
    <rosparam file="$(find lasmultigazebo4)/config/amcl_params.yaml" command="load" />
    <remap from="scan" to="/n_1scan"/>
    <param name="odom_frame_id" value="n_1/odom" />
    <param name="global_frame_id" value="map" />
    <param name="base_frame_id" value="n_1base_footprint" />
    <param name="use_map_topic" value="true"/>
   </node>

   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
    <rosparam file="$(find lasmultigazebo4)/config/robot1config/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
    <rosparam file="$(find lasmultigazebo4)/config/robot1config/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find lasmultigazebo4)/config/robot1config/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find lasmultigazebo4)/config/robot1config/global_costmap_params.yaml" command="load" /> 
    <rosparam file="$(find lasmultigazebo4)/config/robot1config/dwa_local_planner_params.yaml" command="load" />
    <!--<remap from="odom" to="n_1/odom"/>-->
    <remap from="cmd_vel" to="Ug_cmd_vel"/>
   </node>
  </group>

  <group ns="n_2">

   <node pkg="amcl" type="amcl" name="amcl">
    <rosparam file="$(find lasmultigazebo4)/config/amcl_params.yaml" command="load" />
    <remap from="scan" to="/n_2scan"/>
    <param name="odom_frame_id" value="n_2/odom" />
    <param name="global_frame_id" value="map" />
    <param name="base_frame_id" value="n_2base_footprint" />
    <param name="use_map_topic" value="true"/>
   </node>

   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
    <rosparam file="$(find lasmultigazebo4)/config/robot2config/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
    <rosparam file="$(find lasmultigazebo4)/config/robot2config/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find lasmultigazebo4)/config/robot2config/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find lasmultigazebo4)/config/robot2config/global_costmap_params.yaml" command="load" /> 
    <rosparam file="$(find lasmultigazebo4)/config/robot2config/dwa_local_planner_params.yaml" command="load" />
    <!--<remap from="odom" to="n_1/odom"/>-->
    <remap from="cmd_vel" to="Ug_cmd_vel"/>
   </node>
  </group>

  <group ns="n_3">

   <node pkg="amcl" type="amcl" name="amcl">
    <rosparam file="$(find lasmultigazebo4)/config/amcl_params.yaml" command="load" />
    <remap from="scan" to="/n_3scan"/>
    <param name="odom_frame_id" value="n_3/odom" />
    <param name="global_frame_id" value="map" />
    <param name="base_frame_id" value="n_3base_footprint" />
    <param name="use_map_topic" value="true"/>
   </node>

   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
    <rosparam file="$(find lasmultigazebo4)/config/robot3config/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
    <rosparam file="$(find lasmultigazebo4)/config/robot3config/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find lasmultigazebo4)/config/robot3config/local_costmap_params.yaml" command="load" /> ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-26 07:47:20 -0500

bob-ROS gravatar image

My guess is that AMCL subscribes to (namespace)/map instead of /map. Check rosnode info on your amcl nodes and make sure they subscribe to correct topics.

You can force the amcl nodes to subscribe to the /map topic with:

<remap from="map" to="/map"/>
edit flag offensive delete link more

Comments

That seems to be the trick. I had some new errors, namely flickering and jittery control behaviour. I had to remove my 'odom' frame and my odom frame transform to map, since amcl does the transform from map to n_1/odom, n_2/odom, n_3/odom ... n_n/odom on its own.

Pytrik gravatar image Pytrik  ( 2020-03-26 09:46:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-03-26 06:06:19 -0500

Seen: 15 times

Last updated: Mar 26