Skip to content

Commit 4e76b6e

Browse files
committed
Remove dead code in NMEANode and its launch file
1 parent d12c0bb commit 4e76b6e

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

ros/gisnav/gisnav/extensions/nmea_node.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
mock GPS (GNSS) messages as NMEA sentences to ROS
33
"""
44
from datetime import datetime
5-
from typing import Final, Optional, Tuple
5+
from typing import Final, Tuple
66

77
import numpy as np
88
import pynmea2
@@ -27,12 +27,6 @@ class NMEANode(MockGPSNode):
2727
ROS_D_DEM_VERTICAL_DATUM = 5703
2828
"""Default for :attr:`.dem_vertical_datum`"""
2929

30-
ROS_D_PORT = "/dev/ttyS1"
31-
"""Default for :attr:`.port`"""
32-
33-
ROS_D_BAUDRATE = 9600
34-
"""Default for :attr:`.baudrate`"""
35-
3630
# EPSG code for WGS 84 and a common mean sea level datum (e.g., EGM96)
3731
_EPSG_WGS84 = 4326
3832
_EPSG_MSL = 5773 # Example: EGM96
@@ -61,22 +55,10 @@ def __init__(self, *args, **kwargs):
6155
# Subscribe
6256
self.odometry
6357

64-
@property
65-
@ROS.parameter(ROS_D_PORT, descriptor=_ROS_PARAM_DESCRIPTOR_READ_ONLY)
66-
def port(self) -> Optional[str]:
67-
"""Serial port for outgoing NMEA messages"""
68-
69-
@property
70-
@ROS.parameter(ROS_D_BAUDRATE, descriptor=_ROS_PARAM_DESCRIPTOR_READ_ONLY)
71-
def baudrate(self) -> Optional[int]:
72-
"""Baudrate for outgoing NMEA messages"""
73-
7458
def _publish(self, mock_gps_dict: MockGPSNode.MockGPSDict) -> None:
7559
eph_sqrd = mock_gps_dict["eph"] ** 2
7660
epv_sqrd = mock_gps_dict["epv"] ** 2
7761

78-
self.get_logger().info(f"publishin {mock_gps_dict}")
79-
8062
self.publish_nmea_sentences(
8163
rms=np.sqrt(eph_sqrd + epv_sqrd),
8264
sd_x=np.sqrt(eph_sqrd / 2),
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# The port can be overridden via launch args in default launch file
2-
# It probably should not be statically declared here because the appropriate
3-
# outbound port should probably be some pseudo-tty (virtual serial port) on a
4-
# development machine --> use launch args to provide suitable port instead
51
gisnav:
62
nmea_node:
7-
ros__parameters:
8-
baudrate: 115200
9-
#port: "/dev/ttyS1"
3+
ros__parameters: []

0 commit comments

Comments
 (0)