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

hector_slam + hector_mapping + RVIZ

asked 2012-06-29 05:39:40 -0500

sjigi123 gravatar image

updated 2014-01-28 17:12:51 -0500

ngrennan gravatar image

Hello,

I need some advice or clarification of how to use hector_slam stack with rviz. I want to do the same video as we can see http://www.ros.org/wiki/hector_slam Do I am doing something wrong ? - I am using only an hokuyo - I am not using odometry or IMU ( no pitch no roll) - I used this launch file :

<launch>

<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">


</node>

<include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"/> </launch>

Then I started hokuyo node and rviz but nothing appear on rviz and I still get error with /map doesnt exist

Hope you can help me Thanks a lot for taking time to help or advice me.

edit retag flag offensive close merge delete

Comments

<launch>

<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

<param name="use_tf_scan_transformation" value="true"/> <param name="use_tf_pose_start_estimate" value="false"/> <param name="scan_topic" value="scan"/>

sjigi123 gravatar image sjigi123  ( 2012-06-29 05:40:08 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-07-03 20:01:13 -0500

This sounds like you might have set the laser scanner topic name incorrectly. On which topic is your laser publishing? (Please edit your question accordingly and do not post a answer)

edit flag offensive delete link more
1

answered 2015-08-04 15:18:06 -0500

casper911ca gravatar image

I'm trying to do this as well with the RPLIDAR. I've been struggling for weeks to little avail. I cannot seem to get a live SLAM map onto rvis. I'm not using lidar for mechatronics, I'm using it as a tool for creating fast models of interior spaces - so basically, this is all I need. I also haven't successfully sent a .bag file through any of the slam algorithm plugins. With my current launch file all i get is a real time map.

Here is my .launch file:

<!--
  Used for visualising rplidar in action.  

  It requires rplidar.launch.
 -->
<launch>
  <include file="$(find rplidar_ros)/launch/rplidar.launch" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/rplidar.rviz" />
  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
    <!-- Frame Names -->
    <param name="base_frame" value="base_link" />
    <!-- param name="base_frame" value="/laser" -->
    <param name="map_frame" value="map" />
    <param name="odom_frame" value="base-link" />
    <!-- param name="odom_frame" value="/laser" -->

    <!-- 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="2048"/>
    <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="5"/>
    <param name="scan_topic" value="/laser/scan"/>
    <!-- param name="scan_topic" value="/laser/scan" -->

    <param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />
  </node>


  <node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 50" />
<node pkg="tf" type="static_transform_publisher" name="laser_link" args="0.031 0.0 0.251 0.0 0.0 0.0 /base_frame /laser 100" />
  <node pkg="tf" type="static_transform_publisher" name="map_2_base_footprint" args="0 0 0 0 0 0 /map /base_footprint 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_footprint_2_base_link" args="0 0 0 0 0 0 /base_footprint /base_link 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_link_2_base_stabilized_link" args="0 0 0 0 0 0 /base_link /base_stabilized 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_stablized_2_base_frame" args="0 0 0 0 0 0 /base_stabilized /base_frame 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_2_nav_link" args="0 0 0 0 0 0 /base_frame /nav 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_frame_2_laser_link" args="0 0 0 0 0 0 /base_frame /laser_link 100"/> 
   <!-- cnode pkg="tf" type="static_transform_publisher" name="imu_link" args="-0.049 0.0 0.180 0.0 0.0 0.0 /base_link /imu 50" -->

<!-- 
  <node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
    <param name="target_frame_name" type="string" value="/map" />
    <param name="source_frame_name" type="string" value="laser" />
    <param name="trajectory_update_rate" type="double" value="4" />
    <param name="trajectory_publish_rate" type="double" value="0.25" />
  </node>

  <node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
    <remap from="map" to ...
(more)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-06-29 05:39:40 -0500

Seen: 2,995 times

Last updated: Aug 04 '15