Hi @KaiBo -
As with the discussion earlier in the thread, the approach you describe isn’t particularly logical! If you need information on the vehicle orientation, reading a dedicated IMU with your Arduino Mega and controlling thrusters is certainly possible, but would require developing your own autopilot code to accomplish this - not to mention that messages from a DVL would need to be translated from TCP/IP, or taken in via serial and fused with your motion sensor data.
Your approach would seem to be comparable to taking a car with functional self driving functionality, and rigging up some additional external system that pushes the pedals and turns the wheel based on what is shown on the cars internal display - a bit overcomplicated of an approach when compared to working with the autopilot software directly.
The ArduSub autopilot can read the data from the DVL, and use this to accomplish auto routes navigation via thruster actuation already! If you’d like to add your own code to control this autopilot behavior on a higher level, I’d recommend checking out Lua scripting functionality, as discussed here and documented here.
Sorry for the confusion. I want to use BlueOS to collect data from the Navigator, DVL, and Ping Sonar Altimeter and Echosounder into VS Code. Then, VS Code will send the data to another computer for processing. Based on the processed data, instructions will be sent to an Arduino, which will then output signals to control the servos and T500 thrusters accordingly. Would this approach be simpler than using ArduRover?
Hi @KaiBo -
This data is collected and processed by ArduSub (or ArduRover for surface vehicles a.k.a. boats) for vehicle control, including auto functions (going from waypoint to waypoint in a mission. This autopilot already is sending signals to attached thrusters, depending on the frame type.
If your mention of servos means your vehicle does not fit one of the thruster layouts shown above, then an Arduino, or some other modification to an ArduPilot firmware, or a lua script may be appropriate. It all depends on what your overall goals are for the vehicle?
Thank you for the quick reply! I have another question. Can I run the DVL Python script using the VS Code provided by BlueOS? If so, how does VS Code know which port the DVL is running on?
Hi @KaiBo -
What DVL python script are you referring to? The DVL data typically arrives as mavlink messages that are processed by the autopilot. You could write your own script to interpret this in VS Code, if that’s what you’re asking. Review the documentation for your DVL to see what port it is communicating with!
For the example code on GitHub, if I run it in VS Code on BlueOS with the DVL connected to the Navigator, will it work? Or, as you mentioned, can I simply open MAVLink2Rest and access the DVL data when it is connected to the Navigator?
Additionally, can the Ping Sonar Altimeter & Echosounder and the Ping360 Scanning Imaging Sonar also be accessed in the same way as the DVL to view their data?
Hi @KaiBo -
What exmple code are you referring to? The easiest way to fetch the DVL data is via Mavlink2Rest.
The Ping sonar makes data available on this interface (Rangefinder.distance) but this is only the measured value, and not the full sound profile. For the full return, and for use of the Ping360, Mavlink2Rest does not provide the data. Pingviewer, SonarView, or PingViewer Next can be used to visualize and log the full output from these sonars. Please review the detailed information on the respective product pages!