(hector_slam) plugin error and could not transform laser scan

asked 2018-10-03 22:13:40 -0500

IvyKK gravatar image

Hi! I'm exploring the function of the lidar.. (EAI ydlidar x4 if anyone knows..) I can display the scanning data in rviz, but failed to create a map without odometry with hector_mapping.

I tried to install hector and the launch file online, which is:

<?xml version="1.0"?>
<launch>

  <include file="$(find ydlidar)/launch/lidar.launch" />
  <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 40" />
  <node pkg="tf" type="static_transform_publisher" name="base_frame_laser" 
       args="0 0 0 0 0 0 /base_link /laser_frame 40" />
  <include file="$(find hector_mapping)/launch/mapping_default.launch" />
  <node pkg="rviz" type="rviz" name="rviz" args="-d $(find ydlidar)/launch/lidar.rviz" />
  <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch" />

</launch>

and changing the two lines in the mapping_default.launch:

<arg name="base_frame" default="base_link" /> 
<arg name="odom_frame" default="base_link" />

after roslaunch, the I still just get the scanning data from rviz, but failed to transform the data to map, I got:

[ERROR] [1538621432.076686366]: Skipped loading plugin with error: XML Document 
'/opt/ros/kinetic/share/hector_worldmodel_geotiff_plugins/hector_geotiff_plugins.xml' has no Root Element. This likely means the XML is malformed or missing..

Also:

[ WARN] [1538621450.560298892]: No transform between frames /map and /base_link available after 20.004337 seconds of waiting. This warning only prints once.
[ INFO] [1538621450.874416888]: lookupTransform base_link to laser_frame timed out. Could not transform laser scan into base_frame.

I'm very new to this....Anyone knows how to solve it?

edit retag flag offensive close merge delete