Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8183169
Framework for a trigger kick message.
christiandebuys Mar 25, 2024
ed74294
Kick input parameters are now set through TriggerKickCommand.
christiandebuys Mar 26, 2024
07b496c
Removing unneeded change.
christiandebuys Mar 26, 2024
2191111
Kick message now has a weight distribution parameter.
christiandebuys Apr 1, 2024
a3a8758
Kick door behavior boiler plate.
christiandebuys Apr 4, 2024
99865e1
Merge branch 'develop' into feature/kick_door_message
christiandebuys Apr 4, 2024
a1b306f
Behavior tree state message boiler plate.
christiandebuys Apr 4, 2024
633106b
All (hopefully) of the behavior tree boilerplate for kicking is in pl…
christiandebuys Apr 5, 2024
bc6ef84
Fixed a communication issue.
christiandebuys Apr 5, 2024
03600dc
Added side selection.
christiandebuys Apr 5, 2024
16c6864
Merge branch 'refs/heads/develop' into feature/kick_door_message
christiandebuys Apr 5, 2024
3796af8
Merge branch 'refs/heads/develop' into feature/kick_door_message
christiandebuys Apr 8, 2024
2c91afe
Added a button to add a box placeholder for the door handle.
christiandebuys Apr 9, 2024
fe0eafe
Merge branch 'refs/heads/develop' into feature/kick_door_message
christiandebuys Apr 10, 2024
39dcc7d
started setting up the approach action for the door kick behavior
rjgriffin42 Apr 10, 2024
f8cba8c
set up the rdx values and did some set ups
rjgriffin42 Apr 10, 2024
da31411
got the behavior running, but not correctly
rjgriffin42 Apr 10, 2024
d3b4fcb
Added some missing changes to accommodate the new behavior. Still nee…
christiandebuys Apr 10, 2024
768b4df
reconfigured some of the way the behavior tree calls were structured …
rjgriffin42 Apr 10, 2024
1d7f671
fixed a bunch of non-conflicting merge conflicts
rjgriffin42 Apr 10, 2024
8069309
fixed a few other conflicts
rjgriffin42 Apr 10, 2024
16ce7e5
Temp fix to get the robot in the right spot.
christiandebuys Apr 10, 2024
cafc234
set the parent frame up to be mutable, but things are still wrong
rjgriffin42 Apr 10, 2024
266895b
piped through the weight distribution from the input parameters for t…
rjgriffin42 Apr 10, 2024
2f00f3a
started rendering the kick height
rjgriffin42 Apr 10, 2024
1fc07de
Got the footstep plan working in the correct frame. Added messages to…
christiandebuys Apr 10, 2024
25f129c
Added an update for the parent frame in the state. The frame is getti…
christiandebuys Apr 11, 2024
5de4d46
Fixed the timer.
christiandebuys Apr 11, 2024
2332d15
Added steps for squaring up. Need to debug a reference frame going mi…
christiandebuys Apr 15, 2024
9db9406
Corrected the square up steps. Hopefully fixed the reference frame nu…
christiandebuys Apr 16, 2024
6ac0d59
Switched to using a detachable reference frame to keep with behavior …
christiandebuys Apr 16, 2024
79054a6
Added kicking back to the ControllerAPI and partially fixed the world…
christiandebuys Apr 17, 2024
17f4db5
did some tuning on the way the behaviors worked to get things to actu…
Apr 18, 2024
ce22789
Name refactor to KickDoorMessage.msg
christiandebuys Apr 19, 2024
4a85992
Merge branch 'refs/heads/develop' into feature/kick_door_message
christiandebuys Apr 19, 2024
8239166
Removing old comments.
christiandebuys Apr 19, 2024
4c3a7d7
Merge branch 'refs/heads/develop' into feature/kick_door_message
christiandebuys Jul 9, 2024
1591088
Fixes needed after merge due to behavior refactor.
christiandebuys Jul 9, 2024
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package us.ihmc.commonWalkingControlModules.donkeyKick;

import us.ihmc.humanoidRobotics.communication.controllerAPI.command.KickDoorCommand;
import us.ihmc.robotics.robotSide.RobotSide;
import us.ihmc.yoVariables.registry.YoRegistry;
import us.ihmc.yoVariables.variable.YoDouble;
import us.ihmc.yoVariables.variable.YoEnum;

public class KickInputParameters
{
private YoEnum<RobotSide> kickFootSide; // side for the foot to kick
private YoDouble kickHeight; // height of where you want the kick
private YoDouble kickImpulse; // Newton-seconds
private YoDouble kickTargetDistance;
private YoDouble prekickWeightDistribution;

public KickInputParameters(YoRegistry parentRegistry)
{
YoRegistry registry = new YoRegistry(getClass().getSimpleName());

kickFootSide = new YoEnum<>("inputKickFootSide", registry, RobotSide.class);
kickHeight = new YoDouble("inputKickHeight", registry);
kickImpulse = new YoDouble("inputKickImpulse", registry);
kickTargetDistance = new YoDouble("inputKickTargetDistance", registry);
prekickWeightDistribution = new YoDouble("inputPrekickWeightDistribution", registry);

// These default parameters are generally overwritten with set(KickDoorCommand kickMessage)
kickFootSide.set(RobotSide.LEFT);
kickHeight.set(0.55);
kickImpulse.set(55.0);
kickTargetDistance.set(0.75);
prekickWeightDistribution.set(0.5);

if (parentRegistry != null)
parentRegistry.addChild(registry);
}

public double getKickHeight()
{
return kickHeight.getDoubleValue();
}

public double getKickImpulse()
{
return kickImpulse.getDoubleValue();
}

public double getKickTargetDistance()
{
return kickTargetDistance.getDoubleValue();
}

public RobotSide getKickFootSide()
{
return kickFootSide.getEnumValue();
}

public double getPrekickWeightDistribution()
{
return prekickWeightDistribution.getDoubleValue();
}

public void setKickHeight(double kickHeight)
{
this.kickHeight.set(kickHeight);
}

public void setKickImpulse(double kickImpulse)
{
this.kickImpulse.set(kickImpulse);
}

public void setKickTargetDistance(double kickTargetDistance)
{
this.kickTargetDistance.set(kickTargetDistance);
}

public void setKickFootSide(RobotSide kickFootSide)
{
this.kickFootSide.set(kickFootSide);
}

public void setPrekickWeightDistribution(double prekickWeightDistribution)
{
this.prekickWeightDistribution.set(prekickWeightDistribution);
}

public void set(KickDoorCommand kickMessage)
{
setKickFootSide(kickMessage.getRobotSide());
setKickHeight(kickMessage.getKickHeight());
setKickImpulse(kickMessage.getKickImpulse());
setKickTargetDistance(kickMessage.getKickTargetDistance());
setPrekickWeightDistribution(kickMessage.getPrekickWeightDistribution());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
package us.ihmc.commonWalkingControlModules.donkeyKick;

public class KickParameters
{
private static final double desiredCoMHeight = 0.85;

private static final double coefficientOfFriction = 0.75;

// When computing the touchdown position to remain stable, this is the extra length to step, as a safety margin
private static final double extraStepLengthInTouchdownForSafety = 0.25; // m
// When computing the touchdown positino to remain stable, this is the minimum step length
private static final double minTouchdownStepDistance = 0.15; // m

// This is how long we can estimate the force will be applied. This is used to determine how hard the foot should push for
private static final double estimatedImpactDuration = 0.05; // s
// This is the desired height of the foot at the end of chambering, relative to stance
private static final double kickChamberHeight = 0.18; // m
// This is the position of the foot at the end of chambering, relative to stance.
private static final double kickChamberX = 0.25; // m
// This is the mass of the kick leg to assume in order to generate the right amount of angular momentum
private static final double kickLegMass = 100.0; // kg
private static final double kickPickUpVelocity = 0.25; // m/s

// This is a shift of the desired CoP position towards the inside of the foot when computing the dynamic planner.
private static final double copShiftInside = 0.02; // m
// This cheats the goal position of hte ACP at the touchdown event towards the inside, trying to incentivize the ACP position to be further
// horizontally the stance foot
private static final double endACPCheatInside = 0.02; // m

// Defines how far past the target the touchdown position should be. Positive is further away, negative is closer.
private static final double desiredTouchdownPositionRelativeToTarget = -0.15; // m
private static final double touchdownHeightSpeed = 1.0; // m /s

private double preShiftWeightDistribution = 0.75; // percentage
private static final double preShiftDuration = 2.5; // s
private static final double shiftDuration = 0.5; // s // TODO make this a computed value
private static final double chamberDuration = 0.25; // s
private static final double pushDuration = 0.2; // s

private static final double maxAnkleVelocity = 2.5; // rad/s

private static final double kickShiftProximityThreshold = 0.01;
private static final double kickMinTimeInContact = 0.05;
private static final double minFractionThroughTouchdownToDetectContact = 0.85;

private static final double kickPenetrationThreshold = 0.04;

private static final double kpICP = 15.0;
private static final double maxCMPFeedack = 0.10;
private static final double minCMPFeedack = 0.10;
private static final double cmpDistanceInside = 0.005;
private static final double cmpDistanceInsideInTouchdown = 0.025;
private static final double maxCMPRate = 5.0;

private final KickingWBCCParameters fastWalkingWBCCParameters = new KickingWBCCParameters();

public void setPreShiftWeightDistribution(double preShiftWeightDistribution)
{
this.preShiftWeightDistribution = preShiftWeightDistribution;
}

public double getDesiredCoMHeight()
{
return desiredCoMHeight;
}

public double getCoefficientOfFriction()
{
return coefficientOfFriction;
}

public double getExtraStepLengthInTouchdownForSafety()
{
return extraStepLengthInTouchdownForSafety;
}

public double getMinTouchdownStepDistance()
{
return minTouchdownStepDistance;
}

public double getEstimatedImpactDuration()
{
return estimatedImpactDuration;
}

public double getKickChamberX()
{
return kickChamberX;
}

public double getKickChamberHeight()
{
return kickChamberHeight;
}

public double getKickLegMass()
{
return kickLegMass;
}

public double getKickPickUpVelocity()
{
return kickPickUpVelocity;
}

public double getCopShiftInside()
{
return copShiftInside;
}

public double getEndACPCheatInside()
{
return endACPCheatInside;
}

public double getDesiredTouchdownPositionRelativeToTarget()
{
return desiredTouchdownPositionRelativeToTarget;
}

public double getTouchdownHeightSpeed()
{
return touchdownHeightSpeed;
}

public double getPreShiftWeightDistribution()
{
return preShiftWeightDistribution;
}

public double getPreShiftDuration()
{
return preShiftDuration;
}

public double getShiftDuration()
{
return shiftDuration;
}

public double getChamberDuration()
{
return chamberDuration;
}

public double getPushDuration()
{
return pushDuration;
}

public double getMaxAnkleVelocity()
{
return maxAnkleVelocity;
}

public double getKickShiftProximityThreshold()
{
return kickShiftProximityThreshold;
}

public double getKickMinTimeInContact()
{
return kickMinTimeInContact;
}

public double getMinFractionThroughTouchdownToDetectContact()
{
return minFractionThroughTouchdownToDetectContact;
}

public double getKpICP()
{
return kpICP;
}

public double getMaxCMPFeedack()
{
return maxCMPFeedack;
}

public double getMinCMPFeedack()
{
return minCMPFeedack;
}

public double getCmpDistanceInside()
{
return cmpDistanceInside;
}

public double getCmpDistanceInsideInTouchdown()
{
return cmpDistanceInsideInTouchdown;
}

public double getMaxCMPRate()
{
return maxCMPRate;
}

public double getKickPenetrationThreshold()
{
return kickPenetrationThreshold;
}

public KickingWBCCParameters getKickingWBCCParameters()
{
return fastWalkingWBCCParameters;
}
}
Loading