Skip to main content
Version: 1.0.2

RTK Positioning

Hardware​

AutomatePro offers an optional RTK GNSS position sensor, giving it cm-level positional accuracy. This is based on the u-blox F9P and R series devices and includes positional accuracy down to 1 cm with RTCM corrections from a nearby base station. If the option is included, there will be a blue FAKRA connector for antenna connection. "GNSS-2" is used for position and "GNSS-1" is used for heading.

AutomatePro GNSS connector location

GNSS Position Specifications​

ParameterValue
Receiveru-blox F9P or F9R (see Wheel Speed & Direction Input)
ConnectorGNSS-2 (FAKRA C - Signal Blue)
Supported ConstellationGPS, Galileo, BeiDou, GLONASS
Positional AccuracyDown to 1 cm 1. Using u-blox PointPerfect correction <6 cm
Max Navigation Update RateDefault 1 Hz (can be configured up to 7 Hz, or 5 Hz as the moving base for heading)
Info

1 Depends on antenna, distance to base station, or correction service. See the receiver datasheet for more information.

External Antenna​

The AutomatePro system is compatible with a variety of multi-band high-precision GNSS antennas that have a FAKRA Type C connector (Signal Blue). More information on antennas used with AutomatePro is available here.

Wheel Speed & Direction Input​

The AutomatePro provides options for both wheel speed and direction input for applications requiring dead reckoning.

Connection Details
Pin Name & NumberFunctionDescription
WHEEL TIC / PIN 51Tachometer input5-24VDC input range (with respect to the common GND)
WHEEL DIR / PIN 52Wheel rotation direction input5-24VDC input range (with respect to the common GND)
Important

This is a non-standard option. Contact Lemvos for more information.

ROS API​

Node: automatepro_gnss_position_node​

Publishers​

TopicTypeDescription
/sensor/gnss/position/fixsensor_msgs/msg/NavSatFixGNSS position data (navigation satellite fix).
/sensor/gnss/position/fix_velocitygeometry_msgs/msg/
TwistWithCovarianceStamped
Velocity in local ENU frame.
/sensor/gnss/position/monhwublox_msgs/msg/MonHWHardware status of the GNSS position module.
/sensor/gnss/position/monsysublox_msgs/msg/MonSYSSystem monitor status of the GNSS position module.
/sensor/gnss/position/nmeanmea_msgs/msg/SentenceRaw NMEA messages.
/diagnosticsdiagnostic_msgs/msg/
DiagnosticArray
GNSS position ROS driver diagnostics.

Subscribers​

TopicTypeDescription
/sensor/gnss/correctionrtcm_msgs/msg/MessageRTCM or SPARTN Correction data

Parameters​

ParameterTypePackaged defaultRuntime R/WDescription
devicestring/dev/serial/by-id/usb-u-blox_AG_-_www.u-blox.com_u-blox_GNSS_receiver_F9P-if00readSerial port for the F9P receiver.
frame_idstringgnss_positionreadFrame ID for published messages.
config_on_startupboolfalsereadLeaves receiver flash configuration unchanged at startup.
gpio.chipnamestringgpiochip0readGPIO chip used for receiver reset recovery.
gpio.line_numint134readGPIO line used for receiver reset recovery.
gpio.reset_time_sint1readReset pulse duration in seconds.
recovery.cycle_time_sint1readBase interval between recovery attempts in seconds; it doubles after each failed attempt up to recovery.backoff_max_s.
recovery.backoff_max_sint60readLongest interval between recovery attempts in seconds.
recovery.gpio_pulse_limitint3readConsecutive pulses of the shared reset line before this node stops pulsing. A pulse resets both receivers.
watchdog.timeout_msint3000readWatchdog timeout in milliseconds.
watchdog.cycle_time_msint500readWatchdog check interval in milliseconds.
publish.allboolfalsereadEnables all publisher groups when true.
publish.aid.huiboolfalsereadEnables AID-HUI message publishing.
publish.nav.posllhboolfalsereadEnables NAV-POSLLH message publishing.
publish.nav.posecefboolfalsereadEnables NAV-POSECEF message publishing.
publish.nav.relposnedboolfalsereadKeeps relative-position heading messages disabled for the position receiver.
publish.nmeabooltruereadEnables NMEA sentence publishing.
publish.mon.hwbooltruereadEnables UBX-MON-HW hardware status publishing.
publish.mon.sysbooltruereadEnables UBX-MON-SYS system status publishing.
debugint0readDebug verbosity; range 0-4.

Configuration​

Driver: automatepro_gnss_driver Container: automatepro-core-driver

info

Runtime configuration files are in the /opt/automatepro/config/ros directory. Packaged defaults are installed in /opt/automatepro/defconfig/ros. The runtime files are mounted into the Docker container and used by the ROS driver. Environment variables can be set in the /opt/automatepro/.env file.

The runtime configuration file is:

/opt/automatepro/config/ros/gnss_position_params.yaml

The packaged default source is:

/opt/automatepro/defconfig/ros/gnss_position_params.yaml

ROS Configuration​

# Configuration Settings for F9P device in Moving Base Mode
automatepro_gnss_position_node:
ros__parameters:
debug: 0 # Range 0-4 (0 means no debug statements will print)

device: /dev/serial/by-id/usb-u-blox_AG_-_www.u-blox.com_u-blox_GNSS_receiver_F9P-if00 #/dev/ttyACM1
frame_id: gnss_position

config_on_startup: false # If false, the node will not override configurations of the device on startup
# Device should be configured with u-center and configurations should be saved in flash
# Please use the configuration file provided by Lemvos

# GPIO configuration
gpio:
chipname: "gpiochip0"
line_num: 134
reset_time_s: 1

# Recovery configuration
recovery:
cycle_time_s: 1
backoff_max_s: 60
gpio_pulse_limit: 3

# Watchdog configuration
watchdog:
timeout_ms: 3000
cycle_time_ms: 500

# Enable u-blox gnss message publishers
publish:
all: false
aid:
hui: false
nav:
all: false
posllh: false
posecef: false
relposned: false
nmea: true
mon:
hw: true
sys: true
Important

Restart the automatepro-core-driver Docker container after changing the configuration. Configuration changes are applied only after the container restarts.

sudo systemctl restart automatepro-core-driver

Device Configuration​

This section describes the configuration of the GNSS device. To explore the capabilities of the GNSS device, refer to the u-blox documentation for more details.

Check the configuration section for more details.

Automatic Recovery​

The driver watches the data stream from the receiver. It checks every watchdog.cycle_time_ms and starts recovery when no message has arrived for watchdog.timeout_ms.

Recovery runs in three steps, the least invasive first:

  1. Reopen the serial connection, leaving the receiver untouched.
  2. Reset the receiver in software with a UBX CFG-RST hot start, which keeps the battery-backed data so re-acquisition is fast.
  3. Pulse the reset line to power-cycle the receiver.

Each step ends by reopening the connection. The driver waits recovery.cycle_time_s between attempts and doubles the wait after each failed attempt, up to recovery.backoff_max_s.

info

The reset line is shared, so a pulse resets the position and the heading receiver together. Each node stops pulsing after recovery.gpio_pulse_limit consecutive pulses, counting the other node's pulses as well, and resumes only once data arrives again.

Example​

This example prints the latitude, longitude, and altitude by subscribing to the /sensor/gnss/position/fix topic. The tutorial package is available in the AutomatePro tutorials repository, and its README explains how to build and run the examples.

Source: gnss_position.py

import rclpy
from rclpy.executors import ExternalShutdownException
from rclpy.node import Node
from sensor_msgs.msg import NavSatFix


class GNSSPositionSubscriber(Node):

def __init__(self):
super().__init__('gnss_position_subscriber')
self.subscription = self.create_subscription(
NavSatFix,
'/sensor/gnss/position/fix',
self.listener_callback,
10)

def listener_callback(self, msg):
self.get_logger().info('Latitude: %f' % msg.latitude)
self.get_logger().info('Longitude: %f' % msg.longitude)
self.get_logger().info('Altitude: %f' % msg.altitude)


def main(args=None):
rclpy.init(args=args)
node = GNSSPositionSubscriber()
try:
rclpy.spin(node)
except (KeyboardInterrupt, ExternalShutdownException):
pass
finally:
node.destroy_node()
rclpy.try_shutdown()


if __name__ == '__main__':
main()

Run the node using the following command:

ros2 run automatepro_python_tutorials gnss_position_node