Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/scripts/grep-gate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Grep gate (epic-129 test-scenarios TS-129-48). Each row is: id <TAB> extended regex <TAB> pathspecs.
# A row passes when `git grep -nE` finds 0 lines. Add a row per slice as the G-rows are switched on.
# Same shape as drawing's .github/scripts/grep-gate.sh.
set -uo pipefail
cd "$(git rev-parse --show-toplevel)"

ROWS=(
# G-18 (S3): the Pose3 maths members are deleted in Drawing 2.0; Frame3.Interpolate/Distance/FromSurface replace them.
$'G-18\t\\bPose3(d|<[^>]*>)?\\.(Lerp|Distance|FromSurface)\\b\tcsharp/'
# G-18a (S3, epic-129 test-scenarios numbering): no Euler rotation algebra on Rotation3 and no direction → Euler shortcut
# (Rotation3.Combine/Slerp and Vector3.RotationTo are deleted; use Quaternion.Slerp / Quaternion.FromTo).
$'G-18a\t\\bRotation3(d|<[^>]*>)?\\.(Combine|Slerp|Inverse|Rotate|ToMatrix3x3)\\b|\\bRotationTo\\s*\\(\tcsharp/'
)

failed=0
for row in "${ROWS[@]}"; do
IFS=$'\t' read -r id pattern paths <<<"$row"
# shellcheck disable=SC2086 # pathspecs are space-separated on purpose
hits=$(git grep -nE "$pattern" -- $paths)
count=$(printf '%s' "$hits" | grep -c . || true)
echo "$id: $count line(s) [git grep -nE '$pattern' -- $paths]"
if [ "$count" -ne 0 ]; then
printf '%s\n' "$hits"
echo "::error::grep gate $id found $count line(s)"
failed=1
fi
done
exit $failed
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,28 @@ on:
paths:
- 'csharp/**'
- '.github/workflows/test.yml'
- '.github/scripts/grep-gate.sh'
pull_request:
paths:
- 'csharp/**'
- '.github/workflows/test.yml'
- '.github/scripts/grep-gate.sh'

permissions:
contents: read

jobs:
grep-gate:
# epic-129 TS-129-48: deleted names cannot come back. One row per G-row switched on; a row fails on any line.
name: grep-gate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Grep gate
run: .github/scripts/grep-gate.sh

csharp:
name: C# tests
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion csharp/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<!-- Fallback version for any build that does NOT pass /p:Version (local dev, source/project
references). Keep this >= every published release and every consumer's compiled reference
so roll-forward always succeeds. Bump on each release alongside the git tag. -->
<Version Condition="'$(Version)' == ''">3.2.0</Version>
<Version Condition="'$(Version)' == ''">3.3.0</Version>

<!-- AssemblyVersion / FileVersion track the package Version (strip any prerelease suffix such
as -preview1; AssemblyVersion must be purely numeric). The CLR pads a 3-part value to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void NonIdentityPoseChain_MatchesHandComputedGroundTruth()
// Independent ground truth: pick a point Q in the camera frame, map it into base
// frame with the SAME composition the projector uses, then assert the projector
// recovers the pinhole pixel of Q.
var cameraToBase = gripper * handEye;
var cameraToBase = Frame3<double>.FromPose3(gripper, 1.0) * Frame3<double>.FromPose3(handEye, 1.0);
var qCamera = new Point3d(12, -7, 250);
var basePoint = cameraToBase.TransformPoint(qCamera);

Expand All @@ -149,7 +149,7 @@ public void NonIdentityPoseChain_PointBehindCamera_ReturnsFalse()
var handEye = new Pose3d(5, -3, 50, 0, 0, 90);
var p = Projector(intr, handEye, gripper);

var cameraToBase = gripper * handEye;
var cameraToBase = Frame3<double>.FromPose3(gripper, 1.0) * Frame3<double>.FromPose3(handEye, 1.0);
var behind = cameraToBase.TransformPoint(new Point3d(0, 0, -50));

var ok = p.TryProjectToPixel(behind, out var pixel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Emgu.CV" Version="4.11.0.5746" />
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
<PackageReference Include="ModelingEvolution.Mjpeg" Version="1.4.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public interface IDistanceSensorViewLocator
/// <para>
/// To sample multiple points on the same plane (e.g. the auto-probe's center +
/// along-travel + perpendicular triple per FR-3.1), the caller composes translated
/// planes via <c>plane + Vector3</c> rather than passing a separate offset argument.
/// planes via <c>plane with { Position = plane.Position + offset }</c> rather than passing a separate offset argument.
/// </para>
/// <para>
/// <b>Roll-about-beam.</b> Aiming the beam pins two rotational degrees of freedom
/// (azimuth + elevation); the third — roll about the beam axis — is determined by
/// the implementation's chosen orthonormal-frame convention. Two calls with planes
/// that differ only by translation may produce TCP poses with the same azimuth /
/// elevation but different rolls if the impl uses a non-deterministic rotation
/// selector (e.g. <c>Vector3.RotationTo</c>'s shortest-arc rotation, which is
/// selector (e.g. <c>Quaternion.FromTo</c>'s shortest-arc rotation, which is
/// geometrically valid but depends on the starting axis). Implementations that need
/// stable roll across multi-sample probing (FR-3.1) must pin a third axis explicitly
/// — see the camera-side precedent in rocket-welder2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
regression; RocketWelder.SDK.Devices.Motion.Tests/TransportDependencyTests fails the Tests
workflow (.github/workflows/test.yml) if it happens. -->
<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.13.0.71" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 11 additions & 6 deletions csharp/RocketWelder.SDK.Devices.Robot/RobotMotionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,17 @@ private static (Pose3<double> Entry, Pose3<double> Via, Pose3<double> Exit)? Com
var centre = vertex.Position + (radiusMm / Math.Sin(halfAngle)) * bisector;
var via = centre - radiusMm * bisector;

var entryRotation = Rotation3<double>.Slerp(prev.Rotation, vertex.Rotation, (edgeIn - setback) / edgeIn);
var exitRotation = Rotation3<double>.Slerp(vertex.Rotation, next.Rotation, setback / edgeOut);
var viaRotation = Rotation3<double>.Slerp(entryRotation, exitRotation, 0.5);
// Rotation maths on quaternions (epic-129 design rule 2); Rotation3 is the wire format, converted once
// in and once out.
var qPrev = prev.Rotation.ToQuaternion();
var qVertex = vertex.Rotation.ToQuaternion();
var qNext = next.Rotation.ToQuaternion();
var entryRotation = Quaternion<double>.Slerp(qPrev, qVertex, (edgeIn - setback) / edgeIn);
var exitRotation = Quaternion<double>.Slerp(qVertex, qNext, setback / edgeOut);
var viaRotation = Quaternion<double>.Slerp(entryRotation, exitRotation, 0.5);

return (new Pose3<double>(entryTangent, entryRotation),
new Pose3<double>(via, viaRotation),
new Pose3<double>(exitTangent, exitRotation));
return (new Pose3<double>(entryTangent, Rotation3<double>.FromQuaternion(entryRotation)),
new Pose3<double>(via, Rotation3<double>.FromQuaternion(viaRotation)),
new Pose3<double>(exitTangent, Rotation3<double>.FromQuaternion(exitRotation)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
<PackageReference Include="ModelingEvolution.JsonParsableConverter" Version="1.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
<PackageReference Include="ModelingEvolution.Signals" Version="2.0.1.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion csharp/RocketWelder.SDK.Hmi/RocketWelder.SDK.Hmi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
<PackageReference Include="BlazorBlaze" Version="1.1.5" />
<PackageReference Include="BlazorBlaze.Server" Version="1.1.5" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
<ProjectReference Include="..\RocketWelder.SDK.Vision\RocketWelder.SDK.Vision.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
<PackageReference Include="ModelingEvolution.JsonParsableConverter" Version="1.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.7" />
<PackageReference Include="ModelingEvolution.Drawing" Version="1.9.8.75" />
<PackageReference Include="ModelingEvolution.Drawing" Version="2.0.0.72" />
<!-- Epic 091: IProgramContext.Signal hands programs a WritableSignal<float>. Same version the device
packages (Devices.Welding, Devices.Motion) already carry; the host lists this assembly among its
shared-prefix (off-TPA) assemblies, so the type is identical on both sides of a program's ALC. -->
Expand Down
Loading
Loading