0
$\begingroup$

Rosanswers logo

Hello,

I have been trying to make hector slam work on my turtlebot with a hokuyo 04lx laser. I am using ROS fuerte, ubuntu 12.04. Steps I followed:

  1. Did rosmake to hector_slam package with no errors.
  2. I already have a urdf of my turtlebot with laser installed. (I can use gmapping)
  3. I did try the hector_turtlebot gazebo tutorials successfully.

I launched the files in this order.

  1. turtlebot.launch file
  2. hokuyo.launch file
  3. hector_slam_launch tutorial.launch

The mapping_default.launch file is like this:

    <?xml version="1.0"?>
<launch>
  <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
  <arg name="base_frame" default="base_footprint"/>
  <arg name="odom_frame" default="nav"/>
  <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="base_link" />
    <param name="odom_frame" value="odom" />
    
    <!-- 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="true"/>
    
    <!-- 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="5"/>
    <param name="scan_topic" value="hokuyo_scan"/>
    
    <!-- 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>

I can see the laser scan and robot model on rviz. But the fixed frame and target from gives error on /map topic. If I change both of them to /odom the laser scans are shown. Also the Map field gives error. I cannot see the map being built.

Also on the terminal in the tutorial.launch file I get strange errors like this:

 SUMMARY
========

PARAMETERS
 * /hector_geotiff_node/draw_background_checkerboard
 * /hector_geotiff_node/draw_free_space_grid
 * /hector_geotiff_node/geotiff_save_period
 * /hector_geotiff_node/map_file_base_name
 * /hector_geotiff_node/map_file_path
 * /hector_mapping/advertise_map_service
 * /hector_mapping/base_frame
 * /hector_mapping/laser_z_max_value
 * /hector_mapping/laser_z_min_value
 * /hector_mapping/map_frame
 * /hector_mapping/map_multi_res_levels
 * /hector_mapping/map_resolution
 * /hector_mapping/map_size
 * /hector_mapping/map_start_x
 * /hector_mapping/map_start_y
 * /hector_mapping/map_update_angle_thresh
 * /hector_mapping/map_update_distance_thresh
 * /hector_mapping/odom_frame
 * /hector_mapping/pub_map_odom_transform
 * /hector_mapping/scan_subscriber_queue_size
 * /hector_mapping/scan_topic
 * /hector_mapping/tf_map_scanmatch_transform_frame_name
 * /hector_mapping/update_factor_free
 * /hector_mapping/update_factor_occupied
 * /hector_mapping/use_tf_pose_start_estimate
 * /hector_mapping/use_tf_scan_transformation
 * /hector_trajectory_server/source_frame_name
 * /hector_trajectory_server/target_frame_name
 * /hector_trajectory_server/trajectory_publish_rate
 * /hector_trajectory_server/trajectory_update_rate
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    hector_geotiff_node (hector_geotiff/geotiff_node)
    hector_mapping (hector_mapping/hector_mapping)
    hector_trajectory_server (hector_trajectory_server/hector_trajectory_server)
    rviz (rviz/rviz)

ROS_MASTER_URI=http://192.168.111.21:11311

core service [/rosout] found
process[rviz-1]: started with pid [16501]
process[hector_mapping-2]: started with pid [16502]
process[hector_trajectory_server-3]: started with pid [16563]
HectorSM map lvl 0: cellLength: 0.05 res x:2048 res y: 2048
HectorSM map lvl 1: cellLength: 0.1 res x:1024 res y: 1024
[ INFO] [1385693168.936804322]: HectorSM p_base_frame_: base_link
[ INFO] [1385693168.936939784]: HectorSM p_map_frame_: map
[ INFO] [1385693168.937028939]: HectorSM p_odom_frame_: odom
[ INFO] [1385693168.937128850]: HectorSM p_scan_topic_: hokuyo_scan
[ INFO] [1385693168.937212180]: HectorSM p_use_tf_scan_transformation_: true
[ INFO] [1385693168.937281717]: HectorSM p_pub_map_odom_transform_: true
[ INFO] [1385693168.937360377]: HectorSM p_scan_subscriber_queue_size_: 5
[ INFO] [1385693168.937426493]: HectorSM p_map_pub_period_: 2.000000
[ INFO] [1385693168.937492279]: HectorSM p_update_factor_free_: 0.400000
[ INFO] [1385693168.937555392]: HectorSM p_update_factor_occupied_: 0.900000
[ INFO] [1385693168.937628583]: HectorSM p_map_update_distance_threshold_: 0.400000 
[ INFO] [1385693168.937708414]: HectorSM p_map_update_angle_threshold_: 0.060000
[ INFO] [1385693168.937776160]: HectorSM p_laser_z_min_value_: -1.000000
[ INFO] [1385693168.937842333]: HectorSM p_laser_z_max_value_: 1.000000
process[hector_geotiff_node-4]: started with pid [16620]
[ INFO] [1385693170.824508362]: No plugins loaded for geotiff node
[ INFO] [1385693170.824670229]: Geotiff node started
Got bus address:  "unix:abstract=/tmp/dbus-2hLnz9fcNf,guid=bb9cbab66e8849381861c23a00000019" 
Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-2hLnz9fcNf,guid=bb9cbab66e8849381861c23a00000019" 
Registered DEC:  true 
Registered event listener change listener:  true 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QComboBoxListView(0x1fd6e50) "" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QComboBoxListView(0x205e6a0) "" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QComboBoxListView(0x22dd9d0) "" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
FIXME: handle dialog start. 
FIXME: handle dialog end.

I do not understand what is this??

My TF tree and Rviz shot are attached here.

TF tree (https://www.dropbox.com/s/xr6ziffncbh0ptd/frames.pdf)

RViz-Screenshot from 2013-11-29 11:31:31.png

Can someone help me point out the errors and how to solve it. Also how to solve the error I am getting on the terminal.

Thanks in advance!!

Ankit


Originally posted by Vegeta on ROS Answers with karma: 340 on 2013-11-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This sounds like the hector_mapping node isn't doing anything, which could be the case if the wrong scan topic is specified (e.g. hokuyo_node publishes to "/scan" but hector_mapping subscribes "/hokuyo_scan"). Can you verify you really publish the scan to the "hokuyo_scan" topic?


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2015-01-20

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.