Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
39a0f69
[Communication] Added Latency Table.
Joseph0120 Mar 31, 2026
3cda0d9
[Communication] Added Message base envelope. Message.cs.
Joseph0120 Mar 31, 2026
654200d
[Communication] Created IMessagePayload and MessagePayload.
Joseph0120 Mar 31, 2026
817b527
[Communication] Created PendingMessage.cs.
Joseph0120 Mar 31, 2026
7df0a54
[Comms_Proto] Minor Fix: format
Joseph0120 Apr 5, 2026
3c1451f
[Comms_Proto] Fixing LatencyTable enum casting
Joseph0120 Apr 5, 2026
c9b5442
[Comms_Proto] PendingMessage.cs extends IComparable
Joseph0120 Apr 5, 2026
d355a1d
[Comms_Proto] Minor Fix: LatencyTable
Joseph0120 Apr 5, 2026
0ea3e23
[Comms_Proto] Minor Fix: Format
Joseph0120 Apr 5, 2026
6072c61
Apply formatting and regenerate proto files
Joseph0120 Apr 23, 2026
635f3ba
Delete Assets/Scripts/Agents/Messaging/IMessagePayload.cs.meta
Joseph0120 Apr 28, 2026
ff380c4
Delete Assets/Scripts/Agents/Messaging/LatencyTable.cs.meta
Joseph0120 Apr 28, 2026
5796d89
Delete Assets/Scripts/Agents/Messaging/LatencyTable.cs
Joseph0120 Apr 28, 2026
50f13a2
Delete Assets/Scripts/Agents/Messaging/Message.cs.meta
Joseph0120 Apr 28, 2026
2eef48a
Delete Assets/Scripts/Agents/Messaging/MessagePayload.cs.meta
Joseph0120 Apr 28, 2026
f51564d
Delete Assets/Scripts/Agents/Messaging.meta
Joseph0120 Apr 28, 2026
fef6709
[Communication] Resolved git comments
Joseph0120 May 6, 2026
2df0800
[Communication] Set up IADS proxy for Mailbox use.
Joseph0120 Apr 1, 2026
c0da0a5
[Communication] Updated CodeRabbit Comments
Joseph0120 Apr 28, 2026
78f72d1
[Communication] Implemented new versio for IadsCommsAgent, supporting…
Joseph0120 Apr 28, 2026
8ed1ce6
[Communication] Passed all IadsCommsAgent Tests
Joseph0120 Apr 28, 2026
031b71f
fixed coderaddit comments and updated tests.
Joseph0120 May 22, 2026
f84bd33
[Communication] Fixed Compilation Error
Joseph0120 May 23, 2026
69baf46
[Packages] Revert packages-lock changes
Joseph0120 May 26, 2026
63f4f99
[Communication] Update Unity, and PR2 follow PR1 communication format
Joseph0120 May 26, 2026
79af713
[Communication] Added Meta Files and Updated Library directory
Joseph0120 May 29, 2026
d9dbe89
[Communication] Regenerated particle pack directory
Joseph0120 May 29, 2026
de5967d
[Communication] Fixed Titan's Comments
Joseph0120 May 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
122 changes: 122 additions & 0 deletions Assets/Scripts/IADS/IadsCommsAgent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
using System;
using UnityEngine;

// IADS proxy for supporting mailbox message sending and receiving.

public class IadsCommsAgent : MonoBehaviour, IAgent {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not inherit from AgentBase or even DummyAgent?

@Joseph0120 Joseph0120 May 30, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought AgentBase is only for physical agents (ie. mass and velocity and other parameters). Goal of IadsCommsAgent is just to add a communication "interface" for the IADS.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily, I think. Right now, you're implementing a lot of pieces of the interface that make it seem like a dummy agent.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you addressed this? @Joseph0120

public event AgentTerminatedEventHandler OnTerminated;

// Hierarchical node linked to the IADS mailbox endpoint.
[SerializeReference]
private HierarchicalAgent _hierarchicalAgent;

// Placeholder velocity set to zero for IADS.
[SerializeField]
private Vector3 _velocity = Vector3.zero;

// Placeholder acceleration set to zero for IADS.
[SerializeField]
private Vector3 _acceleration = Vector3.zero;

// Placeholder accelerationInput set to zero for IADS.
[SerializeField]
private Vector3 _accelerationInput = Vector3.zero;
Comment thread
Joseph0120 marked this conversation as resolved.

public HierarchicalAgent HierarchicalAgent {
get => _hierarchicalAgent;
set => _hierarchicalAgent = value;
}
Comment thread
tryuan99 marked this conversation as resolved.

public Configs.StaticConfig StaticConfig { get; set; }
public Configs.AgentConfig AgentConfig { get; set; }
public IMovement Movement { get; set; }
public IController Controller { get; set; }
public ISensor Sensor { get; set; }
public IAgent TargetModel { get; set; }

public Vector3 Position {
get => transform.position;
set => transform.position = value;
}

public Vector3 Velocity {
get => _velocity;
set => _velocity = value;
}

public float Speed => _velocity.magnitude;

public Vector3 Acceleration {
get => _acceleration;
set => _acceleration = value;
}

public Vector3 AccelerationInput {
get => _accelerationInput;
set => _accelerationInput = value;
}

public bool IsPursuer => false;

// Setting ElpasedTime has to be dependent on SimManager to have uniform clock time.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
public float ElapsedTime =>
SimManager.Instance?.ElapsedTime ??
throw new InvalidOperationException(
$"{nameof(IadsCommsAgent)} requires {nameof(SimManager)} to provide deterministic simulation time.");
public bool IsTerminated { get; private set; } = false;

public Transform Transform => transform;
public Vector3 Up => transform.up;
public Vector3 Forward => transform.forward;
public Vector3 Right => transform.right;
public Quaternion InverseRotation => Quaternion.Inverse(transform.rotation);

public float MaxForwardAcceleration() {
throw CreateUnsupportedException(nameof(MaxForwardAcceleration));
}

public float MaxNormalAcceleration() {
throw CreateUnsupportedException(nameof(MaxNormalAcceleration));
}

public void CreateTargetModel(IHierarchical target) {
throw CreateUnsupportedException(nameof(CreateTargetModel));
}

public void DestroyTargetModel() {
throw CreateUnsupportedException(nameof(DestroyTargetModel));
}

public void UpdateTargetModel() {
throw CreateUnsupportedException(nameof(UpdateTargetModel));
}

public void Terminate() {
if (IsTerminated) {
return;
}
IsTerminated = true;
OnTerminated?.Invoke(this);
}

public Transformation GetRelativeTransformation(IAgent target) {
throw CreateUnsupportedException($"{nameof(GetRelativeTransformation)}(IAgent)");
}

public Transformation GetRelativeTransformation(IHierarchical target) {
throw CreateUnsupportedException($"{nameof(GetRelativeTransformation)}(IHierarchical)");
}

public Transformation GetRelativeTransformation(in Vector3 waypoint) {
throw CreateUnsupportedException($"{nameof(GetRelativeTransformation)}(Vector3)");
}

private NotSupportedException CreateUnsupportedException(string memberName) {
string targetModelState =
TargetModel == null
? " TargetModel is null on this proxy."
: " TargetModel is set on this proxy, which indicates the mailbox-only IADS proxy is being used as a physical agent.";
return new NotSupportedException(
$"{nameof(IadsCommsAgent)}.{memberName} is unsupported because {nameof(IadsCommsAgent)} is a comms-only mailbox proxy, not a physical/sensing agent.{targetModelState}");
}
}
2 changes: 2 additions & 0 deletions Assets/Scripts/IADS/IadsCommsAgent.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Assets/Tests/EditMode/IadsCommsAgentTests.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading