Skip to content

Commit

Permalink
Removed heading bias config in favor of new GNSS aux lever arm settin…
Browse files Browse the repository at this point in the history
…g. (#12)

Changes
- Removed deprecated `heading_bias` option from `config_tool.py`
- Added `gnss_aux` lever arm config to `config_tool.py`
  • Loading branch information
adamshapiro0 committed Dec 18, 2024
2 parents 276e7f5 + fa709ba commit 3f53932
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
23 changes: 10 additions & 13 deletions bin/config_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ def _args_to_point3f(cls, args, config_interface):
return cls(args.x, args.y, args.z)


def _args_to_heading_bias(cls, args, config_interface):
return cls(args.horizontal, args.vertical)


SERIAL_TIMEOUT = 5

DEFAULT_TCP_PORT = 30200
Expand Down Expand Up @@ -418,11 +414,11 @@ def _str_to_socket_type(key):


PARAM_DEFINITION = {
'gnss': {'format': GnssLeverArmConfig, 'arg_parse': _args_to_point3f},
'gnss': {'format': GNSSLeverArmConfig, 'arg_parse': _args_to_point3f},
'gnss_aux': {'format': GNSSAuxLeverArmConfig, 'arg_parse': _args_to_point3f},
'device': {'format': DeviceLeverArmConfig, 'arg_parse': _args_to_point3f},
'orientation': {'format': DeviceCourseOrientationConfig, 'arg_parse': _args_to_coarse_orientation},
'output': {'format': OutputLeverArmConfig, 'arg_parse': _args_to_point3f},
'heading_bias': {'format': HeadingBias, 'arg_parse': _args_to_heading_bias},

'gnss_systems': {'format': EnabledGNSSSystemsConfig, 'arg_parse': _args_to_enabled_gnss_systems},
'gnss_frequencies': {'format': EnabledGNSSFrequencyBandsConfig, 'arg_parse': _args_to_enabled_gnss_frequencies},
Expand Down Expand Up @@ -1220,13 +1216,20 @@ def main():
apply_param_parser = apply_parser.add_subparsers(dest='param', help="The name of the parameter to be modified.")

# config_tool.py apply -- lever arms and device orientation
help = 'The GNSS antenna lever arm (in meters).'
help = 'The primary GNSS antenna lever arm (in meters).'
param_parser.add_parser('gnss', help=help, description=help)
gnss_parser = apply_param_parser.add_parser('gnss', help=help, description=help)
gnss_parser.add_argument('x', type=float, help='The X offset with respect to the vehicle body (in meters).')
gnss_parser.add_argument('y', type=float, help='The Y offset with respect to the vehicle body (in meters).')
gnss_parser.add_argument('z', type=float, help='The Z offset with respect to the vehicle body (in meters).')

help = 'The secondary (auxiliary) GNSS antenna lever arm (in meters).'
param_parser.add_parser('gnss_aux', help=help, description=help)
gnss_parser = apply_param_parser.add_parser('gnss', help=help, description=help)
gnss_parser.add_argument('x', type=float, help='The X offset with respect to the vehicle body (in meters).')
gnss_parser.add_argument('y', type=float, help='The Y offset with respect to the vehicle body (in meters).')
gnss_parser.add_argument('z', type=float, help='The Z offset with respect to the vehicle body (in meters).')

help = 'The device (IMU) lever arm (in meters).'
param_parser.add_parser('device', help=help, description=help)
gnss_parser = apply_param_parser.add_parser('device', help=help, description=help)
Expand All @@ -1241,12 +1244,6 @@ def main():
gnss_parser.add_argument('y', type=float, help='The Y offset with respect to the vehicle body (in meters).')
gnss_parser.add_argument('z', type=float, help='The Z offset with respect to the vehicle body (in meters).')

help = 'The heading horizontal and vertical biases (in degrees).'
param_parser.add_parser('heading_bias', help=help, description=help)
heading_parser = apply_param_parser.add_parser('heading_bias', help=help, description=help)
heading_parser.add_argument('horizontal', type=float, help='The horizontal bias (yaw) in degrees.')
heading_parser.add_argument('vertical', type=float, help='The vertical bias (pitch) in degrees.')

help = 'The orientation of the device (IMU) within the vehicle, specified using the directions of the device +X ' \
'and +Z axes relative to the vehicle body axes (+X = forward, +Y = left, +Z = up).'
param_parser.add_parser('orientation', help=help, description=help)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ argparse-formatter>=1.4
colorama>=0.4.4
construct~=2.10.67
deepdiff>=8.0.1
fusion-engine-client==1.23.6rc2
fusion-engine-client==1.24.0rc1
pynmea2~=1.18.0
pyserial~=3.5
urllib3>=1.21.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"colorama>=0.4.4",
"construct~=2.10.67",
"deepdiff>=8.0.1",
"fusion-engine-client==1.23.6rc2",
"fusion-engine-client==1.24.0rc1",
"psutil>=5.9.4",
"pynmea2~=1.18.0",
"pyserial~=3.5",
Expand Down

0 comments on commit 3f53932

Please sign in to comment.