Class TwistDefaultVisualizer
Default visualizer for geometry_msgs/Twist messages. Draws a linear-velocity arrow and an angular-velocity ring at a configurable origin.
Inheritance
Inherited Members
Namespace: Unity.SimulationPro.Foundation.Visualizations
Assembly: Unity.SimulationPro.Foundation.Visualizations.dll
Syntax
public class TwistDefaultVisualizer : DrawingVisualizer<TwistMsg>, IVisualFactory, IPriority
Fields
lengthScale
The lengthScale.
Declaration
public float lengthScale
Field Value
| Type | Description |
|---|---|
| float |
origin
Optional GameObject whose world position serves as the drawing origin; if null, the world origin is used.
Declaration
public GameObject origin
Field Value
| Type | Description |
|---|---|
| GameObject |
sphereRadius
The sphereRadius.
Declaration
public float sphereRadius
Field Value
| Type | Description |
|---|---|
| float |
thickness
Line thickness in world units for drawing vectors and arcs.
Declaration
public float thickness
Field Value
| Type | Description |
|---|---|
| float |
Methods
CreateGUI(TwistMsg, MessageMetadata)
Creates a GUI callback that renders an Inspector panel for the message data.
Declaration
public override Action CreateGUI(TwistMsg message, MessageMetadata meta)
Parameters
| Type | Name | Description |
|---|---|---|
| TwistMsg | message | The message data to visualize. |
| MessageMetadata | meta | Metadata about the received message (topic, timestamp, frame). |
Returns
| Type | Description |
|---|---|
| Action | An action that draws the GUI. |
Overrides
Draw(Drawing3d, TwistMsg, MessageMetadata)
Draws a 3D visualization of the message data.
Declaration
public override void Draw(Drawing3d drawing, TwistMsg message, MessageMetadata meta)
Parameters
| Type | Name | Description |
|---|---|---|
| Drawing3d | drawing | The 3D drawing context to render into. |
| TwistMsg | message | The message data to visualize. |
| MessageMetadata | meta | Metadata about the received message (topic, timestamp, frame). |
Overrides
Draw<C>(TwistMsg, Drawing3d, Color, Vector3, float, float, float)
Draws a linear-velocity arrow and an angular-velocity ring for the given TwistMsg using the specified coordinate space.
Declaration
public static void Draw<C>(TwistMsg message, Drawing3d drawing, Color color, Vector3 origin, float lengthScale = 1, float sphereRadius = 1, float thickness = 0.01) where C : ICoordinateSpace, new()
Parameters
| Type | Name | Description |
|---|---|---|
| TwistMsg | message | The message data to visualize. |
| Drawing3d | drawing | The Drawing3d to draw into. |
| Color | color | RGBA color. |
| Vector3 | origin | The world-space origin position for drawing. |
| float | lengthScale | Multiplier applied to the linear velocity vector length. |
| float | sphereRadius | Radius of the angular-velocity ring in world units. |
| float | thickness | Line thickness in world units. |
Type Parameters
| Name | Description |
|---|---|
| C | The coordinate space of the message data. |