Conversion between FixedSizeMatrix and Jacobian
- Dominant language
- Swift
- Stars
- 118
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following test:
```swift
func testPose3SimplePriorFactor() {
let P = Vector3(3.5,-8.2,4.2)
let R = Rot3.fromTangent(Vector3(0.3, 0, 0))
let t1 = Pose3(R, P)
let I = FixedSizeMatrix>.identity
var val = VariableAssignments()
let id1 = val.store(t1) // should be identity matrix
let prior_factor = PriorFactor3(id1, t1)
// Change this to t2, still zero in upper left block
let actual = prior_factor.linearized(at: Tuple1(t1))
print(actual.jacobian)
//assertAllKeyPathEqual(actual.jacobian, I, accuracy: 1e-8)
}
```
`actual.jacobian` is `Array6` and I is `Array6`, so the assertion cannot compile.
@marcrasi Any thoughts? Thanks in advance :)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the testPose3SimplePriorFactor example and inspect the types of actual.jacobian and I, especially FixedSizeMatrix> and Array6>. Trace the relevant Jacobian and FixedSizeMatrix definitions to determine the intended conversion, then run this test; done means the assertion compiles and compares the two values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100