Skip to content

Commit

Permalink
Merge pull request #17 from ihmcrobotics/feature/update-returns
Browse files Browse the repository at this point in the history
removed unused variables, added some returns, and replaced the moving…
  • Loading branch information
rjgriffin42 authored Oct 29, 2024
2 parents 89c94c9 + 7c418fb commit d514c2c
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 753 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies {
api("net.sf.trove4j:trove4j:3.0.3")
api("com.sun.xml.bind:jaxb-impl:4.0.5")

api("us.ihmc:ihmc-commons:0.33.0")
api("us.ihmc:ihmc-commons:0.34.0")
api("us.ihmc:euclid-frame:0.22.0")
}

Expand All @@ -32,7 +32,7 @@ testDependencies {
api(ihmc.sourceSetProject("main"))
api(ihmc.sourceSetProject("filters"))

api("us.ihmc:ihmc-commons-testing:0.33.0")
api("us.ihmc:ihmc-commons-testing:0.34.0")
api("us.ihmc:euclid-test:0.22.0")
api("org.apache.commons:commons-math3:3.3")
}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
import us.ihmc.euclid.referenceFrame.interfaces.FramePoint2DReadOnly;
import us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly;
import us.ihmc.yoVariables.euclid.referenceFrame.YoFramePoint2D;
import us.ihmc.yoVariables.filters.MovingAverageYoDouble;
import us.ihmc.yoVariables.filters.SimpleMovingAverageFilteredYoVariable;
import us.ihmc.yoVariables.registry.YoRegistry;
import us.ihmc.yoVariables.tools.YoGeometryNameTools;

public class MovingAverageYoFramePoint2D extends YoFramePoint2D
{
private final MovingAverageYoDouble x, y;
private final SimpleMovingAverageFilteredYoVariable x, y;

public MovingAverageYoFramePoint2D(String namePrefix, String nameSuffix, YoRegistry registry, int beta, ReferenceFrame referenceFrame)
public MovingAverageYoFramePoint2D(String namePrefix, String nameSuffix, YoRegistry registry, int windowSize, ReferenceFrame referenceFrame)
{
this(new MovingAverageYoDouble(YoGeometryNameTools.createXName(namePrefix, nameSuffix), registry, beta),
new MovingAverageYoDouble(YoGeometryNameTools.createYName(namePrefix, nameSuffix), registry, beta),
this(new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createXName(namePrefix, nameSuffix), windowSize, registry),
new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createYName(namePrefix, nameSuffix), windowSize, registry),
referenceFrame);
}

public MovingAverageYoFramePoint2D(String namePrefix, String nameSuffix, YoRegistry registry, int beta, YoFramePoint2D unfilteredPoint)
public MovingAverageYoFramePoint2D(String namePrefix, String nameSuffix, YoRegistry registry, int windowSize, YoFramePoint2D unfilteredPoint)
{
this(new MovingAverageYoDouble(YoGeometryNameTools.createXName(namePrefix, nameSuffix), registry, beta, unfilteredPoint.getYoX()),
new MovingAverageYoDouble(YoGeometryNameTools.createYName(namePrefix, nameSuffix), registry, beta, unfilteredPoint.getYoY()),
this(new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createXName(namePrefix, nameSuffix), windowSize, unfilteredPoint.getYoX(), registry),
new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createYName(namePrefix, nameSuffix), windowSize, unfilteredPoint.getYoY(), registry),
unfilteredPoint.getReferenceFrame());
}

private MovingAverageYoFramePoint2D(MovingAverageYoDouble x, MovingAverageYoDouble y, ReferenceFrame referenceFrame)
private MovingAverageYoFramePoint2D(SimpleMovingAverageFilteredYoVariable x, SimpleMovingAverageFilteredYoVariable y, ReferenceFrame referenceFrame)
{
super(x, y, referenceFrame);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
import us.ihmc.euclid.referenceFrame.interfaces.FrameVector2DReadOnly;
import us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly;
import us.ihmc.yoVariables.euclid.referenceFrame.YoFrameVector2D;
import us.ihmc.yoVariables.filters.MovingAverageYoDouble;
import us.ihmc.yoVariables.filters.SimpleMovingAverageFilteredYoVariable;
import us.ihmc.yoVariables.registry.YoRegistry;
import us.ihmc.yoVariables.tools.YoGeometryNameTools;

public class MovingAverageYoFrameVector2D extends YoFrameVector2D
{
private final MovingAverageYoDouble x, y;
private final SimpleMovingAverageFilteredYoVariable x, y;

public MovingAverageYoFrameVector2D(String namePrefix, String nameSuffix, YoRegistry registry, int beta, ReferenceFrame referenceFrame)
public MovingAverageYoFrameVector2D(String namePrefix, String nameSuffix, YoRegistry registry, int windowSize, ReferenceFrame referenceFrame)
{
this(new MovingAverageYoDouble(YoGeometryNameTools.createXName(namePrefix, nameSuffix), registry, beta),
new MovingAverageYoDouble(YoGeometryNameTools.createYName(namePrefix, nameSuffix), registry, beta),
this(new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createXName(namePrefix, nameSuffix), windowSize, registry),
new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createYName(namePrefix, nameSuffix), windowSize, registry),
referenceFrame);
}

public MovingAverageYoFrameVector2D(String namePrefix, String nameSuffix, YoRegistry registry, int beta, YoFrameVector2D unfilteredVector)
public MovingAverageYoFrameVector2D(String namePrefix, String nameSuffix, YoRegistry registry, int windowSize, YoFrameVector2D unfilteredVector)
{
this(new MovingAverageYoDouble(YoGeometryNameTools.createXName(namePrefix, nameSuffix), registry, beta, unfilteredVector.getYoX()),
new MovingAverageYoDouble(YoGeometryNameTools.createYName(namePrefix, nameSuffix), registry, beta, unfilteredVector.getYoY()),
this(new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createXName(namePrefix, nameSuffix), windowSize, unfilteredVector.getYoX(), registry),
new SimpleMovingAverageFilteredYoVariable(YoGeometryNameTools.createYName(namePrefix, nameSuffix), windowSize, unfilteredVector.getYoY(), registry),
unfilteredVector.getReferenceFrame());
}

private MovingAverageYoFrameVector2D(MovingAverageYoDouble x, MovingAverageYoDouble y, ReferenceFrame referenceFrame)
private MovingAverageYoFrameVector2D(SimpleMovingAverageFilteredYoVariable x, SimpleMovingAverageFilteredYoVariable y, ReferenceFrame referenceFrame)
{
super(x, y, referenceFrame);

Expand Down
Loading

0 comments on commit d514c2c

Please sign in to comment.