8000 GitHub - tonioteran/dmac2: ROS2 driver for the Evologics Underwater Modems
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tonioteran/dmac2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dmac2

ROS2 driver for the Evologics Underwater Modems

Main changes to the original dmac driver for ROS2 support

  • Pass in a rclcpp::get_logger("dmac2_logger") logger to all STREAM calls
  • Created a separte message "interface" with all custom messages as its own cmake project (see ./interfaces/ dir)
  • NodeHandles 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
  • 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

Basic commands

  • 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>

Other commands

  • ATH - close connection
  • AT?S - connection status
  • AT&V - device settings
  • AT?LC - source level control
  • AT?G - gain {0 = normal, 1 = low (-20 dB)}
  • AT?AR - remote address
  • AT?ZC - cluster size
  • AT?ZP - packet time
  • AT?RC - retry count
  • AT?RT - retry timeout
  • AT?ZI - idle timeout
  • AT?ZS - stream number
  • AT?ZSL - stream number list
  • AT?ZL - pool size
  • AT?ZD - propagation counter
  • AT?ZO - overflow counter
  • AT?UT - system time
  • AT?RI - IM retry count
  • AT?DI - IM delivery status
  • AT?DA - wakeup active time
  • AT?DT - wakeup period
  • AT?ZH - hold timeout
  • AT?BL - local to remote bitrate
  • AT?BR - remote to local bitrate
  • AT?E - rssi (dB respect 1V)
  • AT?I - signal integrity
  • AT?V - relative velocity
  • AT?P - multipath structure
  • AT&F - reset factory settings
  • AT?PID - Protocol ID
  • ATN - noise mode
  • AT&E - signal strength measurement
  • AT?NOISE - noise analysis {NOISE,<size>,<sample rate>,<gain>,<rssi>,<data>}
  • ATA - back to listen state
  • ATS - switch to deaf state
  • AT?UP - estimate pos <sec>,<addr>,<x>,<y>,<z>
  • AT?UPX - estimate compensated pose <sec>,<addr>,<E>,<N>,<U>

End of line:

  • Ethernet: \n
  • Serial: \r
  • Answers: \r\n

Dev Notes

TODO: delete this once the port is over.

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
---

About

ROS2 driver for the Evologics Underwater Modems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.8%
  • CMake 2.2%
0