Skip to content

Learn how to develop and integrate custom algorithms into the JuHai USV system.

JuHai system supports extending functionality through plugins.

from jhusv.plugin import Plugin
class MyCustomPlugin(Plugin):
def __init__(self):
super().__init__(
name="my_custom_plugin",
version="1.0.0"
)
def on_load(self):
"""Called when plugin is loaded"""
self.logger.info("Plugin loaded")
def on_telemetry(self, data):
"""Receive telemetry data"""
# Process telemetry data
pass
def on_sensor_data(self, sensor_type, data):
"""Receive sensor data"""
# Process sensor data
pass
from jhusv import PluginManager
manager = PluginManager()
manager.register(MyCustomPlugin())
from jhusv.navigation import PathPlanner
class AStarPlanner(PathPlanner):
def plan(self, start, goal, obstacles):
"""
A* path planning algorithm
Args:
start: Start coordinates (lat, lon)
goal: Goal coordinates (lat, lon)
obstacles: List of obstacles
Returns:
path: List of path points
"""
# Implement A* algorithm
path = self._astar_search(start, goal, obstacles)
return path

For more algorithm development guides, refer to the developer documentation.

Table of Contents

Pages