ROS2 driver for the Evologics Underwater Modems
- Pass in a
rclcpp::get_logger("dmac2_logger")
logger to allSTREAM
calls - Created a separte message "interface" with all custom messages as its own
cmake project (see
./interfaces/
dir) NodeHandle
s are no longer a thing in ROS2, so had to refactor the TCP parser to instead contain a full node inside, and update the pub/sub components- Note that due to the lack of a centralized
roscore
concept in ROS2, we have to surface this node all the way up to the main executable portion such that we can spin it up using a multi-threaded executor
- Note that due to the lack of a centralized
- Parameter parsing now requires its own node, so we created one to do that at
the
main
level, which we need not sping. - Updated the CMakeLists to be as explicit and clean as possible
-
ATC
- command mode -
ATO
- data mode -
AT@ZX
- extended notifications {0:off 1:on} -
AT?RP
- promiscuous mode {0:off 1:on} -
AT@ZU
- show USBL messages {0:off 1:on} -
ATZ
- restart -
ATI
- 0:firmware 1:phy_proto,data_prot 7:manufacturer -
AT&W
- store settings -
AT?L
- source level (from highest to lowest): {0,1,2,3} -
AT?C
- waveform (2 for network) -
AT?AL
- local address -
AT?CA
- sound speed -
AT?T
- time of flight (ms) -
AT?AM
- maximum number of nodes {2,6,14,30,62,126,254} -
ATN
- noise mode -
AT?E
- noise profiling -
Instant messages:
AT*SENDIM,<length>,<destination address>,<flag>,<data>`
DELIVEREDIM,<destination address>`
FAILEDIM,<destination address>`
CANCELLEDIM,<destination address>`
RECVIM,<length>,<source address>,<destination address>,<flag>,
<duration>,<rssi>,<integrity>,<velocity>,<data>
- Piggyback messages:
AT*SENDPBM,<length>,<destination address>,<data>
CANCELLEDPBM,<destination address>
RECVPBM,<length>,<source address>,<destination address>,
<duration>,<rssi>,<integrity>,<velocity>,<data>
- Position measurements
USBLLONG,<current time>,<measurement time>,<remote address>,
<X>,<Y>,<Z>,<E>,<N>,<U>,<roll>,<pitch>,<yaw>,<propagation time>,
<rssi>,<integrity>,<accuracy>
USBLANGLES,<current time>,<measurement time>,<remote_address>,<lbearing>,
<lelevation>,<bearing>,<elevation>,<roll,>,<pitch>,<yaw>,<rssi>,<integrity>,
<accuracy>
ATH
- close connectionAT?S
- connection statusAT&V
- device settingsAT?LC
- source level controlAT?G
- gain {0 = normal, 1 = low (-20 dB)}AT?AR
- remote addressAT?ZC
- cluster sizeAT?ZP
- packet timeAT?RC
- retry countAT?RT
- retry timeoutAT?ZI
- idle timeoutAT?ZS
- stream numberAT?ZSL
- stream number listAT?ZL
- pool sizeAT?ZD
- propagation counterAT?ZO
- overflow counterAT?UT
- system timeAT?RI
- IM retry countAT?DI
- IM delivery statusAT?DA
- wakeup active timeAT?DT
- wakeup periodAT?ZH
- hold timeoutAT?BL
- local to remote bitrateAT?BR
- remote to local bitrateAT?E
- rssi (dB respect 1V)AT?I
- signal integrityAT?V
- relative velocityAT?P
- multipath structureAT&F
- reset factory settingsAT?PID
- Protocol IDATN -
noise modeAT&E
- signal strength measurementAT?NOISE
- noise analysis{NOISE,<size>,<sample rate>,<gain>,<rssi>,<data>}
ATA -
back to listen stateATS -
switch to deaf stateAT?UP
- estimate pos<sec>,<addr>,<x>,<y>,<z>
AT?UPX
- estimate compensated pose<sec>,<addr>,<E>,<N>,<U>
- Ethernet:
\n
- Serial:
\r
- Answers:
\r\n
TODO: delete this once the port is over.
- For the new logging in ROS2, this was useful: https://robotics.stackexchange.com/questions/96379/global-logger-for-logging-without-a-node.
- Jun 13 11:45 testing, successful connection to LoLo's top-side unit. Sample output:
niklas@niklas-lolo-laptop:~/ros2_ws$ ros2 run dmac2 dmac
[INFO] [1749807068.046989751] [dmac2_logger]: Spinning...
[INFO] [1749807068.047262856] [dmac2_logger]: Connecting to IP: 192.168.0.206, port: 9200
[INFO] [1749807068.066478748] [dmac2_logger]: hasAHRS: 0
[INFO] [1749807068.066564580] [dmac2_logger]: Adding the parser node for TCP/IP mode
[WARN] [1749807068.066874552] [dmac2_logger]: do_close by handle_connect
[WARN] [1749807068.066947899] [dmac2_logger]: connection closed...
[INFO] [1749807068.066997505] [dmac2_logger]: ini: disconnected
[INFO] [1749807069.067296499] [dmac2_logger]: reconnecting
[WARN] [1749807069.067549206] [dmac2_logger]: do_close by handle_connect
[WARN] [1749807069.067621084] [dmac2_logger]: connection closed...
[INFO] [1749807069.067716634] [dmac2_logger]: ini: disconnected
[INFO] [1749807070.067977618] [dmac2_logger]: reconnecting
[WARN] [1749807070.068229130] [dmac2_logger]: do_close by handle_connect
[WARN] [1749807070.068297209] [dmac2_logger]: connection closed...
[INFO] [1749807070.068394903] [dmac2_logger]: ini: disconnected
^C[INFO] [1749807070.236243727] [rclcpp]: signal_handler(signum=2)
niklas@niklas-lolo-laptop:~/ros2_ws$ ros2 run dmac2 dmac
[INFO] [1749807148.059284017] [dmac2_logger]: Spinning...
[INFO] [1749807148.059491063] [dmac2_logger]: Connecting to IP: 192.168.0.206, port: 9200
[INFO] [1749807148.078917385] [dmac2_logger]: hasAHRS: 0
[INFO] [1749807148.079093278] [dmac2_logger]: Adding the parser node for TCP/IP mode
[INFO] [1749807148.080103887] [dmac2_logger]: ini: connected
[INFO] [1749807148.080138499] [dmac2_logger]: (IDLE) -> INTERNAL -> (IDLE)
[INFO] [1749807148.080152362] [dmac2_logger]: Handling INTERNAL in state IDLE
[INFO] [1749807148.080168045] [dmac2_logger]: sending +++AT?MODE
[INFO] [1749807148.084507818] [dmac2_logger]: Parsing new data(0): +++AT?MODE:2:AT
[INFO] [1749807148.084529468] [dmac2_logger]: waitsync_ : 1
[INFO] [1749807148.084538188] [dmac2_logger]: more_:
[INFO] [1749807148.093500542] [dmac2_logger]: (IDLE) -> RCV -> (HANDLE_MODE)
[INFO] [1749807148.093535372] [dmac2_logger]: Handling RCV in state HANDLE_MODE
[INFO] [1749807148.093564472] [dmac2_logger]: command ?MODE, report: AT
[INFO] [1749807148.093581452] [dmac2_logger]: sending +++ATO
[INFO] [1749807148.093707409] [dmac2_logger]: (HANDLE_MODE) -> YAR -> (HANDLE_YAR)
[INFO] [1749807148.093723302] [dmac2_logger]: Handling YAR in state HANDLE_YAR
[INFO] [1749807148.093737795] [dmac2_logger]: sending +++AT@CTRL
- Sample measurement fix:
---
header:
stamp:
sec: 1749816072
nanosec: 536980805
frame_id: usbl
source_id: 2
source_name: '2'
type: 2
relative_position:
x: 1.5884
y: -4.221
z: -0.2256
range: 4.522500038146973
bearing: -1.210878610610962
elevation: -0.04998081177473068
sound_speed: 1500.0
bearing_raw: -1.5738557577133179
elevation_raw: -0.04714258387684822
---