Robotics StackExchange | Archived questions

What transforms do I need to publish in order to make robot_pose_ekf and slam_gmapping happy?

Or, put differently, what does a correct tf graph look like if I am using robotposeekf and slam_gmapping?

I have been trying to use robotposeekf to integrate my wheel odometry and IMU data for slam Gmapping. I am confused by all of the transforms that occur within the nodes I am running, and by the transforms that I am expected to establish myself. My maps look bad, but I cannot tell whether it is because my TFs are all wrong, but it has been difficult to find online precisely what TFs I need to establish in order for robotposeekf and slam_gmapping to do their job.

I have the following topics:

Right out of the gate, segway_rmp_node invokes tf to generate a transform from odom to base_link. This is the point at which I get confused. What transforms do I need to make in order to make robot_pose_ekf and slam_gmapping happy?

I figure that I ought to relate base_footprint with base_link, base_link with LLA, and base_link with laser. However, given the launch file below, this generates no map at all. So I replace base_link with base_footprint, but that yields warnings that there is no relation between base_link and map or odom to map. Whose job is it to generate that tf?

My launch file is below:

<launch>
    <node pkg="vectornav" type="vn200_node" name="vectornav_vn200" />
    <node pkg="vectornav" type="vn_sensor_msgs.py" name="vn_sensor_msgs" args="Imu:=imu_data" />
    <node pkg="segway_rmp" type="segway_rmp_node" name="segway_rmp_node" args="_serial_port:=/dev/ttyUSB1 /segway_rmp_node/odom:=/odom" />

    <node pkg="urg_node" type="urg_node" name="short_range_laser">
        <param name="angle_min" value="-1.571" />
        <param name="angle_max" value="1.571" />
    </node>

    <node pkg="tf" type="static_transform_publisher" name="base_footprint_LLA_tf" args="0 0 0.25 0 0 0 base_footprint LLA 1000" />
    <node pkg="tf" type="static_transform_publisher" name="laser_base_tf" args=".553 .114 .342 0 0 0 base_footprint laser 1000" />
    <node pkg="tf" type="static_transform_publisher" name="basefoot_baselink" args="0 0 0.25 0 0 0 base_footprint base_link 1000" />

    <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf"/>
    <node pkg="gmapping" type="slam_gmapping" name="mapping">
        <param name="odom_frame" value="odom_combined" />
    </node>
    <node pkg="teleop_twist_joystick" type="teleop_twist_joystick.py" name="teleop_twist_joystick"/>
    <node pkg="rviz" type="rviz" name="rviz"/>


</launch>

Asked by acarrillo on 2014-03-12 17:59:57 UTC

Comments

Just stumbled upon this as an unanswered question. Did you find a solution or is this still relevant for you?

Asked by demmeln on 2014-03-28 01:14:57 UTC

rosrun tf view_frames to see if you have a proper tf tree

Asked by aswin on 2014-05-12 16:38:15 UTC

Answers