KumarRobotics / ublox

A driver for ublox gps
BSD 3-Clause "New" or "Revised" License
431 stars 378 forks source link

ROS2 Package Error : U-blox: received NACK: 0x06 / 0x01 #230

Open rafiqrana opened 8 months ago

rafiqrana commented 8 months ago

I am trying to run ublox_gps_node with the provided zed_f9p.yaml config file; however, it produces error [ERROR] U-blox: received NACK: 0x06 / 0x01. Suggested by different webpages, the problem might be baud rate; however, I have tested with 9600, 57600, 38400, etc. - nothing worked.

GPS Device: RTK ZED F9P GNSS

To Reproduce: To reproduce the error, one needs to create a launch file within launch directory of the ulbox_gps package or from a new package. The tested launch file as follows:

import os

import ament_index_python.packages
import launch
import launch_ros.actions

def generate_launch_description():
    config_directory = os.path.join(
        ament_index_python.packages.get_package_share_directory('ublox_gps'),
        'config')
    params = os.path.join(config_directory, 'zed_f9p.yaml')
    ublox_gps_node = launch_ros.actions.Node(package='ublox_gps',
                                             executable='ublox_gps_node',
                                             output='both',
                                             parameters=[params])

    return launch.LaunchDescription([ublox_gps_node,

                                     launch.actions.RegisterEventHandler(
                                         event_handler=launch.event_handlers.OnProcessExit(
                                             target_action=ublox_gps_node,
                                             on_exit=[launch.actions.EmitEvent(
                                                 event=launch.events.Shutdown())],
                                         )),
                                     ])

Expected behavior: Upon successful run, the node should publish gps coordinate to /fix topic.

Screenshots:

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ublox_gps_node-1]: process started with pid [256794]
[ublox_gps_node-1] [INFO] [1699327259.356706354] [ublox_gps_node]: U-Blox: Opened serial port /dev/ttyACM0
[ublox_gps_node-1] [INFO] [1699327259.858498733] [ublox_gps_node]: EXT CORE 1.00 (f10c36), HW VER: 00190000
[ublox_gps_node-1] [INFO] [1699327259.865033133] [ublox_gps_node]: U-Blox Firmware Version: 9
[ublox_gps_node-1] [WARN] [1699327259.866098143] [ublox_gps_node]: For HPG Ref devices, nav_rate should be exactly 1 Hz.
[ublox_gps_node-1] [INFO] [1699327259.872444645] [ublox_gps_node]: U-Blox configured successfully.
[ublox_gps_node-1] [ERROR] [1699327259.875390779] [ublox_gps_node]: U-blox: received NACK: 0x06 / 0x01
[ublox_gps_node-1] [ERROR] [1699327259.875771974] [ublox_gps_node]: U-blox: received NACK: 0x06 / 0x01

Desktop INFO:

Corund060 commented 8 months ago

I get those errors too, but I still get coordinates on /ublox_gps_node/fix topic

brandonbeggs commented 8 months ago

Try setting /publish/aid/all to false

In my case what is happening is the ROS2 node is sending a configuration command to the uBlox receiver to generate AID messages periodically. The F9P does not have support for this message type so it is sending a NACK.

Changing debug in your config file to a higher number will give more context about what UBX message is failing. In my case it is: