dawonn / vectornav

ROS Interface for the VectorNav IMU/GPS
147 stars 179 forks source link

Erroneous configuration of B01 with default yaml for VN100-T #141

Open fcladera opened 3 months ago

fcladera commented 3 months ago

I am using the VN100-T with this driver, setting a particular commonField for my application. I noticed that the amount of binary data returned by the IMU is larger than expected. Here is the output of the logic analyzer for one of these frames:

image

On closer inspection, it seems that the IMU is sending data for not only the group that I have enabled, but other groups that I did not configure.

0xFA: Header
0x29: Groups 1, 4, and 6 active
0x05 0x36: my configuration for group 1 (0x3605)
0x10 0x02: a configuration for group 4 (0x0210)
...

So it seems that groups 4 and 6 are active. Per the datasheet, 4, 6, and 7 are not used in the VNAV and should be set to zero.

image

When reading the parameters for B01, it seems that the default value is the wrong one for the VN100-T. I am not sure if these configurations correspond to another model that has GNSS.

vn::protocol::uart::GpsGroup::GPSGROUP_FIX | vn::protocol::uart::GpsGroup::GPSGROUP_POSU == 0x0210 // we see this value in the logic analyzer

A quick workaround is to add the missing fields into the yaml configuration file.

  commonField: 0x3605       
  timeField: 0x0000              # TIMEGROUP_NONE
  imuField: 0x0000               # IMUGROUP_NONE
  attitudeField: 0x0000          # ATTITUDEGROUP_NONE
  gps2Field: 0x0000              # GPSGROUP_NONE
  gpsField: 0x0000
  insField: 0x0000

which results in the right number of bits sent (only group 1) image.

There are a few potential solutions for this: