Ask Your Question

Hector_mapping not generate the map

asked 2018-08-27 05:40:54 -0600

frasar gravatar image

Hello guys, I'm novice in ROS. I'm trying a new laser scanner for generating a map, I receive the points of the laser scanner but hector_mapping not generate the map, I don't know why... P.S. I'm running Ubuntu 17.10 on Virtualbox, ROS melodic.

Unfortunately I can't post a screenshot.

my code on shell:

roslaunch xxxxxxxx_lidar ls.launch scan_mode:=104

file ls.launch

<?xml version="1.0"?>

  <!-- .launch XML config files for xxxxxxxx_lidar -->

  <param name="pub_map_odom_transform" value="true"/> 
  <param name="map_frame" value="map"/> 
  <param name="base_frame" value="base_frame"/> 
  <param name="odom_frame" value="base_frame"/>

  <arg name="ip" default="" />
  <arg name="port" default="10940" />
  <arg name="frame_id" default="lidar" />
  <arg name="point_unit" default="frame" />      <!-- frame/line -->
  <arg name="scan_mode" default="999" />         <!-- 0/1/2/3/4 -->
  <arg name="line_start" default="999" />        <!-- 0~50 -->
  <arg name="line_end" default="999" />          <!-- 0~50 -->
  <arg name="intensity" default="true" />        <!-- true/false -->
  <arg name="multi_echo" default="true" />       <!-- true/false -->
  <arg name="multi_line" default="2" />          <!-- 0/1/2 -->
  <arg name="multi_frame" default="false" />     <!-- true/false -->
  <arg name="up_side" default="true" />          <!-- true/false -->
  <arg name="distance_min" default="0.01" />     <!-- 0.01/0.0~50.0 -->
  <arg name="distance_max" default="50.0" />     <!-- 50.0/0.0~50.0 -->
  <arg name="height_min" default="-50.0" />      <!-- -50.0~-50.0 -->
  <arg name="height_max" default="50.0" />       <!-- 50.0~-50.0 -->
  <arg name="width_min" default="-50.0" />       <!-- -50.0~-50.0 -->
  <arg name="width_max" default="50.0" />        <!-- 50.0~-50.0 -->
  <arg name="pan_min" default="-180" />          <!-- -180~0 -->
  <arg name="pan_max" default="180" />           <!-- 180~0 -->
  <arg name="tilt_min" default="-90" />          <!-- -90~0 -->
  <arg name="tilt_max" default="90" />           <!-- 90~0 -->

  <node pkg="xxxxxxxx_lidar" name="xxxxxxxx_lidar" type="xxxxxxxx_lidar">
    <!-- Attributes: name="namespace/name" value="value" type="str|int|bool" -->
    <param name="ip" value="$(arg ip)" type="str"/>
    <param name="port" value="$(arg port)" type="int"/>
    <param name="frame_id" value="$(arg frame_id)" type="str"/>
    <param name="point_unit" value="$(arg point_unit)" type="str"/>
    <param name="scan_mode" value="$(arg scan_mode)" type="int"/>
    <param name="line_start" value="$(arg line_start)" type="int"/>
    <param name="line_end" value="$(arg line_end)" type="int"/>
    <param name="intensity" value="$(arg intensity)" type="bool"/>
    <param name="multi_echo" value="$(arg multi_echo)" type="bool"/>
    <param name="multi_line" value="$(arg multi_line)" type="int"/>
    <param name="multi_frame" value="$(arg multi_frame)" type="bool"/>
    <param name="up_side" value="$(arg up_side)" type="bool"/>
    <param name="distance_min" value="$(arg distance_min)" type="str"/>
    <param name="distance_max" value="$(arg distance_max)" type="str"/>
    <param name="height_min" value="$(arg height_min)" type="str"/>
    <param name="height_max" value="$(arg height_max)" type="str"/>
    <param name="width_min" value="$(arg width_min)" type="str"/>
    <param name="width_max" value="$(arg width_max)" type="str"/>
    <param name="pan_min" value="$(arg pan_min)" type="str"/>
    <param name="pan_max" value="$(arg pan_max)" type="str"/>
    <param name="tilt_min" value="$(arg tilt_min)" type="str"/>
    <param name="tilt_max" value="$(arg tilt_max)" type="str"/>

  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find xxxxxxxx_lidar)/tool/ls.rviz" />

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


file mapping_xxxxxxxx.launch:

    <?xml version="1.0 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-27 12:20:10 -0600

First off, it makes this alot more challenging for volunteers to try to help you if your obscure your setup with xxxxxxx as the unit name.

Secondly, I'd ensure you have things coming through the topic SLAM expects the scan through and there is a TF tree. Any errors from Hector?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-08-27 05:40:54 -0600

Seen: 171 times

Last updated: Aug 27 '18