The map is drawn in multiple layers.How to solve tihs

asked 2018-04-06 04:31:16 -0500

DongHyeong Kang gravatar image

updated 2018-04-06 20:14:15 -0500

First, my english is bad, please understand

I trying 2D mapping in rviz(hector slam, without odometry) as rplida A2

I success to 2d mapping but that is not complete.

attach screenshot

image description

Even if rplidar was rotated the map should not too. (Probably)

But this picture seems to be not.

When the rplider worked without rotation, the red rectangle was generated.

The blue rectangle was created when the rplider rotated

what's problem?

my launch file:

  <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_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 pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 /base_frame /laser 100"/>

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

I would appreciate your help

+Order of execution

$ roslaunch rplidar_ros view_slam.launch   (terminal 1)

$ roslaunch hector_mapping mapping_default.launch (terminal 2)
  • This error (:SearchDir angle change too large) occurs when the map overlaps
edit retag flag offensive close merge delete



Please attach your image(s) directly to the question.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-06 04:48:14 -0500 )edit

Please wait i will try after go home

DongHyeong Kang gravatar image DongHyeong Kang  ( 2018-04-06 06:12:28 -0500 )edit

Please let know this problem TT

DongHyeong Kang gravatar image DongHyeong Kang  ( 2018-04-06 20:03:06 -0500 )edit

I think you rotate the lidar too fast.

ahendrix gravatar image ahendrix  ( 2018-04-06 23:42:07 -0500 )edit

Hm.. probably not I see many post about similar problem So I had tried to rotating lidar slowly but same problem was generated

DongHyeong Kang gravatar image DongHyeong Kang  ( 2018-04-07 00:07:28 -0500 )edit

What problem be generated if the range is shorter than the measuring space?(sorry to grammer..)

DongHyeong Kang gravatar image DongHyeong Kang  ( 2018-04-07 00:28:06 -0500 )edit