Hello,
I want to have multiple robots in stage navigation. I used the stage navigation tutorial code. The problem is I can have gmapping with 1 robot. But if I include a second robot the TF doesnt work and gmapping does not work any more.
My laser.world file:
define obstacle model ( size [0.5 0.5 0.5] gui_nose 0 obstacle_return 1 )
define hokuyo ranger ( sensor( range [ 0.02 4.0 ] fov 180 samples 682 ) block( points 4 point[0] [0 1] point[1] [1 1] point[2] [1 0] point[3] [0 0] z [0 1] ) color "black" size [ 0.05 0.05 0.1 ] )
define roomba position ( block ( points 4 point[0] [ 0.700 0.705 ] point[1] [ 0.700 0.0 ] point[2] [ 0.0 0.0 ] point[3] [ 0.0 0.705 ] z [0 1] ) size [0.7 0.705 0.3] origin [-0.125 0 0 0] color "gray50"
gui_nose 1 obstacle_return 1
drive "diff"
localization "gps" )
define roomba_hokuyo roomba( color "gray90" hokuyo(pose [ 0.1 0.0 0.0 0.0 ]) )
define turtlebot roomba( color "gray90" origin [-0.100 0 0 0] )
define floorplan model ( color "gray30" boundary 1
gui_nose 0 gui_grid 0
gui_outline 0 gui_move 0
gripper_return 0 fiducial_return 0
obstacle_return 1 ranger_return 0.8 )define zone model ( color "orange"
size [ 4 4 0.01 ]gui_nose 0 gui_grid 0 gui_move 1 gui_outline 0
obstacle_return 0 ranger_return -1 )
window ( size [ 500.000 400.000 ]
scale 20 center [ 0.0 0.0 ] rotate [ 0 0 ] show_data 1 show_trailarrows 0 ) floorplan (
name "map" size [20.000 15.000 0.800] pose [0 1 0 0] bitmap "map.png" )roomba_hokuyo (
name "roomba_hokuyo_0" pose [ 0.00 0.00 0 0.00 ] )roomba_hokuyo (
name "roomba_hokuyo_1" pose [ 1.00 0.00 0 0.00 ] )
Laser_gmapping.launch:
<launch>
<!-- Launch stage world -->
<param name="/use_sim_time" value="true"/>
<include file="$(find stage_worlds)/launch/laser_world.launch" />
<!-- Launch robot model -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find stage_navigation)/urdf/robot.urdf.xacro'" />
<!-- Run gmapping -->
<include file="$(find stage_navigation)/move_base_config/slam_gmapping.xml"/>
<!-- Run Move Base -->
<include file="$(find stage_navigation)/move_base_config/move_base.xml"/>
<group ns="robot1">
<param name="tf_prefix" value="robot1_tf" />
<param name="amcl/initial_pose_x" value="1" />
<param name="amcl/initial_pose_y" value="1" />
</group>
<group ns="robot2">
<param name="tf_prefix" value="robot2_tf" />
<param name="amcl/initial_pose_x" value="-1" />
<param name="amcl/initial_pose_y" value="1" />
</group>
<!-- Run rviz -->
<include file="$(find stage_navigation)/launch/navigation_rviz.launch" />
</launch>
Tell me if you need more files.
Originally posted by gijsje170 on ROS Answers with karma: 171 on 2015-11-20
Post score: 0