ublox icon indicating copy to clipboard operation
ublox copied to clipboard

Issues publishing ZED-F9R IMU Messages

Open ashtencodes opened this issue 3 years ago • 23 comments

I was trying to get ZED-F9R IMU data published in the form of a sensor_msgs/imu message. Currently, I am using a zed-f9p config file that can be found below.

# Configuration Settings for zed-f9p device
ublox_gps_node:
  ros__parameters:
    debug: 0                    # Range 0-4 (0 means no debug statements will print)
    device: /dev/ttyACM0
    frame_id: gps
    uart1:
      baudrate: 38400
    # TMODE3 Config
    tmode3: 1                   # Survey-In Mode
    sv_in:
      reset: True               # True: disables and re-enables survey-in (resets)
                                # False: Disables survey-in only if TMODE3 is
                                # disabled
      min_dur: 300              # Survey-In Minimum Duration [s]
      acc_lim: 3.0              # Survey-In Accuracy Limit [m]

    inf:
      all: true                   # Whether to display all INF messages in console

    publish:
      all: true
      aid:
        hui: false
      nav:
        posecef: false 
      esf:
        meas: true

When I run the launch file, it seems to only publish on the default fix topics. From the ublox documentation it looks like publish/esf/meas controls toggles the IMU data stream. Is there anything I am doing wrong?

ashtencodes avatar Nov 29 '21 01:11 ashtencodes

Is this the actual config you are using?

versatran01 avatar Dec 08 '21 03:12 versatran01

Yes, this is the config file being used in the launch file.

ashtencodes avatar Dec 08 '21 03:12 ashtencodes

Can you remove the first three lines? just start with debug:0

versatran01 avatar Dec 08 '21 03:12 versatran01

With the first three lines removed, I get most of the nav messages, but no esf messages. I do get an error twice:

U-blox: received NACK: 0x06 / 0x01 U-blox: received NACK: 0x06 / 0x01

ashtencodes avatar Dec 08 '21 03:12 ashtencodes

You need to follow the same format as https://github.com/KumarRobotics/ublox/blob/master/ublox_gps/config/c94_m8p_base.yaml

versatran01 avatar Dec 08 '21 03:12 versatran01

I'm still only seeing NAV topics and the NACK errors.

ashtencodes avatar Dec 08 '21 03:12 ashtencodes

https://github.com/KumarRobotics/ublox/blob/76ff4da9ec87f47fc8e7e2f556bc88026241c05a/ublox_gps/src/node.cpp#L1368 This is where imu is published, you can add a print and see if it is reached.

versatran01 avatar Dec 08 '21 04:12 versatran01

I added a print statement within the if statement, the if statement is not getting triggered.

ashtencodes avatar Dec 08 '21 04:12 ashtencodes

What about the callback? If callback is ok, then just hardcode enabled["esf_meas"] to true and see if outputs imu

versatran01 avatar Dec 08 '21 04:12 versatran01

Screenshot from 2021-12-07 18-32-27

I added a cout statement for the callback as well but not seeing anything in the terminal.

ashtencodes avatar Dec 08 '21 04:12 ashtencodes

What I meant is right after this line https://github.com/KumarRobotics/ublox/blob/76ff4da9ec87f47fc8e7e2f556bc88026241c05a/ublox_gps/src/node.cpp#L1367

and manually set enable to true on this line https://github.com/KumarRobotics/ublox/blob/76ff4da9ec87f47fc8e7e2f556bc88026241c05a/ublox_gps/src/node.cpp#L1340

I had a feeling that this is due to a config issue. Just make sure your config file has the right format and the launch file is using that config.

versatran01 avatar Dec 08 '21 04:12 versatran01

shall I changed enabled["esf_meas"], enabled["esf"]

to enabled["true"]?

ashtencodes avatar Dec 08 '21 04:12 ashtencodes

What I meant is right after this line

https://github.com/KumarRobotics/ublox/blob/76ff4da9ec87f47fc8e7e2f556bc88026241c05a/ublox_gps/src/node.cpp#L1367

and manually set enable to true on this line

https://github.com/KumarRobotics/ublox/blob/76ff4da9ec87f47fc8e7e2f556bc88026241c05a/ublox_gps/src/node.cpp#L1340

I had a feeling that this is due to a config issue. Just make sure your config file has the right format and the launch file is using that config.

I'm currently using the config you sent me, c94_m8p_base.yaml, is there some sort of formatting issue on this file?

ashtencodes avatar Dec 08 '21 04:12 ashtencodes

Replace

nh->param("publish/esf/meas", enabled["esf_meas"], enabled["esf"]); 

with

enabled["esf_meas"] = true;

versatran01 avatar Dec 08 '21 04:12 versatran01

Take a look at the config folder and find the right config. I just sent that one as a referece.

versatran01 avatar Dec 08 '21 04:12 versatran01

Screenshot from 2021-12-07 18-44-54

Ah alright, I will look into using the zedf9p config. This still doesn't seem to be printing in the terminal (after catkin_make). The topic is also not active.

ashtencodes avatar Dec 08 '21 04:12 ashtencodes

do you have any updates on this topic? I am also trying to get the IMU messages from the ZED-F9R

tbroed avatar Jan 17 '22 14:01 tbroed

do you have any updates on this topic? I am also trying to get the IMU messages from the ZED-F9R

Sorry no updates as of now, I am planning on looking into the source code soon. Let me know if you get anything!

ashtencodes avatar Jan 18 '22 21:01 ashtencodes

I have look into the source code found that

if (product_category == "HPG" && ref_rov == "REF") {
    components_.push_back(std::make_shared<HpgRefProduct>(nav_rate_, meas_rate_, updater_, rtcms_, this));
  } else if (product_category == "HPG" && ref_rov == "ROV") {
    components_.push_back(std::make_shared<HpgRovProduct>(nav_rate_, updater_, this));
  } else if (product_category == "HPG") {
    components_.push_back(std::make_shared<HpPosRecProduct>(nav_rate_, meas_rate_, frame_id_, updater_, rtcms_, this));
  } else if (product_category == "TIM") {
    components_.push_back(std::make_shared<TimProduct>(frame_id_, updater_, this));
  } else if (product_category == "ADR" ||
             product_category == "UDR") {
    components_.push_back(std::make_shared<AdrUdrProduct>(nav_rate_, meas_rate_, frame_id_, updater_, this));

But the ZED-F9R Firmware is FWVER=HPS 1.00. The INS/imu publication seems to be in AdrUdrProduct. I added ''product_category == "HPS" ||'' to AdrUdr if and it start publishing esf data.

spikyknox avatar Mar 12 '22 15:03 spikyknox

Is anyone able to run the ROS driver for Ublox F9R? I want to get IMU and GNSS data at the same time.

Jia-le-wang avatar Jul 15 '22 05:07 Jia-le-wang

any update?

KimHyung avatar Nov 27 '23 04:11 KimHyung

I have look into the source code found that

if (product_category == "HPG" && ref_rov == "REF") {
    components_.push_back(std::make_shared<HpgRefProduct>(nav_rate_, meas_rate_, updater_, rtcms_, this));
  } else if (product_category == "HPG" && ref_rov == "ROV") {
    components_.push_back(std::make_shared<HpgRovProduct>(nav_rate_, updater_, this));
  } else if (product_category == "HPG") {
    components_.push_back(std::make_shared<HpPosRecProduct>(nav_rate_, meas_rate_, frame_id_, updater_, rtcms_, this));
  } else if (product_category == "TIM") {
    components_.push_back(std::make_shared<TimProduct>(frame_id_, updater_, this));
  } else if (product_category == "ADR" ||
             product_category == "UDR") {
    components_.push_back(std::make_shared<AdrUdrProduct>(nav_rate_, meas_rate_, frame_id_, updater_, this));

But the ZED-F9R Firmware is FWVER=HPS 1.00. The INS/imu publication seems to be in AdrUdrProduct. I added ''product_category == "HPS" ||'' to AdrUdr if and it start publishing esf data.

This one worked for me. I used the HPLR-HPG-2 board (https://www.u-blox.com/en/product/xplr-hpg-2) and I was able to get the IMU data from it.

andrespulido8 avatar Jan 30 '24 17:01 andrespulido8

@andrespulido8 Good job!!

Jia-le-wang avatar Jan 31 '24 00:01 Jia-le-wang