URG-04LX / RPLIDAR - lookupTransform base_link to laser
First of all thank you for your future answers.
I have been searching the forum for an explanation for the following error, but I can not find it.
I use the same code in two different robots with the same topics.
In the first one, which uses a hokuyo URG-04LX and publishes the scan topic, I run hector_mapping and hector_geotiff launches and with that I can make my map correctly.
On the other run, which uses a RPLIDAR and also publishes the scan topic, I do the same and I get the following error:
[ INFO] [1502821857.396404571]: lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.
If I run a "rosrun tf view_frames" i get odom -> base_link -> laser, so the transform between the base_link and the laser seems to be correct. So why I get the error?
Here is my hector_mapping launch file:
<launch>
<arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
<arg name="base_frame" default="base_link"/>
<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" />
</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>
Thank you!
I'm a little confused. Are you running the code on the same master on two different robots at the same time using the same topic names?
No, in different masters.
My new question is: why if I run the rplidar node before the hector_mapping launcher I get the error:
But if I run hector_mapping and hector_geotiff launchers before run the rplidar node everything is fine and I get the map?
If you have a new question then you should create a new one.