Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/integration_tests/testplans/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ required_packages:
- example/example_en.yaml
- mock_ais/mock_ais_en_default.yaml
inputs:
- type: ROS
name: cached_fib_in
data:
dtype: uint64
val: 6
- type: ROS
name: aisship
data:
Expand Down Expand Up @@ -93,11 +88,6 @@ inputs:
val: -3

expected_outputs:
- type: ROS
name: cached_fib_out
data:
dtype: uint64
val: 5
- type: ROS
name: aisships
data:
Expand Down
4 changes: 2 additions & 2 deletions src/network_systems/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ For example:
## Testing

Unit tests specific to Network Systems is done using [GoogleTest](https://github.com/google/googletest). Unit tests
are defined per module. For example, under [projects/example/test/](projects/example/test/test_cached_fib.cpp).
are defined per module.

### Run All Tests

Expand All @@ -68,7 +68,7 @@ unnecessary.
### Run and Debug Specific Tests

This is the preferred way to run and debug tests. When you open a test source file like
[the example's](projects/example/test/test_cached_fib.cpp), there will be green arrows next to each `TEST_F` macro.
[the example's](projects/can_transceiver/test/test_can_transceiver.cpp), there will be green arrows next to each `TEST_F` macro.
Clicking a double green arrow runs a test suite, while clicking single green arrow runs one unit test. Right clicking
either arrow will open a prompt with a debug test option. When running a test via the debug option, we can set
breakpoints and step through our code line by line to resolve issues.
Expand Down
6 changes: 1 addition & 5 deletions src/network_systems/config/all_disable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
can_transceiver_node:
ros__parameters:
enabled: false

cached_fib_subscriber:
ros__parameters:
enabled: false


local_transceiver_node:
ros__parameters:
enabled: false
Expand Down
4 changes: 0 additions & 4 deletions src/network_systems/config/default_dev_en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ can_transceiver_node:
ros__parameters:
enabled: true

cached_fib_subscriber:
ros__parameters:
enabled: false

local_transceiver_node:
ros__parameters:
enabled: true
Expand Down
6 changes: 1 addition & 5 deletions src/network_systems/config/default_prod_en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
can_transceiver_node:
ros__parameters:
enabled: true

cached_fib_node:
ros__parameters:
enabled: false


local_transceiver_node:
ros__parameters:
enabled: true
Expand Down
4 changes: 0 additions & 4 deletions src/network_systems/config/example/example_en.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions src/network_systems/launch/main_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(SCRIPT_DIR)
from ros_info import ( # noqa: E402
CACHED_FIB_NODE,
CAN_TRANSCEIVER_NODE,
MOCK_AIS_NODE,
REMOTE_TRANSCEIVER_NODE,
Expand Down Expand Up @@ -87,46 +86,13 @@ def setup_launch(context: LaunchContext) -> List[Node]:
name="ROS_LOG_DIR", value="/workspaces/sailbot_workspace/log"
).visit(context)
launch_description_entities = list()
launch_description_entities.append(get_cached_fib_description(context))
launch_description_entities.append(get_mock_ais_description(context))
launch_description_entities.append(get_can_transceiver_description(context))
launch_description_entities.append(get_remote_transceiver_description(context))
launch_description_entities.append(get_local_transceiver_description(context))
return launch_description_entities


def get_cached_fib_description(context: LaunchContext) -> Node:
"""Gets the launch description for the cached_fib_node.

Args:
context (LaunchContext): The current launch context.

Returns:
Node: The node object that launches the cached_fib_node.
"""
node_name = CACHED_FIB_NODE
ros_parameters = [
global_launch_config,
{"mode": LaunchConfiguration("mode")},
*LaunchConfiguration("config").perform(context).split(","),
]
ros_arguments: List[SomeSubstitutionsType] = [
"--log-level",
[f"{node_name}:=", LaunchConfiguration("log_level")],
]

node = Node(
package=PACKAGE_NAME,
namespace=NAMESPACE,
executable="example",
name=node_name,
parameters=ros_parameters,
ros_arguments=ros_arguments,
)

return node


def get_mock_ais_description(context: LaunchContext) -> Node:
"""Gets the launch description for the mock_ais_node.

Expand Down
1 change: 0 additions & 1 deletion src/network_systems/projects/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
add_subdirectory(mock_ais)
add_subdirectory(can_transceiver)
add_subdirectory(example)
add_subdirectory(local_transceiver)
add_subdirectory(remote_transceiver)

Expand Down
31 changes: 0 additions & 31 deletions src/network_systems/projects/example/CMakeLists.txt

This file was deleted.

13 changes: 0 additions & 13 deletions src/network_systems/projects/example/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions src/network_systems/projects/example/inc/cached_fib.h

This file was deleted.

24 changes: 0 additions & 24 deletions src/network_systems/projects/example/src/cached_fib.cpp

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions src/network_systems/projects/example/test/test_cached_fib.cpp

This file was deleted.

1 change: 0 additions & 1 deletion src/network_systems/ros_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ros_topics:

ros_nodes:
CAN_TRANSCEIVER: can_transceiver_node
CACHED_FIB: cached_fib_node
LOCAL_TRANSCEIVER: local_transceiver_node
MOCK_AIS: mock_ais_node
REMOTE_TRANSCEIVER: remote_transceiver_node