31 lines
1.1 KiB
GDScript
31 lines
1.1 KiB
GDScript
extends BaseSensorNode
|
|
class_name Lidar2DSensorNode
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
super._ready()
|
|
DataSignals.lidar_2d_data_received.connect(_on_lidar_data_received)
|
|
DataSignals.gps_data_received.connect(_on_gps_data_received)
|
|
DataSignals.accelerometer_data_received.connect(_on_accel_data_received)
|
|
DataSignals.gyroscope_data_received.connect(_on_gyro_data_received)
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|
|
|
|
func _get_sensor_class():
|
|
return "LIDAR_2D"
|
|
|
|
func _on_lidar_data_received(sensor_ip: String, timestamp_list: Array, lidar_point_count: int, lidar_data: Array):pass
|
|
|
|
func _on_gps_data_received(source_ip: String, timestamp_list: Array, new_coordinates: Array, speed_kmh: float, dop: Array):
|
|
pass
|
|
|
|
func _on_accel_data_received(source_ip: String, timestamp_list: Array, accel: Vector3, linear_accel: Vector3, g_accel: Vector3):
|
|
pass
|
|
|
|
func _on_gyro_data_received(source_ip: String, timestamp_list: Array, gyro_data: Array):
|
|
pass
|