Problem with hector slam [closed]

asked 2014-01-20 20:13:10 -0600

hamid gravatar image

updated 2014-01-28 17:19:06 -0600

ngrennan gravatar image

Hi I have tried to get map from my urg 04lx laser scanner from hector slam for this I wrote this launch file to do my job:

<launch>

<param name="/use_sim_time" value="false"/>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping"    output="screen">

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="true"/>
<!-- Map size / start point -->
<param name="map_resolution" value="0.025"/>
<param name="map_size" value="4028"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="laser_z_min_value" value="-2.5" />
<param name="laser_z_max_value" value="7.5" />

<!-- Map update parameters -->
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.7" />    
<param name="map_update_distance_thresh" value="0.2"/>
<param name="map_update_angle_thresh" value="0.1" />
</node>

<node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster"      args="0 0 0 0 0 0 /base_link /laser 100" />  

<arg name="trajectory_source_frame_name" default="base_link"/>
<arg name="trajectory_update_rate" default="4"/>
<arg name="trajectory_publish_rate" default="0.25"/>

<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="$(arg trajectory_source_frame_name)" />
<param name="trajectory_update_rate" type="double" value="$(arg trajectory_update_rate)" />
<param name="trajectory_publish_rate" type="double" value="$(arg trajectory_publish_rate)" />
</node>


<node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
<remap from="map" to="/dynamic_map" />
<param name="map_file_path" type="string" value="/home/hamid/Desktop/maps" />
<param name="map_file_base_name" type="string" value="uprobotics" />
<param name="geotiff_save_period" type="double" value="0" />
<param name="draw_background_checkerboard" type="bool" value="true" />
<param name="draw_free_space_grid" type="bool" value="true" />
</node>
</launch>

but when I launch This launch File I got this err

[ERROR] [1390290830.592762863]: Trajectory Server: Transform from /map to base_link failed: "map" passed to lookupTransform argument target_frame does not exist.

And one more thing in /home/hamid/Desktop/maps I do not have any map,how can I fix this?

Kind Regards, hamid

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by hamid
close date 2017-12-11 01:40:12.893215

Comments

Hi, just to check if you got hokuyo node for your hector slam it was not stated in your launch file.

saunders gravatar imagesaunders ( 2014-01-20 20:38:27 -0600 )edit

I ran urg_node(hokuyo_node) before launch my launch file

hamid gravatar imagehamid ( 2014-01-21 03:05:21 -0600 )edit

Hi, it appears that the cause of the problem is because you set the "use_tf_pose_start_estimate" to value="true". If you set it to false, it should be able to work.

saunders gravatar imagesaunders ( 2014-01-21 13:44:00 -0600 )edit