# Revision history [back]

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

header: seq: 9355 stamp: secs: 1484232874 nsecs: 552879627 frame_id: gps status: status: 1 service: 1 latitude: 59.6727308353 longitude: 10.7179627288 altitude: 97.3549933056 position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] position_covariance_type: 0

header: seq: 9356 stamp: secs: 1484232874 nsecs: 636842456 frame_id: gps status: status: 0 service: 1 latitude: 59.6727627988 longitude: 10.718035228 altitude: 122.657179707 position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] position_covariance_type: 0

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

header:
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0 0

seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 00


### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

---
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0
---
seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0


### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

---
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [1.0, [0.0016, 0.0, 0.0, 0.0, 1.0, 0.0016, 0.0, 0.0, 0.0, 1.0]
0.0016]
position_covariance_type: 0
---
seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0


EDIT 2:

The covariance matrices have been updated to reflect the correct and relevant info (previous edit updated).

The filter seems to be set up correctly now, however, I'm getting a lot of vertical drift. I would expect this to be corrected by the gps points (both SPP and RTK) which should at least restrict the bounds of the drift but it does not seems to be constrained in any way. This occurs even when both zero_altitude and two_d_mode are set to true. My current launch file is shown below.

<launch>

<!-- Global (map) EKF instance -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_ontrack_global" clear_params="true">
<param name="frequency"       value="30"/>
<param name="sensor_timeout"  value="0.1"/>
<param name="two_d_node"      value="true"/>

<param name="map_frame"       value="map"/>
<param name="odom_frame"      value="odom"/>
<param name="world_frame"     value="map"/>

<param name="transform_time_offset" value="0.0"/>

<param name="odom0" value="/gps/rtkfix"/>
<param name="imu0"  value="/imu/data"/>

<!-- RTK -->
<rosparam param="odom0_config">[true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>

<!-- IMU -->
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>

<param name="odom0_differential"                      value="false"/>
<param name="imu0_differential"                       value="false"/>

<param name="odom0_relative"                          value="false"/>
<param name="imu0_relative"                           value="false"/>

<param name="imu0_remove_gravitational_acceleration"  value="true"/>
<param name="print_diagnostics"                       value="true"/>

<param name="odom0_queue_size"                        value="10"/>
<param name="imu0_queue_size"                         value="10"/>

<param name="debug"                                   value="false"/>
<param name="debug_out_file"                          value="debug_ekf.txt"/>

<remap from="monitor/odometry/filtered"  to="/monitor/odometry/global"/>

</node>
<!-- Global (map) EKF instance -->

<!-- Navsat node transform -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="frequency"                     value="30"/>
<param name="delay"                         value="3"/>
<param name="yaw_offset"                    value="0"/>
<param name="zero_altitude"                 value="true"/>
<param name="publish_filtered_gps"          value="true"/>
<param name="use_odometry_yaw"              value="false"/>
<param name="wait_for_datum"                value="false"/>

<rosparam param="datum">[59,66727, 10.77337, 0.0, map, odom]</rosparam>

<remap from="/imu/data"           to="/monitor/imu/data"/>
<remap from="/gps/fix"            to="/monitor/gps/fix"/>
<remap from="/odometry/filtered"  to="/monitor/odometry/global"/>

</node>
<!-- Navsat node transform -->
</launch>


Have I got this all wrong?

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

---
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [0.0016, 0.0, 0.0, 0.0, 0.0016, 0.0, 0.0, 0.0, 0.0016]
position_covariance_type: 0
---
seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0


EDIT 2:

The covariance matrices have been updated to reflect the correct and relevant info (previous edit updated).

The filter seems to be set up correctly now, however, I'm getting a lot of vertical drift. I would expect this to be corrected by the gps points (both SPP and RTK) which should at least restrict the bounds of the drift but it does not seems seem to be constrained in any way. This occurs even when both zero_altitude and two_d_mode are set to true. My current launch file is shown below.

<launch>

<!-- Global (map) EKF instance -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_ontrack_global" clear_params="true">
<param name="frequency"       value="30"/>
<param name="sensor_timeout"  value="0.1"/>
<param name="two_d_node"      value="true"/>

<param name="map_frame"       value="map"/>
<param name="odom_frame"      value="odom"/>
<param name="world_frame"     value="map"/>

<param name="transform_time_offset" value="0.0"/>

<param name="odom0" value="/gps/rtkfix"/>
<param name="imu0"  value="/imu/data"/>

<!-- RTK -->
<rosparam param="odom0_config">[true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>

<!-- IMU -->
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>

<param name="odom0_differential"                      value="false"/>
<param name="imu0_differential"                       value="false"/>

<param name="odom0_relative"                          value="false"/>
<param name="imu0_relative"                           value="false"/>

<param name="imu0_remove_gravitational_acceleration"  value="true"/>
<param name="print_diagnostics"                       value="true"/>

<param name="odom0_queue_size"                        value="10"/>
<param name="imu0_queue_size"                         value="10"/>

<param name="debug"                                   value="false"/>
<param name="debug_out_file"                          value="debug_ekf.txt"/>

<remap from="monitor/odometry/filtered"  to="/monitor/odometry/global"/>

</node>
<!-- Global (map) EKF instance -->

<!-- Navsat node transform -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="frequency"                     value="30"/>
<param name="delay"                         value="3"/>
<param name="yaw_offset"                    value="0"/>
<param name="zero_altitude"                 value="true"/>
<param name="publish_filtered_gps"          value="true"/>
<param name="use_odometry_yaw"              value="false"/>
<param name="wait_for_datum"                value="false"/>

<rosparam param="datum">[59,66727, 10.77337, 0.0, map, odom]</rosparam>

<remap from="/imu/data"           to="/monitor/imu/data"/>
<remap from="/gps/fix"            to="/monitor/gps/fix"/>
<remap from="/odometry/filtered"  to="/monitor/odometry/global"/>

</node>
<!-- Navsat node transform -->
</launch>


Have I got this all wrong?

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

---
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [0.0016, 0.0, 0.0, 0.0, 0.0016, 0.0, 0.0, 0.0, 0.0016]
position_covariance_type: 0
---
seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0


EDIT 2:

The covariance matrices have been updated to reflect the correct and relevant info (previous edit updated).

The filter seems to be set up correctly now, however, I'm getting a lot of vertical drift. I would expect this to be corrected by the gps points (both SPP and RTK) which should at least restrict the bounds of the drift but it does not seem to be constrained in any way. This occurs even when both zero_altitude and two_d_mode are set to true. My current launch file is shown below.

<launch>

<!-- Global (map) EKF instance -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_ontrack_global" clear_params="true">
<param name="frequency"       value="30"/>
<param name="sensor_timeout"  value="0.1"/>
<param name="two_d_node"      value="true"/>

<param name="map_frame"       value="map"/>
<param name="odom_frame"      value="odom"/>
<param name="world_frame"     value="map"/>

<param name="transform_time_offset" value="0.0"/>

<param name="odom0" value="/gps/rtkfix"/>
<param name="imu0"  value="/imu/data"/>

<!-- RTK -->
<rosparam param="odom0_config">[true, true, false,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>

<!-- IMU -->
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>

<param name="odom0_differential"                      value="false"/>
<param name="imu0_differential"                       value="false"/>

<param name="odom0_relative"                          value="false"/>
<param name="imu0_relative"                           value="false"/>

<param name="imu0_remove_gravitational_acceleration"  value="true"/>
<param name="print_diagnostics"                       value="true"/>

<param name="odom0_queue_size"                        value="10"/>
<param name="imu0_queue_size"                         value="10"/>

<param name="debug"                                   value="false"/>
<param name="debug_out_file"                          value="debug_ekf.txt"/>

<remap from="monitor/odometry/filtered"  to="/monitor/odometry/global"/>

</node>
<!-- Global (map) EKF instance -->

<!-- Navsat node transform -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="frequency"                     value="30"/>
<param name="delay"                         value="3"/>
<param name="yaw_offset"                    value="0"/>
<param name="zero_altitude"                 value="true"/>
<param name="publish_filtered_gps"          value="true"/>
<param name="use_odometry_yaw"              value="false"/>
<param name="wait_for_datum"                value="false"/>

<rosparam param="datum">[59,66727, 10.77337, 0.0, map, odom]</rosparam>

<remap from="/imu/data"           to="/monitor/imu/data"/>
<remap from="/gps/fix"            to="/monitor/gps/fix"/>
<remap from="/odometry/filtered"  to="/monitor/odometry/global"/>
from="/odometry/global"  to="/monitor/odometry/filtered"/>

</node>
<!-- Navsat node transform -->
</launch>


Have I got this all wrong?

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

---
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [0.0016, 0.0, 0.0, 0.0, 0.0016, 0.0, 0.0, 0.0, 0.0016]
position_covariance_type: 0
---
seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0


EDIT 2:

The covariance matrices have been updated to reflect the correct and relevant info (previous edit updated).

The filter seems to be updated). I'm not sure if I have set up the frames correctly now, however, I'm getting a lot or how I can go about outputting the gps (UTM) locations of vertical drift. I would expect this to be corrected by the gps points (both SPP and RTK) which should at least restrict the bounds of the drift but it does not seem to be constrained in any way. This occurs even when both zero_altitude and two_d_mode are set to true. each point. My current launch file is shown below.

<launch>


<node pkg="tf" type="static_transform_publisher" name="link0_broadcaster" args="0 0 0 0 0 0 1 odom base_link 100" /> <!-- Global (map) EKF instance --> 100"/> <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 1 map gps 100"/>

<node pkg="robot_localization" type="ekf_localization_node" name="ekf_ontrack_global" clear_params="true"> <param name="frequency" value="30"/> <param name="sensor_timeout" value="0.1"/> <param name="two_d_node" value="true"/>

<param name="map_frame"       value="map"/>
<param name="odom_frame"      value="odom"/>
<param name="world_frame"     value="map"/>

<param name="transform_time_offset" value="0.0"/>

<!-- <param name="odom0" value="/gps/rtkfix"/> -->
<param name="odom0" value="/gps/rtkfix"/>
<param name="imu0"  value="/imu/data"/>

<!-- RTK -->
<rosparam param="odom0_config">[true, true, false,
true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>

<!-- IMU -->
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>

<param name="odom0_differential"                      value="false"/>
<param name="imu0_differential"                       value="false"/>

<param name="odom0_relative"                          value="false"/>
<param name="imu0_relative"                           value="false"/>

<param name="imu0_remove_gravitational_acceleration"  value="true"/>
<param name="print_diagnostics"                       value="true"/>

<param name="odom0_queue_size"                        value="10"/>
<param name="imu0_queue_size"                         value="10"/>

<param name="debug"                                   value="false"/>
<param name="debug_out_file"                          value="debug_ekf.txt"/>

<remap from="monitor/odometry/filtered"  to="/monitor/odometry/global"/>

from="/odometry/filtered"  to="/odometry/global"/>


</node> <!-- Global (map) EKF instance --> <!-- Navsat node transform -->

<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true"> <param name="frequency" value="30"/> <param name="delay" value="3"/> <param name="magnetic_declination_radians" value="0.054"/> <param name="yaw_offset" value="0"/> <param name="zero_altitude" value="true"/> <param name="broadcast_utm_transform" value="true"/> <param name="publish_filtered_gps" value="true"/> <param name="use_odometry_yaw" value="false"/> <param name="wait_for_datum" value="false"/>

<!-- <rosparam param="datum">[59,66727, 10.77337, 0.0, map, odom]</rosparam>

odom]</rosparam> -->

<remap from="/imu/data"           to="/monitor/imu/data"/>
to="/imu/data"/>
<remap from="/gps/fix"            to="/monitor/gps/fix"/>
to="/gps/fix"/>
<remap from="/odometry/global"  to="/monitor/odometry/filtered"/>

</node>
<!-- Navsat node transform -->
</launch>
from="/odometry/filtered"  to="/odometry/global"/>


</node> </launch>

Have I got this all wrong?

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

---
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [0.0016, 0.0, 0.0, 0.0, 0.0016, 0.0, 0.0, 0.0, 0.0016]
position_covariance_type: 0
---
seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0


EDIT 2:

The covariance matrices have been updated to reflect the correct and relevant info (previous edit updated). I'm not sure if I have set up the frames correctly or how I can go about outputting the gps (UTM) locations of each point. My current launch file is shown below.

<launch>


<node pkg="tf" type="static_transform_publisher" name="link0_broadcaster" args="0 0 0 0 0 0 1 odom base_link 100"/> <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 1 map gps 100"/>

<node pkg="robot_localization" type="ekf_localization_node" name="ekf_ontrack_global" clear_params="true">

<param name="map_frame"       value="map"/>
<param name="odom_frame"      value="odom"/>
<param name="world_frame"     value="map"/>

<param name="transform_time_offset" value="0.0"/>

<!-- <param name="odom0" value="/gps/rtkfix"/> -->
<param name="odom0" value="/gps/rtkfix"/>
<param name="imu0"  value="/imu/data"/>

<!-- RTK -->
<rosparam param="odom0_config">[true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>

<!-- IMU -->
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>

<param name="odom0_differential"                      value="false"/>
<param name="imu0_differential"                       value="false"/>

<param name="odom0_relative"                          value="false"/>
<param name="imu0_relative"                           value="false"/>

<param name="imu0_remove_gravitational_acceleration"  value="true"/>
<param name="print_diagnostics"                       value="true"/>

<param name="odom0_queue_size"                        value="10"/>
<param name="imu0_queue_size"                         value="10"/>

<param name="debug"                                   value="false"/>
<param name="debug_out_file"                          value="debug_ekf.txt"/>

<remap from="/odometry/filtered"  to="/odometry/global"/>


</node>

<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">

<!-- <rosparam param="datum">[59,66727, 10.77337, 0.0, map, odom]</rosparam> -->

<remap from="/imu/data"           to="/imu/data"/>
<remap from="/gps/fix"            to="/gps/fix"/>
<remap from="/odometry/filtered"  to="/odometry/global"/>


</node> </launch>

Have I got this all wrong?

### How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)?

Hi all,

I'm relatively new to ROS so please bear with me.

I am trying to implement an extended kalman filter node from the robot_localization package.

I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu).

Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to?

/gps/rtkfix is relative to the base station (which is placed at a surveyed position).

From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates?

I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know.

Thanks.

EDIT 1:

Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0.

---
seq: 9355
stamp:
secs: 1484232874
nsecs: 552879627
frame_id: gps
status:
status: 1
service: 1
latitude: 59.6727308353
longitude: 10.7179627288
altitude: 97.3549933056
position_covariance: [0.0016, 0.0, 0.0, 0.0, 0.0016, 0.0, 0.0, 0.0, 0.0016]
position_covariance_type: 0
---
seq: 9356
stamp:
secs: 1484232874
nsecs: 636842456
frame_id: gps
status:
status: 0
service: 1
latitude: 59.6727627988
longitude: 10.718035228
altitude: 122.657179707
position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
position_covariance_type: 0


EDIT 2:

The covariance matrices have been updated to reflect the correct and relevant info (previous edit updated). I'm not sure if I have set up the frames correctly or how I can go about outputting the gps (UTM) locations of each point. My current launch file is shown below.

<launch>
100" />
<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 1 map gps 100"/>  100" />

<!-- Global (map) EKF instance -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_ontrack_global" clear_params="true">
<param name="frequency"       value="30"/>
<param name="sensor_timeout"  value="0.1"/>
<param name="two_d_node"      value="false"/>

<param name="map_frame"       value="map"/>
<param name="odom_frame"      value="odom"/>
<param name="world_frame"     value="map"/>

<param name="transform_time_offset" value="0.0"/>

<param name="odom0" value="/gps/rtkfix"/>
<param name="imu0"  value="/imu/data"/>

<!-- RTK -->
<rosparam param="odom0_config">[true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]</rosparam>

<!-- IMU -->
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>

<param name="odom0_differential"                      value="false"/>
<param name="imu0_differential"                       value="false"/>

<param name="odom0_relative"                          value="false"/>
<param name="imu0_relative"                           value="false"/>

<param name="imu0_remove_gravitational_acceleration"  value="true"/>
<param name="print_diagnostics"                       value="true"/>

<param name="odom0_queue_size"                        value="10"/>
<param name="imu0_queue_size"                         value="10"/>

<param name="debug"                                   value="false"/>
<param name="debug_out_file"                          value="debug_ekf.txt"/>

<remap from="/odometry/filtered"  to="/odometry/global"/>
</node>
<!-- Global (map) EKF instance -->

<!-- Navsat node transform -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="frequency"                     value="30"/>
<param name="delay"                         value="3"/>
<param name="yaw_offset"                    value="1.5707963"/>
<param name="zero_altitude"                 value="false"/>
<param name="publish_filtered_gps"          value="true"/>
<param name="use_odometry_yaw"              value="false"/>
<param name="wait_for_datum"                value="false"/>

<!-- <rosparam param="datum">[59,66727, 10.77337, 0.0, map, odom]</rosparam> -->

<remap from="/imu/data"           to="/imu/data"/>
<remap from="/gps/fix"            to="/gps/fix"/>
<remap from="/odometry/filtered"  to="/odometry/global"/>

</node>
<!-- Navsat node transform -->
</launch>
</node>

</launch> Have I got this all wrong? 


 11 None updated 2017-02-01 07:57:30 -0500 How to integrate RTK GPS data into an ekf_localization_node (from robot_localization pkg)? Hi all, I'm relatively new to ROS so please bear with me. I am trying to implement an extended kalman filter node from the robot_localization package. I am localizing my robot using a Piksi RTK GPS unit with a fixed base station and an IMU. This setup gives me three useful data streams; /gps/fix (sensor_msgs/NavSatFix), /gps/rtkfix (nav_msgs/Odometry) and /imu/data(_raw until I pass it through a imu_filter_madgwick node) (sensor_msgs/Imu). Note that /gps/fix includes GPS points (decimal degree format) which are both the single point precision(SPP) points as well as the RTK corrected points. I had to modify the gps driver so that the status information reflects the message type (SPP/RTK). Does the navsat_transform_node take into consideration whether the point is augmented or not? Does it need to? /gps/rtkfix is relative to the base station (which is placed at a surveyed position). From what I understand, a single SPP GPS and a single IMU can work but may not be very accurate. How would I go about including the RTK position information? Should I set the datum to the base station position or would that mess up the global coordinates? I know I haven't included very much data or in-depth info in this post but there is quite a lot so if you need anything more specific, please let me know. Thanks. EDIT 1: Below is a sample of the /gps/fix stream. The first message is RTK augmented and therefore has status == 1. The second is a SPP message and has status == 0. --- header: seq: 9355 stamp: secs: 1484232874 nsecs: 552879627 frame_id: gps status: status: 1 service: 1 latitude: 59.6727308353 longitude: 10.7179627288 altitude: 97.3549933056 position_covariance: [0.0016, 0.0, 0.0, 0.0, 0.0016, 0.0, 0.0, 0.0, 0.0016] position_covariance_type: 0 --- header: seq: 9356 stamp: secs: 1484232874 nsecs: 636842456 frame_id: gps status: status: 0 service: 1 latitude: 59.6727627988 longitude: 10.718035228 altitude: 122.657179707 position_covariance: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] position_covariance_type: 0 EDIT 2: The covariance matrices have been updated to reflect the correct and relevant info (previous edit updated). I'm not sure if I have set up the frames correctly or how I can go about outputting the gps (UTM) locations of each point. My current launch file is shown below. <launch> <node pkg="tf" type="static_transform_publisher" name="link0_broadcaster" args="0 0 0 0 0 0 1 odom base_link 100" /> <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 1 map gps 100" /> <!-- Global (map) EKF instance --> <node pkg="robot_localization" type="ekf_localization_node" name="ekf_ontrack_global" clear_params="true"> <param name="frequency" value="30"/> <param name="sensor_timeout" value="0.1"/> <param name="two_d_node" value="false"/> <param name="map_frame" value="map"/> <param name="odom_frame" value="odom"/> <param name="base_link_frame" value="base_link"/> <param name="world_frame" value="map"/> <param name="transform_time_offset" value="0.0"/> <param name="odom0" value="/gps/rtkfix"/> <param name="imu0" value="/imu/data"/> <!-- RTK --> <rosparam param="odom0_config">[true, true, true, false, false, false, false, false, false, false, false, false, false, false, false]</rosparam> <!-- IMU --> <rosparam param="imu0_config">[false, false, false, true, true, true, false, false, false, true, true, true, true, true, true]</rosparam> <param name="odom0_differential" value="false"/> <param name="imu0_differential" value="false"/> <param name="odom0_relative" value="false"/> <param name="imu0_relative" value="false"/> <param name="imu0_remove_gravitational_acceleration" value="true"/> <param name="print_diagnostics" value="true"/> <param name="odom0_queue_size" value="10"/> <param name="imu0_queue_size" value="10"/> <param name="debug" value="false"/> <param name="debug_out_file" value="debug_ekf.txt"/> <remap from="/odometry/filtered" to="/odometry/global"/> </node> <!-- Global (map) EKF instance --> <!-- Navsat node transform --> <node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true"> <param name="frequency" value="30"/> <param name="delay" value="3"/> <param name="magnetic_declination_radians" value="0.054"/> <param name="yaw_offset" value="1.5707963"/> <param name="zero_altitude" value="false"/> <param name="broadcast_utm_transform" value="true"/> <param name="publish_filtered_gps" value="true"/> <param name="use_odometry_yaw" value="false"/> <param name="wait_for_datum" value="false"/> <!-- <rosparam param="datum">[59,66727, 10.77337, 0.0, map, odom]</rosparam> --> <remap from="/imu/data" to="/imu/data"/> <remap from="/gps/fix" to="/gps/fix"/> <remap from="/odometry/filtered" to="/odometry/global"/> </node> <!-- Navsat node transform --> </launch> Have I got this all wrong?EDIT 3: Here is a sample message from /imu/data --- header: seq: 603 stamp: secs: 1484232821 nsecs: 269243016 frame_id: imu orientation: x: 0.0909325752091 y: -0.993837356153 z: -0.00888735559103 w: -0.0237232971259 orientation_covariance: [1e-05, 0.0, 0.0, 0.0, 1e-05, 0.0, 0.0, 0.0, 1e-05] angular_velocity: x: 0.00298800367941 y: 0.0135341556846 z: -0.000234223185618 angular_velocity_covariance: [1.2184696791468346e-07, 0.0, 0.0, 0.0, 1.2184696791468346e-07, 0.0, 0.0, 0.0, 1.2184696791468346e-07] linear_acceleration: x: -0.540727223129 y: 0.0771066032982 z: -9.56023780893 linear_acceleration_covariance: [8.66124974095918e-06, 0.0, 0.0, 0.0, 8.66124974095918e-06, 0.0, 0.0, 0.0, 8.66124974095918e-06] --- 


 ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license. about | faq | help | privacy policy | terms of service Powered by Askbot version 0.10.2 Please note: ROS Answers requires javascript to work properly, please enable javascript in your browser, here is how //IE fix to hide the red margin var noscript = document.getElementsByTagName('noscript')[0]; noscript.style.padding = '0px'; noscript.style.backgroundColor = 'transparent'; askbot['urls']['mark_read_message'] = '/s/messages/markread/'; askbot['urls']['get_tags_by_wildcard'] = '/s/get-tags-by-wildcard/'; askbot['urls']['get_tag_list'] = '/s/get-tag-list/'; askbot['urls']['follow_user'] = '/followit/follow/user/{{userId}}/'; askbot['urls']['unfollow_user'] = '/followit/unfollow/user/{{userId}}/'; askbot['urls']['user_signin'] = '/account/signin/'; askbot['urls']['getEditor'] = '/s/get-editor/'; askbot['urls']['apiGetQuestions'] = '/s/api/get_questions/'; askbot['urls']['ask'] = '/questions/ask/'; askbot['urls']['questions'] = '/questions/'; askbot['settings']['groupsEnabled'] = false; askbot['settings']['static_url'] = '/m/'; askbot['settings']['minSearchWordLength'] = 3; askbot['settings']['mathjaxEnabled'] = false; askbot['settings']['sharingSuffixText'] = ''; askbot['settings']['errorPlacement'] = 'after-label'; askbot['data']['maxCommentLength'] = 1000; askbot['settings']['editorType'] = 'markdown'; askbot['settings']['commentsEditorType'] = 'rich\u002Dtext'; askbot['messages']['askYourQuestion'] = 'Ask Your Question'; askbot['messages']['acceptOwnAnswer'] = 'accept or unaccept your own answer'; askbot['messages']['followQuestions'] = 'follow questions'; askbot['settings']['allowedUploadFileTypes'] = [ "jpg", "jpeg", "gif", "bmp", "png", "tiff" ]; askbot['data']['haveFlashNotifications'] = true; askbot['data']['activeTab'] = 'questions'; askbot['settings']['csrfCookieName'] = 'csrftoken'; askbot['data']['searchUrl'] = ''; /*<![CDATA[*/ $('.mceStatusbar').remove();//a hack to remove the tinyMCE status bar$(document).ready(function(){ // focus input on the search bar endcomment var activeTab = askbot['data']['activeTab']; if (inArray(activeTab, ['users', 'questions', 'tags', 'badges'])) { var searchInput = $('#keywords'); } else if (activeTab === 'ask') { var searchInput =$('#id_title'); } else { var searchInput = undefined; animateHashes(); } var wasScrolled = $('#scroll-mem').val(); if (searchInput && !wasScrolled) { searchInput.focus(); putCursorAtEnd(searchInput); } var haveFullTextSearchTab = inArray(activeTab, ['questions', 'badges', 'ask']); var haveUserProfilePage =$('body').hasClass('user-profile-page'); if ((haveUserProfilePage || haveFullTextSearchTab) && searchInput && searchInput.length) { var search = new FullTextSearch(); askbot['controllers'] = askbot['controllers'] || {}; askbot['controllers']['fullTextSearch'] = search; search.setSearchUrl(askbot['data']['searchUrl']); if (activeTab === 'ask') { search.setAskButtonEnabled(false); } search.decorate(searchInput); } else if (activeTab === 'tags') { var search = new TagSearch(); search.decorate(searchInput); } if (askbot['data']['userIsAdminOrMod']) { $('body').addClass('admin'); } if (askbot['settings']['groupsEnabled']) { askbot['urls']['add_group'] = "/s/add-group/"; var group_dropdown = new GroupDropdown();$('.groups-dropdown').append(group_dropdown.getElement()); } var userRep = $('#userToolsNav .reputation'); if (userRep.length) { var showPermsTrigger = new ShowPermsTrigger(); showPermsTrigger.decorate(userRep); } }); if (askbot['data']['haveFlashNotifications']) {$('#validate_email_alert').click(function(){notify.close(true)}) notify.show(); } var langNav = $('.lang-nav'); if (langNav.length) { var nav = new LangNav(); nav.decorate(langNav); } /*]]>*/ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker('UA-17821189-3'); pageTracker._trackPageview(); } catch(err) {} //todo - take this out into .js file$(document).ready(function(){ $('div.revision div[id^=rev-header-]').bind('click', function(){ var revId = this.id.substr(11); toggleRev(revId); }); lanai.highlightSyntax(); }); function toggleRev(id) { var arrow =$("#rev-arrow-" + id); var visible = arrow.attr("src").indexOf("hide") > -1; if (visible) { var image_path = '/m/default/media/images/expander-arrow-show.gif?v=27'; } else { var image_path = '/m/default/media/images/expander-arrow-hide.gif?v=27'; } image_path = image_path + "?v=27"; arrow.attr("src", image_path); \$("#rev-body-" + id).slideToggle("fast"); } for (url_name in askbot['urls']){ askbot['urls'][url_name] = cleanUrl(askbot['urls'][url_name]); }