-
Notifications
You must be signed in to change notification settings - Fork 46
Description
I would like to use the ublox_dgnss driver with two ublox X20P receivers connected at the same time. However, I can only connect with the receiver that has the default vendor ID, 0x1ab.
Since the driver identifies devices by their vendor and product IDs, I tried assigning each receiver a unique product ID via u-center to distinguish them via udev rules and the driver.
$ lsusb
Bus 001 Device 017: ID 1546:01ab U-Blox AG u-blox GNSS receiver
Bus 001 Device 016: ID 1546:01ac U-Blox AG u-blox GNSS receiver
$ cat 98-gnss.rules
# UBLOX ZED-X20P (CDC-ACM) - SUPPORTED
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01ab", MODE="0666", GROUP="plugdev", GROUP="dialout"
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01ac", MODE="0666", GROUP="plugdev", GROUP="dialout"
Then, in device_family.cpp I changed the ID to 0x1ac for testing purposes. However, in the console, I received the following:
[component_container_mt-2] [INFO] [1762030165.813936670] [ublox_nav_sat_fix_hp_container]: Found class: rclcpp_components::NodeFactoryTemplate<ublox_nav_sat_fix_hp::UbloxNavSatHpFixNode>
[component_container_mt-2] [INFO] [1762030165.813982366] [ublox_nav_sat_fix_hp_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ublox_nav_sat_fix_hp::UbloxNavSatHpFixNode>
[component_container_mt-2] [INFO] [1762030165.815968281] [ublox_nav_sat_fix_hp]: starting ublox_nav_sat_fix_hp
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/ublox_nav_sat_fix_hp' in container '/ublox_nav_sat_fix_hp_container'
[component_container_mt-1] [INFO] [1762030165.817307342] [ublox_dgnss_container]: Found class: rclcpp_components::NodeFactoryTemplate<ublox_dgnss::UbloxDGNSSNode>
[component_container_mt-1] [INFO] [1762030165.817321252] [ublox_dgnss_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<ublox_dgnss::UbloxDGNSSNode>
[component_container_mt-1] [INFO] [1762030165.818042849] [ublox_dgnss]: starting ublox_dgnss
[component_container_mt-1] [INFO] [1762030165.818478448] [ublox_dgnss]: Device family: X20P - All-band GNSS (multiple interfaces) (Product IDs: [0x01ac, 0x050c, 0x050d], Reliable iSerial: YES)
[component_container_mt-1] [INFO] [1762030165.818524302] [ublox_dgnss]: Parameter DEVICE_SERIAL_STRING found with value: (will connect to matching X20P USB interface)
[component_container_mt-1] [INFO] [1762030165.818551230] [ublox_dgnss]: Parameter FRAME_ID found with value: ubx
[component_container_mt-1] [INFO] [1762030165.818555284] [ublox_dgnss]: ParameterManager initialized
[component_container_mt-1] [INFO] [1762030165.818803441] [ublox_dgnss]: Loading default UBX config for X20P: /home/markus/playground_ws/install/ublox_dgnss/share/ublox_dgnss/config/x20p_ubx_config.toml
[component_container_mt-1] [INFO] [1762030165.818936557] [ublox_dgnss]: Loaded 130 parameters from X20P TOML
[component_container_mt-1] [INFO] [1762030165.818962590] [ublox_dgnss]: Loaded 130 UBX config items
[component_container_mt-1] [INFO] [1762030165.818969241] [ublox_dgnss]: parameter supplied: CFG_MSGOUT_UBX_NAV_COV_USB
[component_container_mt-1] [INFO] [1762030165.818977829] [ublox_dgnss]: parameter supplied: CFG_MSGOUT_UBX_NAV_HPPOSLLH_USB
[component_container_mt-1] [INFO] [1762030165.818981210] [ublox_dgnss]: parameter supplied: CFG_MSGOUT_UBX_NAV_STATUS_USB
[component_container_mt-1] [INFO] [1762030165.818983962] [ublox_dgnss]: parameter supplied: CFG_MSGOUT_UBX_RXM_RTCM_USB
[component_container_mt-1] [WARN] [1762030165.818987216] [ublox_dgnss]: parameter supplied: CFG_MSGOUT_UBX_RXM_RTCM_USB is not recognised. Ignoring!
[component_container_mt-1] [INFO] [1762030165.818989771] [ublox_dgnss]: parameter supplied: CFG_RATE_MEAS
[component_container_mt-1] [INFO] [1762030165.818992695] [ublox_dgnss]: parameter supplied: CFG_RATE_NAV
[component_container_mt-1] [INFO] [1762030165.818995452] [ublox_dgnss]: parameter supplied: CFG_USBOUTPROT_NMEA
[component_container_mt-1] [INFO] [1762030165.829983544] [ublox_dgnss]: parameter set CFG_INFMSG_NMEA_USB: 0
[component_container_mt-1] [INFO] [1762030165.830038095] [ublox_dgnss]: parameter set CFG_INFMSG_UBX_USB: 0
...
[component_container_mt-1] [INFO] [1762030165.833403543] [ublox_dgnss]: parameter set CFG_USBINPROT_RTCM3X: false
[component_container_mt-1] [INFO] [1762030165.833430495] [ublox_dgnss]: parameter set CFG_USBINPROT_UBX: false
[component_container_mt-1] [INFO] [1762030165.833457407] [ublox_dgnss]: parameter set CFG_USBOUTPROT_RTCM3X: false
[component_container_mt-1] [INFO] [1762030165.833485408] [ublox_dgnss]: parameter set CFG_USBOUTPROT_UBX: false
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/ublox_dgnss' in container '/ublox_dgnss_container'
[component_container_mt-1] [INFO] [1762030165.843678127] [ublox_dgnss]: Starting USB initialization
[component_container_mt-1] [ERROR] [1762030165.847042841] [ublox_dgnss]: usb init error: Serial string read failed (unexpected): LIBUSB_ERROR_INVALID_PARAM
[component_container_mt-1] [INFO] [1762030165.847072072] [ublox_dgnss]: Initiating shutdown ...
Changing the ID back to the default, 0x1ab, works immediately, both in the node and on the module.
What might I be doing wrong? Do you have a different suggestion for using two modules at the same time?
@hortovanyi In any case, your implementation works very well with one module! Thanks for the node!