Robotics StackExchange | Archived questions

Ros indigo + RPLIDAR 360 + Hector SLAM

Hi everyone, I'm new in this topic. I've installed SDK for my laser scanner, RPLidar to talk with ROS and HectorSLAM, but... now I need to make a complete map like in this video: https://www.youtube.com/watch?v=Cfq3s4-H2S4 , but i can't get anything in rviz. I have connection with scanner because when i'm running viewrplidar.launch I can see some data. I can load some bagfile and see someone's map, according to this page: http://wiki.ros.org/hector_slam/Tutorials/MappingUsingLoggedData

I found this page, done everything like in instruction but still nothing: https://hackaday.io/project/7284-oscar-omni-service-cooperative-assistant-robot/log/26164-first-foray-into-ros

Only error from rviz is: No tf data. Actual error: Fixed Frame [map] does not exist

My mapping_default.launch file:

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

<include file="$(find rplidar_ros)/launch/rplidar.launch" /> 




<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_frame"/>
<param name="odom_frame" value="/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="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="$(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 /base_frame /laser 100"/>

<!-- this publishes the transform between the base and laser -->

<!--<node pkg="tf" type="static_transform_publisher" name="base_laser_broadcaster" args="0.0 0.0 0.0 0.0 0.0 0.0 /base_frame /laser_frame 40"/>-->

</launch>

Screenshoot from rqt_graph: screenshot

I'm trying to deal with this for a week and I'm out of any ideas... Did anyone had this problem?

Asked by Mondiegus on 2016-05-02 10:19:52 UTC

Comments

Answers