[ros-users] Gazebo-Erratic-Amcl-rviz

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
-->%0A>%20%0A>%20%0A>%20%20%20%0A>%20%20%20<param%20name=%22robot_description%22%20command=%22%24(find%20xacro)/xacro.py%20'%24(find%20erratic_gazebo)/robots/erratic.urdf.xacro'%22%20/>%0A>%20%0A>%20%20%20%0A>%20%20%20<node%20name=%22spawn_erratic%22%20pkg=%22gazebo_tools%22%20type=%22gazebo_model%22%20args=%22-z%200.051%20-p%20robot_description%20spawn%20robot_description%22%20respawn=%22false%22%20output=%22screen%22%20/>%0A>%20%0A>%20%20%20%0A>%20%20%20<include%20file=%22%24(find%20pr2_controller_manager)/controller_manager.launch%22%20/>%0A>%20%0A>%20%20%20%0A>%20%20%20<node%20pkg=%22rostopic%22%20type=%22rostopic%22%20name=%22fake_joint_calibration%22%20args=%22pub%20/calibrated%20std_msgs/Bool%20true%22%20/>%0A>%20%0A>%20%20%20%0A>%20%20%20<node%20name=%22diffdrive%22%20pkg=%22gazebo_plugins%22%20type=%22gazebo_ros_diffdrive%22%20respawn=%22true%22%20output=%22screen%22/>%0A>%20%20%20%0A>%20%20%20%0A>%20%20%20<node%20pkg=%22amcl%22%20type=%22amcl%22%20name=%22amcl%22>%0A>%20%20%20<remap%20from=%22scan%22%20to=%22/base_scan%22%20/>%0A>%20%20%20</node>%0A>%20%20%20%20%0A>%20</launch>%0A>%20%0A>%20%0A>%20%0A>%20<launch>%0A>%20%0A>%20%20%20%0A>%20%20%20<param%20name=%22/use_sim_time%22%20value=%22true%22%20/>%0A>%20%20%20%0A>%20%20%20%20<node%20name=%22gazebo%22%20pkg=%22gazebo%22%20type=%22gazebo%22%20args=%22%24(find%20gazebo_worlds)/worlds/empty.world%22%20respawn=%22false%22%20output=%22screen%22/>%0A>%20%0A>%20%20%20%0A>%20%20%20<param%20name=%22walls%22%20textfile=%22%24(find%20han_Scene)/scenarios/bar/walls.model%22%20/>%0A>%20%20%20<node%20name=%22xml2factor_wg_walls%22%20pkg=%22gazebo%22%20type=%22spawn_model%22%20args=%22-gazebo%20-param%20walls%20-x%20-7.65%20-y%20-7.65%20-model%20walls%22%20respawn=%22false%22%20output=%22screen%22%20/>%0A>%20</launch>%0A>%20%0A>%20%0A>%20The%20thing%20is%20when%20I%20do%20this%20I%20have%20this%20error%20and%20its%20dies%20the%20amcl:%0A>%20%0A>%20%0A>%20%0A>%20%5Bamcl-15%5D%20process%20has%20died%20%5Bpid%20902,%20exit%20code%20-6%5D.%0A>%20%0A>%20log%20files:%20/home/robot/.ros/log/d5d7c27a-0d21-11e0-a4d4-0026b9e75b87/amcl-15*.log%0A>%20%0A>%20If%20I%20try%20the%20same%20without%20launching%20the%20map_server%20node%20there%20is%20no%20problem.%20So%20is%20the%20amcl%20incompatible%20with%20the%20gazebo's%20simulations?%20how%20can%20I%20do%20this?%0A>%20%0A>%20Thanks,%20i%20have%20try%20everything%20but%20I%20can't%20solve%20it.%0A>%20%0A>%20Nicolas%0A>%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20">Reply to this message
Author: User discussions
Date:  
To: ros-users
Subject: [ros-users] Gazebo-Erratic-Amcl-rviz

hi everyone!
I am working with a simulated erratic model in gazebo, the model is the same that it is in the erratic simulation tutorial. The thing is that I have build a 3d map inside an empty world and i want to show that in rviz, so I am using the map server to show the map. As I have problems with the localization of the robot in the map that I showing in the rviz, I tried with the node fake-localization, but i have still drift with the laser points. Therefore my intention is to use the amcl node to have a better localization of my robot using the simulated laser info.
I am launching this files:








<launch>
  <!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/pr2/erratic_defs/robots for full erratic -->
  <!-- start up wg world -->
  <include file="$(find gazebo_worlds)/launch/testing_world.launch"/>
  <!--<include file="$(find erratic_nav)/amcl.launch"/>  -->
   <!-- Static transforms -->
    <include file="$(find han_Scene)/launch/static_transforms.launch"/>


<!-- <node name="map_server" pkg="map_server" type="map_server" args="$(find han_Scene)/scenarios/bar/map_config.yaml" />-->

  <!-- Create a transform sender for linking these frames. 
  <node name="tf_footprint_base" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 base_link base_footprint 40" />    -->


<!-- send pr2.xml to param server -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find erratic_gazebo)/robots/erratic.urdf.xacro'" />

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_erratic" pkg="gazebo_tools" type="gazebo_model" args="-z 0.051 -p robot_description spawn robot_description" respawn="false" output="screen" />

<!-- Controller Manager -->
<include file="$(find pr2_controller_manager)/controller_manager.launch" />

<!-- Fake Calibration -->
<node pkg="rostopic" type="rostopic" name="fake_joint_calibration" args="pub /calibrated std_msgs/Bool true" />

<!-- load controllers -->
<node name="diffdrive" pkg="gazebo_plugins" type="gazebo_ros_diffdrive" respawn="true" output="screen"/>

    <!-- Fake Localization
  <node name="fake_localization" pkg="fake_localization" type="fake_localization" /> -->


<node pkg="amcl" type="amcl" name="amcl">
<remap from="scan" to="/base_scan" />
</node>

</launch>



<launch>

<!-- start gazebo with an empty plane -->
<param name="/use_sim_time" value="true" />

<node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen"/>

<!-- wg walls-->
<param name="walls" textfile="$(find han_Scene)/scenarios/bar/walls.model" />
<node name="xml2factor_wg_walls" pkg="gazebo" type="spawn_model" args="-gazebo -param walls -x -7.65 -y -7.65 -model walls" respawn="false" output="screen" />
</launch>


The thing is when I do this I have this error and its dies the amcl:



[amcl-15] process has died [pid 902, exit code -6].

log files: /home/robot/.ros/log/d5d7c27a-0d21-11e0-a4d4-0026b9e75b87/amcl-15*.log

If I try the same without launching the map_server node there is no problem. So is the amcl incompatible with the gazebo's simulations? how can I do this?

Thanks, i have try everything but I can't solve it.

Nicolas