Hector_mapping cannot laser scan into base_frame
Hi guys. Thanks for your attention in advance.
I am using hector_mapping with Hokuyo URG-04LX-UG01 and ROS INDIGO.
The problem has appeared in other occasions, but following indications of other questions hasn't solved it.
So, once again, the problem is, when I run the hectormapping node and the hokuyonode at the same time,
$ rosrun hokuyonode hokuyonode
$ rosrun hectormapping hectormapping
it appears this error:
[ INFO] [1469723827.101706930]: lookupTransform baselink to laser timed out. Could not transform laser scan into baseframe.
I've seen that the solution goes through changing some parameters in the launch file of the hectormapping. I've tried but it's still not working. I attach here the **mappingdefault.launch** (opt/ros/indigo/share/hectormapping/launch/mappingdefault.launch).
<?xml version="1.0"?>
<launch>
<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_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="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="$(a
rg 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="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 100"/>-->
</launch>
Again, thanks a lot. A detailed answer would be super appreciated.
Asked by thepirate16 on 2016-07-28 11:49:06 UTC
Comments
It sounds like nothing is broadcasting the transform from
base_link
to the LiDAR's frame (laser
?) See my answer here: http://answers.ros.org/question/234365/hector_slam-not-working-with-my-bag-file/?answer=234368#post-id-234368Asked by spmaniato on 2016-07-28 12:05:45 UTC
And also this answer for how to add the aforementioned
static_transform_publisher
: http://answers.ros.org/question/227533/issues-staring-tfstatic_transform_publisher-for-neato-xv-11/?answer=228043#post-id-228043Asked by spmaniato on 2016-07-28 12:07:06 UTC
Thanks @spmaniato! I'll do that, I'll be back soon with (I hope) results.
Asked by thepirate16 on 2016-07-29 05:54:41 UTC