I am using Ubuntu14.04 and ROS Indigo to work on two turtlebots navigation. The way I configure the network is to run master_discovery_fkie and master_sync_fkie on each computer. Now I can see topics and services published from each computer.
Then I run roslaunch turtlebot_bringup minimal.launch and roslaunch turtlebot_navigation amcl_demo.launch map_file:=... on turtlebot01. The minimal.launch seems working but I am getting an error message when running amcl_demo:
[ WARN] [1549645522.472822603]: Timed out waiting for transform from base_footprint to turtlebot01/map to become available before running costmap, tf error: canTransform: target_frame turtlebot01/map does not exist.. canTransform returned after 0.100288 timeout was 0.1.
Here I paste minimal.launch, amcl_demo.launch and move_base.launch.xml
My minimal.launch:
<launch>
<group ns="turtlebot01">
<param name="tf_prefix" value="turtlebot01"></param>
<!-- Turtlebot -->
<arg name="base" default="$(env TURTLEBOT_BASE)" doc="mobile base type [create, roomba]"/>
<arg name="battery" default="$(env TURTLEBOT_BATTERY)" doc="kernel provided locatio for battery info, use /proc/acpi/battery/BAT0 in 2.6 or earlier kernels." />
<arg name="stacks" default="$(env TURTLEBOT_STACKS)" doc="stack type displayed in visualisation/simulation [circles, hexagons]"/>
<arg name="3d_sensor" default="$(env TURTLEBOT_3D_SENSOR)" doc="3d sensor types [kinect, asux_xtion_pro]"/>
<arg name="simulation" default="$(env TURTLEBOT_SIMULATION)" doc="set flags to indicate this turtle is run in simulation mode."/>
<arg name="serialport" default="$(env TURTLEBOT_SERIAL_PORT)" doc="used by create to configure the port it is connected on [/dev/ttyUSB0, /dev/ttyS0]"/>
<arg name="robot_name" default="$(env TURTLEBOT_NAME)" doc="used as a unique identifier and occasionally to preconfigure root namespaces, gateway/zeroconf ids etc."/>
<arg name="robot_type" default="$(env TURTLEBOT_TYPE)" doc="just in case you are considering a 'variant' and want to make use of this."/>
<param name="/use_sim_time" value="$(arg simulation)"/>
<include file="$(find turtlebot_bringup)/launch/includes/robot.launch.xml">
<arg name="base" value="$(arg base)" />
<arg name="stacks" value="$(arg stacks)" />
<arg name="3d_sensor" value="$(arg 3d_sensor)" />
</include>
<include file="$(find turtlebot_bringup)/launch/includes/mobile_base.launch.xml">
<arg name="base" value="$(arg base)" />
<arg name="serialport" value="$(arg serialport)" />
</include>
<include file="$(find turtlebot_bringup)/launch/includes/netbook.launch.xml">
<arg name="battery" value="$(arg battery)" />
</include>
<!-- Rapp Manager -->
<arg name="rapp_auto_installation" default="false" doc="automatically install rapps from the web (not typically used)"/> <!-- http://wiki.ros.org/rocon_app_manager/Tutorials/indigo/Automatic Rapp Installation -->
<arg name="rapp_auto_start" default="" doc="pick an app to autostart, e.g. 'rocon_apps/talker'"/>
<arg name="rapp_package_whitelist" default="$(env TURTLEBOT_RAPP_PACKAGE_WHITELIST)" doc="a list of catkin packages that provide rapps to be loaded by the app manager."/>
<arg name="rapp_package_blacklist" default="$(env TURTLEBOT_RAPP_PACKAGE_BLACKLIST)" doc="a list of catkin packages to blacklist from providing rapps."/>
<arg name="rapp_preferred_configuration_file" default="$(find turtlebot_bringup)/param/preferred_rapp.yaml" doc="a configuration of preferred rapps"/>
<arg name="robot_icon" default="turtlebot_bringup/turtlebot2.png" doc="passed to user interfaces to socialise the turtlebot's appearance"/>
<arg name="rapp_verbose" default="true" doc="show verbose output from running apps (aka roslaunch --screen)"/>
<!-- ***************************** Rocon Master Info ************************** -->
<arg name="robot_description" default="Kick-ass ROS turtle"/>
<!-- Capabilities -->
<arg name="capabilities" default="true" doc="start and register an underlying capability server"/>
<arg name="capabilities_server_name" default="capability_server"/>
<arg name="capabilities_nodelet_manager_name" default="capability_server_nodelet_manager" />
<arg name="capabilities_parameters" default="$(find turtlebot_bringup)/param/capabilities/defaults_tb2.yaml" doc="preload the capability server with this configurations" /> <!-- defaults_tb.yaml, defaults_tb2.yaml -->
<arg name="capabilities_package_whitelist" default="[kobuki_capabilities, std_capabilities, turtlebot_capabilities]" doc="register capabilities from these packages only" />
<arg name="capabilities_blacklist" default="['std_capabilities/Navigation2D', 'std_capabilities/MultiEchoLaserSensor']" doc="blacklist these specific capabilities from being registered" />
<!-- Interactions -->
<arg name="interactions" default="true" doc="start an interactions manager"/>
<arg name="interactions_list" default="$(env TURTLEBOT_INTERACTIONS_LIST)" doc="a list of filenames that provide interactions specifications."/>
<!-- Zeroconf -->
<arg name="zeroconf" default="true" doc="publish the master information on zeroconf"/>
<!--arg name="zeroconf_name" default="$(arg robot_name)" doc="the name to identify the master on zeroconf"/-->
<arg name="zeroconf_port" default="11311" doc="port number of the ros master"/>
<!-- Rapp Manager -->
<include file="$(find rocon_app_manager)/launch/standalone.launch">
<!-- Rapp Manager -->
<arg name="robot_name" value="$(arg robot_name)" />
<arg name="robot_type" value="$(arg robot_type)" />
<arg name="robot_icon" value="$(arg robot_icon)" />
<arg name="rapp_package_whitelist" value="$(arg rapp_package_whitelist)" />
<arg name="rapp_package_blacklist" value="$(arg rapp_package_blacklist)" />
<arg name="rapp_preferred_configuration_file" value="$(arg rapp_preferred_configuration_file)" />
<arg name="auto_start_rapp" value="$(arg rapp_auto_start)" />
<arg name="screen" value="$(arg rapp_verbose)" />
<arg name="auto_rapp_installation" value="$(arg rapp_auto_installation)" />
<!-- Rocon Master Info -->
<arg name="robot_description" value="$(arg robot_description)" />
<!-- Capabilities -->
<arg name="capabilities" value="$(arg capabilities)" />
<arg name="capabilities_blacklist" value="$(arg capabilities_blacklist)" />
<arg name="capabilities_nodelet_manager_name" value="$(arg capabilities_nodelet_manager_name)" />
<arg name="capabilities_server_name" value="$(arg capabilities_server_name)" />
<arg name="capabilities_package_whitelist" value="$(arg capabilities_package_whitelist)" />
<arg name="capabilities_parameters" value="$(arg capabilities_parameters)" />
<!-- Interactions -->
<arg name="interactions" value="$(arg interactions)"/>
<arg name="interactions_list" value="$(arg interactions_list)"/>
<!-- Zeroconf -->
<arg name="zeroconf" value="$(arg zeroconf)"/>
<!--arg name="zeroconf_name" value="$(arg zeroconf_name)"/-->
<arg name="zeroconf_port" value="$(arg zeroconf_port)"/>
</include>
</group>
</launch>
My amcl_demo.launch:
<launch>
<group ns="turtlebot01">
<param name="tf_prefix" value="turtlebot01"></param>
<!-- 3D sensor -->
<arg name="3d_sensor" default="$(env TURTLEBOT_3D_SENSOR)"/> <!-- r200, kinect, asus_xtion_pro -->
<include file="$(find turtlebot_bringup)/launch/3dsensor.launch">
<arg name="rgb_processing" value="false" />
<arg name="depth_registration" value="false" />
<arg name="depth_processing" value="false" />
<!-- We must specify an absolute topic name because if not it will be prefixed by "$(arg camera)".
Probably is a bug in the nodelet manager: https://github.com/ros/nodelet_core/issues/7 -->
<arg name="scan_topic" value="/scan" />
</include>
<!-- Map server -->
<!--arg name="map_file" default="$(env TURTLEBOT_MAP_FILE)"/-->
<node name="map_server" pkg="map_server" type="map_server" args="$(find turtlebot_go1)/../map/1_25_19_2.yaml">
<param name="frame_id" value="/map"/>
</node>
<!-- AMCL -->
<arg name="custom_amcl_launch_file" default="$(find turtlebot_navigation)/launch/includes/amcl/$(arg 3d_sensor)_amcl.launch.xml"/>
<arg name="initial_pose_x" default="0.0"/> <!-- Use 17.0 for willow's map in simulation -->
<arg name="initial_pose_y" default="0.0"/> <!-- Use 17.0 for willow's map in simulation -->
<arg name="initial_pose_a" default="0.0"/>
<include file="$(arg custom_amcl_launch_file)">
<arg name="initial_pose_x" value="$(arg initial_pose_x)"/>
<arg name="initial_pose_y" value="$(arg initial_pose_y)"/>
<arg name="initial_pose_a" value="$(arg initial_pose_a)"/>
</include>
<!-- Move base -->
<arg name="custom_param_file" default="$(find turtlebot_navigation)/param/$(arg 3d_sensor)_costmap_params.yaml"/>
<include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml">
<arg name="custom_param_file" value="$(arg custom_param_file)"/>
</include>
</group>
</launch>
I am using Ubuntu14.04 and ROS Indigo to work on two turtlebots navigation. The way I configure the network is to run master_discovery_fkie and master_sync_fkie on each computer. Now I can see topics and services published from each computer.
Then I run
roslaunch turtlebot_bringup minimal.launch
androslaunch turtlebot_navigation amcl_demo.launch map_file:=...
on turtlebot01. The minimal.launch seems working but I am getting an error message when running amcl_demo:Here I paste minimal.launch, amcl_demo.launch and move_base.launch.xml
My minimal.launch:
My amcl_demo.launch:
My move_base.launch.xml: