Conversation
FilipAlg
left a comment
There was a problem hiding this comment.
I think more tooltips should be added and I don't see a point to disabling editing of everything during runtime. This to me is one of the great strengths of AGXUnity
| [NonSerialized] | ||
| private Mesh m_nodeGizmoMesh = null; | ||
|
|
||
| private void OnDrawGizmosSelected() | ||
| { | ||
| #if UNITY_EDITOR | ||
| if ( m_nodeGizmoMesh == null ) | ||
| m_nodeGizmoMesh = Resources.Load<Mesh>( @"Debug/Models/HalfSphere" ); | ||
|
|
||
| if ( m_nodeGizmoMesh == null ) | ||
| return; | ||
|
|
||
| Gizmos.color = Color.yellow; | ||
| Gizmos.DrawWireMesh( m_nodeGizmoMesh, | ||
| transform.position, | ||
| transform.rotation, | ||
| Vector3.one * 0.2f ); | ||
| #endif | ||
| } |
There was a problem hiding this comment.
Is this gizmo necessary? Since there is no local offset it is not really unclear where the sensor is
| SensorEnvironment.Instance.Native?.remove( Native ); | ||
|
|
||
| if ( Simulation.HasInstance ) { | ||
| Simulation.Instance.StepCallbacks.PostStepForward -= OnPostStepForward; |
There was a problem hiding this comment.
Should this be post synchronize transforms instead? I can imagine users would like to be able to access IMU data in post step forward
|
|
||
| OutputBuffer = new double[ outputCount ]; | ||
|
|
||
| Simulation.Instance.StepCallbacks.PostStepForward += OnPostStepForward; |
There was a problem hiding this comment.
See other comment regarding callback
| return false; | ||
| } | ||
|
|
||
| PropertySynchronizer.Synchronize( this ); |
There was a problem hiding this comment.
This doesn't do anything right? Native has not yet been created here
| /// <summary> | ||
| /// Cross axis sensitivity | ||
| /// </summary> | ||
| [Tooltip("Cross axis sensitivity")] |
There was a problem hiding this comment.
It's not clear to me just reading this what this property does. Setting it > 1 seems to yield NaN values which suggests that some range should be applied
| { | ||
| SensorEnvironment.Instance.GetInitialized(); | ||
|
|
||
| if ( WheelRadius <= 0.0f ) { |
There was a problem hiding this comment.
Apply this constraint with the ClampAboveZeroInInspector attribute as well
| private double GetSignalResolution() | ||
| { | ||
| return 2.0 * System.Math.PI * WheelRadius / PulsesPerRevolution; | ||
| } |
There was a problem hiding this comment.
| private double GetSignalResolution() | |
| { | |
| return 2.0 * System.Math.PI * WheelRadius / PulsesPerRevolution; | |
| } | |
| private double SignalResolution => 2.0 * System.Math.PI * WheelRadius / PulsesPerRevolution; |
| return null; | ||
| } | ||
|
|
||
| public double GetOutput( OdometerOutput output ) |
| [HideInInspector] | ||
| public bool IsWheelJoint => ConstraintComponent == null || ConstraintComponent is WheelJoint; | ||
|
|
||
| [RuntimeValue] public float SensorValue { get; private set; } |
There was a problem hiding this comment.
Cant we just use this property directly instead of having both OutputBuffer and this?
| [Tooltip("Set the field vector of the uniform magnetic field used in the simulation [in Tesla]")] | ||
| [HideInRuntimeInspector] | ||
| [DynamicallyShowInInspector( "UsingUniformMagneticField" )] | ||
| public Vector3 MagneticFieldVector = new Vector3( 19.462e-6f, 44.754e-6f, 7.8426e-6f ); |
There was a problem hiding this comment.
What are these values based on?
No description provided.