lookupTransform timed out error

asked 2018-08-15 12:11:08 -0600

LunarJeff gravatar image

updated 2018-08-16 15:42:13 -0600

I am running Ubuntu 16.04 and running ROS Kinetic. I am currently using an ouster LIDAR that obtains pointcloud2 messges. I am using pointcloud_to_laserscan package to obtain laserscan messages from the pointcloud2 messages. After running rviz, I see that the package is running correctly and showing pointcloud and laserscan data.

pointcloud_to_laserscan:

rosrun pointcloud_to_laserscan pointcloud_to_laserscan_node cloud_in:=/os1_node/points

Next I launch the hector_slam package using the following launch file:

<?xml version="1.0"?>

<launch>
  <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
  <arg name="base_frame" default="base_link"/>
  <arg name="odom_frame" default="odom"/>
  <arg name="pub_map_odom_transform" default="true"/>
  <arg name="scan_subscriber_queue_size" default="5"/>
  <arg name="scan_topic" default="scan"/>
  <arg name="map_size" default="2048"/>

  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

  <!-- Frame names -->
  <param name="map_frame" value="map" />
  <param name="base_frame" value="$(arg base_frame)" />
  <param name="odom_frame" value="$(arg odom_frame)" />

  <!-- Tf use -->
  <param name="use_tf_scan_transformation" value="true"/>
  <param name="use_tf_pose_start_estimate" value="false"/>
  <param name="pub_map_odom_transform" value="$(arg pub_map_odom_transform)"/>

  <!-- Map size / start point -->
  <param name="map_resolution" value="0.050"/>
  <param name="map_size" value="$(arg map_size)"/>
  <param name="map_start_x" value="0.5"/>
  <param name="map_start_y" value="0.5" />
  <param name="map_multi_res_levels" value="2" />

  <!-- Map update parameters -->
  <param name="update_factor_free" value="0.4"/>
  <param name="update_factor_occupied" value="0.9" />    
  <param name="map_update_distance_thresh" value="0.4"/>
  <param name="map_update_angle_thresh" value="0.06" />
  <param name="laser_z_min_value" value = "-1.0" />
  <param name="laser_z_max_value" value = "1.0" />

  <!-- Advertising config --> 
  <param name="advertise_map_service" value="true"/>

  <param name="scan_subscriber_queue_size" value="$(arg scan_subscriber_queue_size)"/>
  <param name="scan_topic" value="$(arg scan_topic)"/>

  <!-- Debug parameters -->
  <!--
    <param name="output_timing" value="false"/>
    <param name="pub_drawings" value="true"/>
    <param name="pub_debug_output" value="true"/>
  -->
  <param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)" />
  </node>

<node pkg="tf" type="static_transform_publisher" name="base_link_to_os1" args="0 0 0.178 0 0 0 base_link os1 100"/>
<node pkg="tf" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 odom base_link 100"/>
</launch>

After running "rosrun tf view_frames", my tree shows: odom -> base_link -> os1 , with recent transform being about 0.005 seconds old so I believe my transformation are correct.

After hector_slam us running, I obtain the following:

[ INFO] [1534352731.363850888]: lookupTransform base_link to os1 timed out. Could not transform laser scan into base_frame.
[ INFO] [1534352731.869131126]: lookupTransform base_link to os1 timed out. Could not transform laser scan into base_frame.
[ INFO] [1534352732.372954411]: lookupTransform base_link to os1 timed out. Could not transform laser scan into base_frame.
[ INFO] [1534352732.874232147]: lookupTransform base_link to os1 timed out. Could not transform laser scan into base_frame.

If I run "rostopic echo map", all I obtain is -1 repeating

Any thoughts on what I am doing wrong?

edit retag flag offensive close merge delete