ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

SLAM not working with XV-11 LIDAR sensor

asked 2015-08-22 11:31:58 -0500

CimeROS gravatar image

updated 2015-08-23 06:36:37 -0500

I'm trying to run SLAM without odometry.

When I launch my neato.launch file, this is the error I get:

No transform between frames /map and /base_link available after 20.002637 seconds of waiting. This warning only prints once.

Im positive that the sensor works, because I can see the raw data on topic.

Is it a problem with the sensor driver or is my config in my .launch files wrong somehow?

This is my .../hector_slam-catkin/hector_slam_launch/launch/neato.launch file:

 <?xml version="1.0"?>

<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"/>
  </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 100"/>

  <node pkg="tf" type="static_transform_publisher" name="base_frame_laser" args="0 0 0 0 0 0 /base_link /laser 100"/>


  <!--<node pkg="rviz" type="rviz" name="rviz" 
    args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>-->

  <node pkg="rviz" type="rviz" name="rviz" args="-d rviz_cfg.rviz"/>
  <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"/>
</launch>

This is my .../hector_slam-catkin/hector_mapping/launch/mapping_default.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="/base_link"/>
  <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 base_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="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 100"/>-->
</launch>

This is my tf tree: https://drive.google.com/file/d/0B6kX... . . . . . . . -------------------------------------------------------------------SOLUTION-----------------------------------------------------------------------------------

EDIT: I found out that I forgot to add the line:

<include file="$(find hector_mapping)/launch/mapping_default.launch"/>

in the neato.launch file.

Now i see something in rviz:

https://drive.google.com/file/d/0B6kX...

and the map seems to be rotating ok, but there is no map being added and there is no movement in x,y directions if i move the sensor. Also in terminal I still have the error:

No transform between frames ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-08-26 16:19:30 -0500

CimeROS gravatar image

So, I solved the problem on my own at the end. Turns out I just had to play around with the Rviz config to get a proper map.

PS. I also documented my work with Neato(http://meetjanez.splet.arnes.si/2015/08/22/neato-xv-11-to-ros-slam/) and made a mini tutorial for anyone still struggling with it. Hope it helps :)

edit flag offensive delete link more

Comments

Thanks for your help. I am having similar problems.

Morpheus gravatar image Morpheus  ( 2015-08-29 12:39:26 -0500 )edit

hello, i'm try to using xv11 lidar with slam but it's not working can you share the tutorial which can working.

ngovietduy gravatar image ngovietduy  ( 2021-04-21 03:24:10 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-08-22 11:31:58 -0500

Seen: 725 times

Last updated: Aug 26 '15