Interface ITransformSystem
Manages a collection of ROS TF transform frames and notifies listeners of changes.
Namespace: Unity.SimulationPro.Foundation
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
public interface ITransformSystem
Remarks
Implementations subscribe to the /tf topic via the Connector
and maintain a live set of TFStream frames representing the robot's
coordinate frame hierarchy.
Properties
Connector
Gets the IConnector used to subscribe to transform messages.
Declaration
IConnector Connector { get; }
Property Value
| Type | Description |
|---|---|
| IConnector |
Methods
AddListener(Action<TFStream>)
Registers a callback to be invoked whenever a transform stream is updated.
Declaration
void AddListener(Action<TFStream> callback)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<TFStream> | callback | The action to invoke with the updated TFStream when a transform changes. |
ForceNotifyAll()
Forces all listeners to be notified of all currently tracked transform streams.
Declaration
void ForceNotifyAll()
ForceNotifyChanged(TFStream)
Forces all listeners to be notified of a change to the specified stream.
Declaration
void ForceNotifyChanged(TFStream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| TFStream | stream | The TFStream that has changed. |
GetOrCreateFrame(string)
Gets the TFStream for the specified frame ID, creating it if it does not exist.
Declaration
TFStream GetOrCreateFrame(string frame_id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | frame_id | The ROS frame ID string. |
Returns
| Type | Description |
|---|---|
| TFStream | The existing or newly created TFStream. |
GetTransform(HeaderMsg)
Gets the most recent transform frame matching the frame ID in the provided header.
Declaration
TFFrame GetTransform(HeaderMsg header)
Parameters
| Type | Name | Description |
|---|---|---|
| HeaderMsg | header | The ROS message header containing the target frame ID. |
Returns
| Type | Description |
|---|---|
| TFFrame | The latest TFFrame for the specified frame, or a default value if not found. |
GetTransformObject(string)
Gets the GameObject associated with the specified frame ID.
Declaration
GameObject GetTransformObject(string frame_id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | frame_id | The ROS frame ID string. |
Returns
| Type | Description |
|---|---|
| GameObject | The associated GameObject, or |
GetTransformStream(string)
Gets the TFStream for the specified frame ID.
Declaration
TFStream GetTransformStream(string frame_id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | frame_id | The ROS frame ID string. |
Returns
| Type | Description |
|---|---|
| TFStream | The TFStream for the frame, or |
GetTransforms()
Returns all currently tracked transform streams.
Declaration
IEnumerable<TFStream> GetTransforms()
Returns
| Type | Description |
|---|---|
| IEnumerable<TFStream> | An enumerable of all active TFStream instances. |