Skip to content

Instantly share code, notes, and snippets.

@CJ-Davies
Created October 5, 2017 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CJ-Davies/4eb6fe083eae73bf253a64114641ba05 to your computer and use it in GitHub Desktop.
Save CJ-Davies/4eb6fe083eae73bf253a64114641ba05 to your computer and use it in GitHub Desktop.
<launch>
<!-- ======= ======= ======= ======= ======= ======= ======= -->
<!-- Specifies the transform between the 'imu' frame that IMU data are reported on, & the base_link frame. -->
<node pkg="tf" type="static_transform_publisher" name="base_link_to_imu_transform" args="0 0 0 0 0 0 base_link imu 100" />
<!-- ======= ======= ======= ======= ======= ======= ======= -->
<!-- subscribes to /nmea_sentence which is raw NMEA data from Arduino/node, converts to sensor_msgs/NavSatFix format & publishes on /fix -->
<node pkg="nmea_navsat_driver" type="nmea_topic_driver" name="nmea_topic_driver" respawn="true">
</node>
<!-- ======= ======= ======= ======= ======= ======= ======= -->
<!-- subscribes to /odometry/gps (GPS data as odometry from navsat_transform_node) & /imu/data (IMU data from Arduino/node) & publishes on /odometry/filtered -->
<node pkg="robot_localization" type="ukf_localization_node" name="ukf_localization_node" respawn="true" clear_params="true">
<param name="imu0" value="/imu/data" />
<!-- specifies what values the IMU data provides (order is position [F], orientation [T], velocity [F], angular velocity [T], linear acceleration [T] ) -->
<rosparam param="imu0_config">
[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]
</rosparam>
<param name="odom0" value="/odometry/gps" />
<!-- specifies what values the odometry data provies (order is position [T], orientation [F]. velocity [F], angular velocity [F], linear acceleration [F] ) -->
<rosparam param="odom0_config">
[true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]
</rosparam>
<param name="frequency" value="2" />
<param name="sensor_timeout" value="2" />
<param name="two_d_mode" value="false" />
</node>
<!-- ======= ======= ======= ======= ======= ======= ======= -->
<!-- subscribes to /imu/data (sensor_msgs/Imu), /odometry/filtered (nav_msgs/Odometry) & /gps/fix (sensor_msgs/NavSatFix)
publishes to /odometry/gps (nav_msgs/Odometry) & /gps/filtered (sensor_msgs/NavSatFix) -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<remap from="/gps/fix" to="/fix" />
<param name="magnetic_declination_radians" value="0.038106" />
<param name="publish_filtered_gps" value="true" />
<param name="broadcast_utm_transform" value="false" />
<param name="wait_for_datum" value="false" />
<param name="frequency" value="10" />
<param name="yaw_offset" value="1.5707963" />
<param name="use_odometry_yaw" value="false" />
</node>
<!-- ======= ======= ======= ======= ======= ======= ======= -->
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment