Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
c84cc25
basic setup and partial driver.hpp impl
ToKine0 Oct 9, 2025
c7dc488
fix: initial build setup (driver skeleton)
ToKine0 Oct 15, 2025
977346a
feat(driver): add base implementation of am_driver
ToKine0 Oct 15, 2025
67e2b54
feat: add structs, decode_packet method
ToKine0 Oct 16, 2025
6f92cb4
feat: read_packet implementation
ToKine0 Oct 22, 2025
bd78976
feat: decode_packet implementation
ToKine0 Oct 22, 2025
c9f2a51
feat: report can be requested using request_report, get_report
ToKine0 Oct 23, 2025
725991d
feat: diagnostic mode implementation
ToKine0 Oct 26, 2025
5d7cacd
feat: possible implementation saving report in json file
ToKine0 Oct 26, 2025
f74a53b
feat: possible skeleton ros2 nodes
ToKine0 Oct 26, 2025
ca1bd6d
fix: missing .cpp
ToKine0 Oct 26, 2025
2e202ce
fix: missing .cpp
ToKine0 Oct 26, 2025
3003af0
feat: possible implementation of drone node
ToKine0 Oct 29, 2025
51c7d60
fix(driver): corrected indentation on while loop and starting impleme…
ToKine0 Oct 30, 2025
a7c246f
feat(): skeleton of nodes implementation
ToKine0 Oct 30, 2025
4e99ed4
fix(driver): fixed async_read
ToKine0 Oct 30, 2025
af9b47f
feat(driver): skeleton implementation of process_packet
ToKine0 Nov 2, 2025
50ebb7b
feat(driver): process_packet and append_bits implementation
ToKine0 Nov 5, 2025
01df9df
fix(driver): added two bits before full message in process_packet, to…
ToKine0 Nov 5, 2025
801c375
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 5, 2025
4b40075
fix: corrected code format
ToKine0 Nov 5, 2025
79dde41
fix(driver): from bit to hex, resolved format problem with while loop
ToKine0 Nov 9, 2025
964733b
feat(ros2): publish method implemention using process_packet()
ToKine0 Nov 9, 2025
8bc0aa5
feat: added main in ros2 nodes, removed last bit driver for future se…
ToKine0 Nov 12, 2025
d44320e
feat: skeleton of tdma hybrid implementation and sending based on typ…
ToKine0 Jan 5, 2026
86fe4f6
feat(driver): implemented the sending part, and started the receiving
ToKine0 Jan 6, 2026
975fe10
feat(driver): receiver logic skeleton
ToKine0 Jan 8, 2026
a941c7e
feat(driver): receiving implementation
ToKine0 Jan 9, 2026
88e499d
feat(ros2): adding skeleton of receiving and publishing function
ToKine0 Jan 9, 2026
876b7ec
fix(ros2): added publishing in the right topic
ToKine0 Jan 15, 2026
1751807
feat(TDMA): starting TDMA protcol
ToKine0 Jan 15, 2026
2be2c7e
feat(tdma): setup of tdmamanager
ToKine0 Jan 20, 2026
da66b7a
fix(driver): removed serialDriver libary and added methods with asio
ToKine0 Jan 22, 2026
e0d5a08
feat(test): basics tests to do with socat
ToKine0 Jan 22, 2026
c8788d6
fix(): corrected and commented unuseful methods
ToKine0 Jan 22, 2026
5adf99a
feat(tdma): layer for logic, only tx for now
ToKine0 Feb 13, 2026
bca281a
fix(): fixed some bugs
ToKine0 Feb 26, 2026
66f11aa
fix(async_reader): merged 2 start_async_receive() and async_receive()
ToKine0 Mar 2, 2026
a12627b
fix(read_callback): parsing inside the callback, still using mutex du…
ToKine0 Mar 2, 2026
6a2a232
fix(): removed some comments and slightly reordered code
ToKine0 Mar 3, 2026
5a737b3
feat(driver): acks utilities
ToKine0 Mar 5, 2026
f1d3833
fix(): fixed some names and indentation
ToKine0 Mar 5, 2026
0f63ac4
feat(driver): added in read_callback if to recognize acks
ToKine0 Mar 5, 2026
3ddfac7
feat(tdma): implementation of tdma, needs to be used in ros2 layer in…
ToKine0 Mar 10, 2026
d990da5
feat(driver): added utilities for tdma implementation
ToKine0 Mar 10, 2026
4257c01
feat(tdma): first tdma impl. to be tested, NOT hybrid yet
ToKine0 Mar 12, 2026
71ab7f6
feat(ros2): developed node with tdma NOT hybrid, soon to be generaliz…
ToKine0 Mar 12, 2026
1bca9a0
feat(test): basic tests for tx and rx
ToKine0 Mar 17, 2026
66a383a
fix(driver): basic fix, removed useless include
ToKine0 Mar 17, 2026
4089d68
feat(driver): lines to debug
ToKine0 Mar 17, 2026
60d3495
fix(tdma): changed from saving only the last ack to a queue of pendin…
ToKine0 Mar 19, 2026
7f3f6b3
feat(tdma): basic setup for hybrid implementation
ToKine0 Mar 19, 2026
4a4e82b
feat(driver): persistent mode implementation
ToKine0 Mar 24, 2026
0eb266a
feat(tdma): persistent mode implementation
ToKine0 Mar 24, 2026
e148646
feat(ros2): persistent mode implementation
ToKine0 Mar 24, 2026
919d537
fix: removed useless dependecies from cmake and xml
ToKine0 Mar 26, 2026
64737a3
fix(ros2): fixed some issues with the ros2 files, now builds without …
ToKine0 Mar 26, 2026
51eb272
fix(cmake): correct cmake impl
ToKine0 Mar 26, 2026
56ba2fb
feat(ros2): persistent logic and tdma logic added to base node
ToKine0 Mar 26, 2026
105a6f7
refactor(driver): removed some comments
ToKine0 Mar 27, 2026
2c1d9f0
refactor(tdma): removed some comments
ToKine0 Mar 27, 2026
7c004d5
feat(cmake): added new files
ToKine0 Apr 2, 2026
ef6e0c5
feat(ros2): added implementation for rs422, tx and rx
ToKine0 Apr 2, 2026
35f19ed
feat(driver): added implementation for rs422, tx and rx, added helper…
ToKine0 Apr 2, 2026
6329243
feat(tdma): modified implementation for rs422, tx and rx
ToKine0 Apr 2, 2026
81aa625
feat(config): launch files and changes in driver for rx logic
ToKine0 Apr 3, 2026
9eee052
fix(cmake): wrong dependecies
ToKine0 Apr 3, 2026
d2aabb1
fix(cmake): removed dependecies
ToKine0 Apr 3, 2026
97aeb6f
debug(): logger for debugging
ToKine0 Apr 3, 2026
77312be
fix(driver): timeout issues
ToKine0 Apr 3, 2026
676dfca
fix(driver): fixed timing of sending
ToKine0 Apr 3, 2026
b56a587
fix(): debugging log
ToKine0 Apr 3, 2026
af8ed49
feat(yaml): added the parameter for tdma auto synchronization
ToKine0 Apr 9, 2026
ba7c742
feat(all): added necessary for tdma auto synchronization, including n…
ToKine0 Apr 9, 2026
29b1b7c
feat(TDMA): there is the possibility now to change the estimated prop…
ToKine0 Apr 14, 2026
42f87d7
fix(): testing
ToKine0 Apr 16, 2026
024ba47
fix(driver): added utility before asio
ToKine0 Apr 16, 2026
f2634a8
fix(driver): bug of rx, sometimes it stops receiving
ToKine0 Apr 16, 2026
8d74b1c
refactor(): refactored the structure, making a new basedriver file, c…
ToKine0 Apr 23, 2026
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
140 changes: 70 additions & 70 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,74 @@
#
# See https://github.com/pre-commit/pre-commit

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
exclude_types: [rst]
- id: fix-byte-order-marker
- id: requirements-txt-fixer
# Python hooks
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.2
hooks:
- id: ruff-format
- id: ruff
name: ruff-isort
args: [
"--select=I",
"--fix"
]
- id: ruff
name: ruff-pyupgrade
args: [
"--select=UP",
"--fix"
]
- id: ruff
name: ruff-pydocstyle
args: [
"--select=D",
"--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D401",
"--fix",
]
stages: [pre-commit]
pass_filenames: true
- id: ruff
name: ruff-check
args: [
"--select=F,PT,B,C4,T20,S,N",
"--ignore=T201,N812,B006,S101,S311,S607,S603",
"--fix"
]
stages: [pre-commit]
pass_filenames: true
# C++ hooks
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.7
hooks:
- id: clang-format
args: [--style=file]
# Spellcheck in comments and docs
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ['--write-changes', '--ignore-words-list=theses,fom']
# repos:
# # Standard hooks
# - repo: https://github.com/pre-commit/pre-commit-hooks
# rev: v5.0.0
# hooks:
# - id: check-added-large-files
# - id: check-ast
# - id: check-case-conflict
# - id: check-docstring-first
# - id: check-merge-conflict
# - id: check-symlinks
# - id: check-xml
# - id: check-yaml
# args: ["--allow-multiple-documents"]
# - id: debug-statements
# - id: end-of-file-fixer
# - id: mixed-line-ending
# - id: trailing-whitespace
# exclude_types: [rst]
# - id: fix-byte-order-marker
# - id: requirements-txt-fixer
# # Python hooks
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.12.2
# hooks:
# - id: ruff-format
# - id: ruff
# name: ruff-isort
# args: [
# "--select=I",
# "--fix"
# ]
# - id: ruff
# name: ruff-pyupgrade
# args: [
# "--select=UP",
# "--fix"
# ]
# - id: ruff
# name: ruff-pydocstyle
# args: [
# "--select=D",
# "--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D401",
# "--fix",
# ]
# stages: [pre-commit]
# pass_filenames: true
# - id: ruff
# name: ruff-check
# args: [
# "--select=F,PT,B,C4,T20,S,N",
# "--ignore=T201,N812,B006,S101,S311,S607,S603",
# "--fix"
# ]
# stages: [pre-commit]
# pass_filenames: true
# # C++ hooks
# - repo: https://github.com/pre-commit/mirrors-clang-format
# rev: v20.1.7
# hooks:
# - id: clang-format
# args: [--style=file]
# # Spellcheck in comments and docs
# - repo: https://github.com/codespell-project/codespell
# rev: v2.4.1
# hooks:
# - id: codespell
# args: ['--write-changes', '--ignore-words-list=theses,fom']

ci:
autoupdate_schedule: quarterly
# ci:
# autoupdate_schedule: quarterly
90 changes: 90 additions & 0 deletions acoustic_modem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
cmake_minimum_required(VERSION 3.8)
project(acoustic_modem)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
endif()

# just for debugging
#if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# add_compile_options(-Wall -Wextra -Wpedantic)
#endif()

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)



include_directories(include)

#set(LIB_NAME ${PROJECT_NAME})

add_library(${PROJECT_NAME} SHARED
src/driver/am_driver_single.cpp
src/tdma/tdma_link.cpp
src/tdma/tdma_manager.cpp
src/driver/am_driver_split.cpp
src/driver/am_driver_base.cpp
)



ament_target_dependencies(${PROJECT_NAME}
rclcpp
std_msgs
)

add_executable(am_base_node
src/nodes/am_base_node.cpp
)
target_link_libraries(am_base_node ${PROJECT_NAME})
ament_target_dependencies(am_base_node rclcpp std_msgs)

add_executable(am_drone_node
src/nodes/am_drone_node.cpp
)
target_link_libraries(am_drone_node ${PROJECT_NAME})
ament_target_dependencies(am_drone_node rclcpp std_msgs)

# Install library and headers
install(
TARGETS ${PROJECT_NAME}
EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)


#target_link_libraries()

#install(TARGETS
#am_node
#DESTINATION lib/${PROJECT_NAME}
#)
install(
TARGETS
am_base_node
am_drone_node
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

install(
DIRECTORY config
DESTINATION share/${PROJECT_NAME}
)

install(
DIRECTORY launch
DESTINATION share/${PROJECT_NAME}
)

install(
DIRECTORY include/
DESTINATION include
)


ament_package()

16 changes: 16 additions & 0 deletions acoustic_modem/config/base_single.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
base_node:
ros__parameters:
split_mode: false
device: "/dev/serial0"
baudrate: 9600
channel: 1
level: 4
diagnostic: false
timeout: 0.5
# TDMA config
num_slots: 2
my_slot: 1
slot_duration_sec: 25
guard_ms: 1000
sync_delay: 5
estiamted_prop_delay: 0
17 changes: 17 additions & 0 deletions acoustic_modem/config/base_split.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
base_node:
ros__parameters:
split_mode: true
tx_device: "/tmp/ttyV0"
rx_device: "/tmp/ttyV1"
baudrate: 9600
channel: 1
level: 4
diagnostic: false
timeout: 0.5
# TDMA config
num_slots: 2
my_slot: 1
slot_duration_sec: 25
guard_ms: 1000
sync_delay: 5
estiamted_prop_delay: 0
16 changes: 16 additions & 0 deletions acoustic_modem/config/drone_single.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
drone_node:
ros__parameters:
split_mode: false
device: "/tmp/ttyV0"
baudrate: 9600
channel: 1
level: 4
diagnostic: false
timeout: 0.5
# TDMA config
num_slots: 2
my_slot: 0
slot_duration_sec: 25
guard_ms: 1000
sync_delay: 5
estiamted_prop_delay: 0
17 changes: 17 additions & 0 deletions acoustic_modem/config/drone_split.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
drone_node:
ros__parameters:
split_mode: true
tx_device: "/dev/ttyUSB1"
rx_device: "/dev/ttyUSB0"
baudrate: 9600
channel: 1
level: 4
diagnostic: false
timeout: 0.5
# TDMA config
num_slots: 2
my_slot: 0
slot_duration_sec: 25
guard_ms: 1000
sync_delay: 5
estiamted_prop_delay: 0
Loading
Loading