ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Tom Moore's answer is correct (thanks again!), but I want to report what my final launch file looks like.

There is an error with my launch file above, and I would hate for someone to be misled by it. I was under the impression that the sensor variable prefixes ("odom", "imu", "pose", and "twist") used in the documentation were simply convention, and that the localization nodes keyed off of the types of the messages coming from each sensor. But that isn't true--the prefixes are the key--and variables that don't have the right prefix are ignored. So if you are feeding data from navsat_transform_node, then use an "odom" prefix!

I also removed some redundant configuration from my launch file.

<launch>
  <node pkg="robot_localization" type="ukf_localization_node"
    name="ukf_localization" clear_params="true" ns="ackermann_vehicle">

    <param name="frequency" value="30"/>
    <param name="sensor_timeout" value="2"/>

    <param name="imu0" value="imu/data"/>
    <rosparam param="imu0_config">[false, false, false,
                                   true,  true,  true,
                                   false, false, false,
                                   false, false, false,
                                   true,  true,  true]</rosparam>
    <param name="imu0_differential" value="true"/>
    <param name="imu0_remove_gravitational_acceleration" value="true"/>

    <param name="odom0" value="odometry/gps"/>
    <rosparam param="odom0_config">[true,  true,  true,
                                   false, false, false,
                                   false, false, false,
                                   false, false, false,
                                   false, false, false]</rosparam>
  </node>

  <node pkg="robot_localization" type="navsat_transform_node"
      name="navsat_transform_node" ns="ackermann_vehicle" respawn="true" output="screen">
    <param name="magnetic_declination_radians" value="0"/>
  </node>
</launch>