0
$\begingroup$

I'm currently converting depth image to laserscan, further i want to do mapping using hector slam . When i try running my code it say.

lookupTransform base_link to camera_depth_frame timed out. Could not transform laser scan into base_frame.

Can anyone please help me with this . thanks in advance. please find my launch file script below

<launch>
<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" />
 <remap from="scan" to="/scan"/> 
 </node>

  <node pkg="tf" type="static_transform_publisher" name="map_odom" args="1 0.0 0.0 0.0 0.0 1  map odom 10000" />
<node pkg="tf" type="static_transform_publisher" name="odom_bf" args="1 0.0 0.0 0.0 0.0 1  odom base_footprint 10000" />
<node pkg="tf" type="static_transform_publisher" name="bf_bl" args="1 0.0 0.0 0.0 0.0 1  base_footprint base_link 10000" />
<node pkg="tf" type="static_transform_publisher" name="bl_scan" args="1 0.0 0.0 0.0 0.0 1 base_link  scan 10000 "/>
<node pkg="tf" type="static_transform_publisher" name="bl_cdf" args="1 0.0 0.0 0.0 0.0 1  base_link  camera_depth_frame 10000" />
</launch>
$\endgroup$
1
  • $\begingroup$ after i replace 1000 from 10000 everthing was fine $\endgroup$ Nov 19, 2023 at 9:29

1 Answer 1

0
$\begingroup$

after i replace 1000 from 10000 everything was fine

Glad you figured it out, but you'd be better off using the static_transform_publisher from the tf2_ros package instead. With this newer improved node, you don't specify a period_in_millisec at all:

<node pkg="tf2_ros" type="static_transform_publisher" name="myname" args="x y z yaw pitch roll parent_frame child_frame" />
$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.