Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees.
Hi! I would like to do an exploration. These are the steps I followed:
roscore
rosrun xv_11_laser_driver neato_laser_publisher _port:=/dev/ttyUSB0 _firmware_version:=2
rosrun tf static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms
roslaunch hector_slam_launch neato.launch
Because my neato.launch is:
<launch>
<!--
<node pkg="xv_11_laser_driver" type="neato_laser_publisher" name="xv_11_node">
<param name="port" value="/dev/ttyUSB0"/>
<param name="firmware_version" value="2"/>
<param name="frame_id" value="laser"/>
<param name="baud_rate" value="115200"/>
<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />
<param name="static_map" value="false"/>
<param name="map_pub_period" value="0.005" />
<param name="map_resolution" value="0.025" />
<param name="map_size" value="1024" />
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5"/>
<param name="map_update_distance_thresh" value="0.4"/>
<param name="map_update_angle_thresh" value="2"/>
<param name="map_multi_res_levels" value="3" />
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.9"/>
<param name="scan_subscriber_queue_size" value="5"/>
<param name="pub_map_scanmatch_transform" value="true"/>
<param name="output_timing" value="false" />
<param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame"/>
</node>
-->
<node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0.0 0.0 0.0 0 0 0.0 /odom /base_link 10"/>
<node pkg="tf" type="static_transform_publisher" name="base_frame_laser" args="0 0 0 0 0 0 /base_link /neato_laser 10"/>
<!--
<node pkg="rviz" type="rviz" name="rviz"
args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>
-->
<include file="$(find hector_mapping)/launch/mapping_default.launch"/><node pkg="rviz" type="rviz" name="rviz" args="-d rviz_cfg.rviz"/>
<include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"/>
<arg name="trajectory_source_frame_name" default="/base_link"/>
<arg name="trajectory_update_rate" default="4"/>
<arg name="trajectory_publish_rate" default="0.25"/>
</launch>
Then I type in the terminal:
rosrun hector_costmap hector_costmap
roslaunch hector_exploration_node exploration_planner.launch
I have this message:
[ WARN] [1457530291.227602967]: Could not get robot pose, cancelling reconfiguration
[ERROR] [1457530292.327489342]: Connectivity Error looking up robot pose: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees.
My exploration_planner.launch is:
<launch>
<!--launch-prefix="gdb -ex run ++args"-->
<node pkg="hector_exploration_node" type="exploration_planner_node" name="hector_exploration_node" output="screen">
<rosparam file="$(find hector_exploration_node)/config/costmap.yaml" command="load"/>
</node>
<node name="static_tf0" pkg="tf" type="static_transform_publisher" args="2 0 0 0 0 0 /map /base_link 100"/>
<node name="costmap_node" pkg="costmap_2d" type="costmap_2d_node">
<param name="global_frame" value="/map"/>
<param name="robot_base_frame" value="base_link"/>
<param name="transform_tolerance" value="0.2"/>
<param name="update_frequency" value="5.0"/>
<param name="publish_frequency" value="1.0"/>
<param name="rolling_window" value="false"/>
<param name="resolution" value="0.05"/>
<param name="publish_voxel_map" value="true"/>
<rosparam file="$(find costmap_2d)/launch/example_params.yaml" command="load" ns="costmap"/>
</node>
</launch>
Where am I doing wrong? Thank you.