Skip to content

FIX: Robust loss error calculation - #1161

Merged
ProfFan merged 3 commits into
developfrom
fix/robust_loss_factor
Jul 1, 2022
Merged

ProfFan merged 3 commits into
developfrom
fix/robust_loss_factor

Conversation

@ProfFan

@ProfFan ProfFan commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator

This fixes #1129

@ProfFan
ProfFan requested a review from yetongumich April 8, 2022 01:34
@ProfFan

ProfFan commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator Author

@yetongumich

TEST(NoiseModel, robustNoiseL2WithDeadZone)
{
  double dead_zone_size = 1.0;
  SharedNoiseModel robust = noiseModel::Robust::Create(
      noiseModel::mEstimator::L2WithDeadZone::Create(dead_zone_size),
      Unit::Create(3));

  for (int i = 0; i < 5; i++) {
    Vector3 error = Vector3(i, 0, 0);
    DOUBLES_EQUAL(std::fmax(0, i - dead_zone_size) * i,
                  robust->squaredMahalanobisDistance(error), 1e-8);
  }
}

is failing

@dellaert

dellaert commented Apr 9, 2022

Copy link
Copy Markdown
Member

CI fails

@dellaert

Copy link
Copy Markdown
Member

@ProfFan CI stil fails :-)

@dellaert

Copy link
Copy Markdown
Member

@ProfFan CI fails. Also, would like a better PR comment.

@varunagrawal

Copy link
Copy Markdown
Contributor

@ProfFan @yetongumich can we land this soon? @raabuchanan and I need to use robust noise models for a project we're working on and I would like to see the kinks worked out. :)

@ProfFan

ProfFan commented Jun 29, 2022

Copy link
Copy Markdown
Collaborator Author

@varunagrawal I worked on this for quite a long time trying to figure out why the unit test fails but ran out of time before internship, could you also give an eye on it? I can look at it tomorrow.

@yetongumich

Copy link
Copy Markdown
Contributor

@varunagrawal I worked on this for quite a long time trying to figure out why the unit test fails but ran out of time before internship, could you also give an eye on it? I can look at it tomorrow.

I already figured out why the test failed, maybe we can discuss about how to fix it tomorrow?

@yetongumich

Copy link
Copy Markdown
Contributor

Updated the previous failing unit test.

The previous test is actually testing the WhitenSystem function for robust noise, which was indirectly called through squaredMahalanobisDistance function.

According to the new factorization, WhitenSystem is no longer called for robust noisemodel, therefore this test shall explicitly call WhitenSystem function to get the correct results.

@ProfFan

ProfFan commented Jul 1, 2022

Copy link
Copy Markdown
Collaborator Author

Thanks @yetongumich ! I'll merge this @varunagrawal

@ProfFan
ProfFan merged commit caf659f into develop Jul 1, 2022
@ProfFan
ProfFan deleted the fix/robust_loss_factor branch July 1, 2022 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mEstimator Error with Trust Region Optimizers

4 participants