Robotics StackExchange | Archived questions

Hector exploration issue

Hey guys,

I have manged to send the velocities from hector exploration controller to start mapping the room. However, i have encountered some issues with it. I attach two links below, first is what kind of movement i experience, and second is the one i am trying to aim to: https://www.youtube.com/watch?v=A0CHcsnQsaM&feature=youtu.be <--- our robot, trying to map the room while using exploration node from hectornavigation package. https://www.youtube.com/watch?v=A0CHcsnQsaM&feature=youtu.be <--- video from ros wiki, where the movement of the robot is much more smoother compared to mine. I do understand that my robot uses skidsteering compared to the one that was in robocup where all wheels can turn. However, i don't think it is only because of that, so i was maybe thinking it might be with some parameters i have. Worth noting, robot doesnt have odometry, i only rely on laser scan data. Robot is controlled by arduino. Additional question, when it explores, even though the area is mapped, when looking at rviz, robot keeps running and running. Do i need to stop the movement myself or it does it until completely explores (in my case it seemed it did the same route 2 times at least)? Thanks in advance for the answer. My hectorslam launch file:

<launch>

<param name="/use_sim_time" value="false"/>ros

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

</launch>

My hector_mapping launch file:

 <?xml version="1.0"?>

    <launch>
      <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
      <arg name="base_frame" default="base_link"/>
      <arg name="odom_frame" default="base_link"/>
      <arg name="pub_map_odom_transform" default="tr

ue"/>
  <arg name="scan_subscriber_queue_size" default="5"/>
  <arg name="scan_topic" default="scan"/>
  <arg name="map_size" default="3072"/>

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

    <!-- 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.025"/>
    <param name="map_size" value="1024"/>

<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.1"/>
<param name="map_update_angle_thresh" value="0.01" />

<param name="map_pub_period" value="2.0" />
<param name="laser_min_dist" value = "0.1" />
<param name="laser_max_dist" value = "5.0" />
<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 0 0 0 0 0 /base_link /laser 100" /> 

    </launch>

Then my hectorexplorationnode launch file

<launch>
<node pkg="hector_costmap" type="hector_costmap" name="hector_costmap" output="screen" respawn="false">
    <param name="cost_map_topic" value="cost_map" />
    <param name="map_frame_id" value="map" />
    <param name="local_transform_frame_id" value="base_footprint" />
    <param name="initial_free_cells_radius" value="0.3" />
    <param name="update_radius" value="4.0"/>
    <param name="costmap_pub_freq" value="4.0" />
    <param name="sys_msg_topic" value="syscommand" />

    <param name="use_grid_map" value="true" />
    <param name="grid_map_topic" value="scanmatcher_map" />

    <param name="use_elevation_map" value="true" />
    <param name="elevation_map_topic" value="elevation_map_local" />

    <param name="use_cloud_map" value="false" />
    <param name="cloud_topic" value="openni/depth/points" />

<!-- Not necessary to set, set by dynamic reconfigure -->
    <!--param name="max_delta_elevation" value="0.08"/-->
    <!--param name="allow_elevation_map_to_clear_occupied_cells" value="true" /-->
    <!--param name="max_clear_size" value="4" /-->
    <!--param name="slize_min_height" value="0.3" /-->
    <!--param name="slize_max_height" value="0.4" /-->
<!-- Not necessary to set, set by scanmatcher -->
    <!--param name="map_resolution" value="0.05" /-->
    <!--param name="max_grid_size_x" value="1024" /-->
    <!--param name="max_grid_size_y" value="1024" /-->
<!-- Not necessary to set, set by elvation_mapping -->
    <!-- param name="elevation_resolution" value="0.01" / -->
</node>

<node pkg="hector_driving_aid_markers" type="driving_aid_marker_node" name="hector_driving_aid_markers" output="screen">
    <param name="left_side_y_outer" value="0.205"/>
    <param name="left_side_y_inner" value="0.11"/>
    <param name="right_side_y_outer" value="-0.205"/>
    <param name="right_side_y_inner" value="-0.11"/>
</node>

<node pkg="nodelet" type="nodelet" name="ElevationMapping" args="load hector_elevation_mapping/ElevationMapping openni_nodelet_manager" output="screen">
    <param name="elevation_resolution" value="0.01" />
    <param name="elevation_zero_level" value="16384" />
    <param name="min_observable_elevation" value="-1.0" />
    <param name="max_observable_elevation" value="0.5" />
    <param name="max_observable_distance" value="4.0" /> 
    <param name="sensor_variance" value="0.001" />   
    <param name="map_frame_id" value="map" />
    <param name="local_map_frame_id" value="base_stabilized" />
    <param name="local_elevation_map_topic" value="elevation_map_local" />
    <param name="gloabl_elevation_map_topic" value="elevation_map_global" />
    <param name="point_cloud_topic" value="openni/depth/points"/>
    <param name="grid_map_topic" value="scanmatcher_map"/>
    <param name="sys_msg_topic" value="syscommand" />
    <param name="publish_poseupdate" value="false" />
    <param name="poseupdate_pub_period" value="1.0" />
    <param name="poseupdate_height_covariance" value="0.25" />
    <param name="poseupdate_used_pattern_size" value="3" />
<!-- Not necessary to set, set by scanmatcher -->
    <!--param name="map_resolution" value="0.05" /-->
    <!--param name="max_grid_size_x" value="1024" /-->
    <!--param name="max_grid_size_y" value="1024" /-->
</node>

<node pkg="hector_elevation_mapping" type="ElevationMappingNode" name="ElevationMapping_1"  output="screen">
    <param name="elevation_resolution" value="0.01" />
    <param name="elevation_zero_level" value="16384" />
    <param name="min_observable_elevation" value="-1.0" />
    <param name="max_observable_elevation" value="0.5" />
    <param name="max_observable_distance" value="4.0" /> 
    <param name="sensor_variance" value="0.001" />   
    <param name="map_frame_id" value="map" />
    <param name="local_map_frame_id" value="base_stabilized" />
    <param name="local_elevation_map_topic" value="elevation_map_local" />
    <param name="gloabl_elevation_map_topic" value="elevation_map_global" />
    <param name="point_cloud_topic" value="openni/depth/points"/>
    <param name="grid_map_topic" value="scanmatcher_map"/>
    <param name="sys_msg_topic" value="syscommand" />
    <param name="publish_poseupdate" value="false" />
    <param name="poseupdate_pub_period" value="1.0" />
    <param name="poseupdate_height_covariance" value="0.25" />
    <param name="poseupdate_used_pattern_size" value="3" />
<!-- Not necessary to set, set by scanmatcher -->
    <!--param name="map_resolution" value="0.05" /-->
    <!--param name="max_grid_size_x" value="1024" /-->
    <!--param name="max_grid_size_y" value="1024" /-->
</node>

<node pkg="hector_elevation_visualization" type="hector_elevation_visualization" name="hector_elevation_visualization" output="screen" respawn="false">
    <param name="max_height_levels" value="10" />
    <param name="max_height" value="1.0" />
    <param name="elevation_map_frame_id" value="/elevation_map_local" />
    <param name="sys_msg_topic" value="/syscommand" />
</node>

<node pkg="hector_exploration_node" type="exploration_planner_node" name="hector_exploration_node" output="screen">

    <rosparam file="$(find hector_exploration_node)/config/costmap.yaml" command="load" />

</node>

</launch>

And i launch the hectorexplorationcontroller as a node separately.

Asked by EdCherie on 2016-10-31 10:14:18 UTC

Comments

Answers