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

SLAM without odometry, hector_slam + sicktoolbox

asked 2016-06-22 11:36:56 -0600

maalrivba gravatar image

updated 2016-06-29 04:53:32 -0600

Hi. I've been working on SLAM without odometry in ROS hydro. I'm currently using a SICK Lidar LMS200 which I could succesfully connect to serial and I get communication and data in RVIZ.

I git cloned the files and I started to do some test running ~$ roslaunch hector_slam_launch tutorial.launch and it appears to be working properly so I assume the package was correctly installed.

Then I proceeded to review and modify the files tutorial.launch and ~/catkin_ws/src/hector_slam/hector_mapping/launch/mapping_default.launch and ~/catkin_ws/src/hector_slam/hector_slam_launch/launch/tutorial.launch

The current mapping_default.launch :

<?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="$(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_to_laser_broadcaster" args="0.1 0.1 0.1 0 0 0 base_link laser 100" />    


  <!--<node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 100"/>-->
</launch>

Now the tutorial.launch:

<?xml version="1.0"?>

<launch>

  <arg name="geotiff_map_file_path" default="$(find hector_geotiff)/maps"/>

  <param name="/use_sim_time" value="true"/>



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

  <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch">
    <arg name="trajectory_source_frame_name" value="scanmatcher_frame"/>
    <arg name="map_file_path" value="$(arg geotiff_map_file_path)"/>
  </include>

</launch>

as far as I understand, when I launch the tutorial.launch file mapping_default.launch should be running as well. However I notice that the tf transform are not published, so I have to publish them manually by

~$ rosrun tf static_transform_publisher ...

And still, having a tf tree, I see no map working on RVIZ

Anybody catching some errors here?

Thank you in advance

EDIT 1


Launching tutorial.launch, I get no tf tree. I do get the warn No transform between frames /map and scanmatcher_frame available. If I run the node manually I get a tree only if the values are not ... (more)

edit retag flag offensive close merge delete

Comments

Could you please run ~$ rosrun tf view_frames and add the image to your question? Do any errors come up?

Icehawk101 gravatar image Icehawk101  ( 2016-06-22 13:16:10 -0600 )edit

Launching tutorial.launch, I get no tf tree. I do get the warn No transform between frames /map and scanmatcher_frame available. If I run the node manually I get a tree only if the values are not 0 0 0 0 0 0. Anyway i think the launch files are not running correctly. I get the same warn either way

maalrivba gravatar image maalrivba  ( 2016-06-23 04:56:26 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-06-29 02:54:53 -0600

gp gravatar image

Is your SICK node running and publishing laser scans on /scan topic? In your launch file you are nowhere initializing that node. Another thing is that the tutorial.launch file that you are using is for demo, assumes that tf between different frames like map->nav , nav->base_link etc are being published. If you run the demo rosbag file you will see that these tf are published in that rosbag file. If you want to run the hectorslam with SICK, tutorial.launch file will not work as it is. Have a look at this project hector_slam_example. Use hector_hokuyo.launch. replace hokuyo initialisation with SICK initialisation.

edit flag offensive delete link more

Comments

Thank you for the response. Everything was working properly except the tf tree. I found the /use_simtime as the responsible for the failure. However if I want to use the simtime I'll need to use the rosbag.

maalrivba gravatar image maalrivba  ( 2016-06-29 05:36:43 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-06-22 11:36:56 -0600

Seen: 1,698 times

Last updated: Jun 29 '16