Ask Your Question

World Frame Problem

asked 2015-12-17 18:34:32 -0500

kursatufuk gravatar image

updated 2016-01-08 09:36:33 -0500

mgruhler gravatar image

Hi friend. I have a problem. I want to run my Bag file with nav2d_karto. So I use these launch file:


    <!-- Some general parameters -->
    <param name="use_sim_time" value="true" />
    <rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>
        <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="lsm_node" output="screen">
        <param name="laser_topic" type="string" value="scan" />
        <param name="publish_pose_stamped" type="bool" value="true" />
        <param name="fixed_frame" value = "odom"/>
            <param name="base_frame" value="base_link"/>
        <param name="fixed_frame" value="world"/>
            <param name="use_alpha_beta" value="true"/>
            <param name="use_odom" value="false"/>
            <param name="use_imu" value="false"/>
            <param name="max_iterations" value="10"/>
            <param name="publish_pose" value="true"/>
            <param name="publish_tf" value="true"/>
            <param name="use_vel" value="false"/>

<!-- lsm'nin yayınladığı /pose2D topic'ini kullanarak /odom topic'i publish eder  -->
        <node pkg="pose2d_to_odom" type="pose2d_to_odom" name="odom_lsm"/>

<!-- robot_pose_ekf launcher -->
<!-- farkli kaynaklardan verileri birlestirmek icin -->

    <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
        <!-- odom kullanılıyor -->
        <param name="odom_used" value="true"/>
        <!-- atalet duyargası off -->
            <param name="imu_used" value="false"/>
        <!-- çıktı frame'i odom -->
        <param name="output_frame" value="odom"/>
    <!-- Mapper node'unu başlat-->
    <node name="Mapper" pkg="nav2d_karto" type="mapper">   <!-- mapper, MapperNode-->
        <!-- parametreleri buradan ayarlıyoruz -->
        <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/>
        <remap from="base_scan" to="scan"/>
    <!-- birden fazla koordinatı takip edebilmek için kullanılır tf -->
    <!-- parametreleri args="x y z yaw pitch roll frame_id child_frame_id period_in_ms"-->
    <!-- yaw: Z ekseni, pitch: Y ekseni, roll: X ekseni açısı -->
    <node pkg="tf" type="static_transform_publisher" name="tf1" args="0.0 0.0 0.0 0.0 0.0 0.0 /base_footprint /base_link 100" />
    <node pkg="tf" type="static_transform_publisher" name="tf2" args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /base_laser_link 100" />
    <node pkg="tf" type="static_transform_publisher" name="tf3" args="0.0 0.0 0.0 0.0 0.0 0.0 /base_laser_link /laser 100" /> 
    <!-- world en baş frame'dir 0,0,0 -->
    <!--<node pkg="tf" type="static_transform_publisher" name="tf4" args="0.0 0.0 0.0 0.0 0.0 0.0 /world /map 100" />-->
    <!--<param name="robot_description" command="cat $(find turtlebot_description)/urdf/turtlebot_gazebo.urdf.xacro" />-->
    <node pkg="rosbag" type="play" name="rosbag" output="screen" args="--clock /home/kursat/Bag/dekanlik.bag" />
    <!-- alt_laser_imu , bahce_laser_imu , ust_laser_imu , meydan_laser_imu, dekanlik -->

And my TF tree:

image description

Why the TF tree has a World frame? I really don't know. Is it normal?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-01-08 09:39:55 -0500

mgruhler gravatar image

Yes, this is normal in this case. You actually start the lase_scan_matcher_node with the fixed_frame parameter set to world. This is where this comes from.

However, as far as I understand the laser_scan_matcher, you cannot have this running alongside the karto Mapper, as both will provide a world/map->base_link transform, if configured correctly. This is not allowed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-12-17 18:34:32 -0500

Seen: 116 times

Last updated: Jan 08 '16