-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adding HumanoidRobotMPCContextData and its factory
- Loading branch information
Showing
6 changed files
with
130 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
...hmc/commonWalkingControlModules/barrierScheduler/context/HumanoidRobotMPCContextData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package us.ihmc.commonWalkingControlModules.barrierScheduler.context; | ||
|
||
import us.ihmc.commonWalkingControlModules.controllerCore.command.lowLevel.LowLevelOneDoFJointDesiredDataHolder; | ||
import us.ihmc.humanoidRobotics.model.CenterOfPressureDataHolder; | ||
import us.ihmc.mecano.multiBodySystem.interfaces.OneDoFJointBasics; | ||
import us.ihmc.robotModels.FullHumanoidRobotModel; | ||
import us.ihmc.robotics.sensors.CenterOfMassDataHolder; | ||
import us.ihmc.robotics.sensors.ForceSensorDataHolder; | ||
import us.ihmc.sensorProcessing.model.RobotMotionStatusHolder; | ||
import us.ihmc.sensorProcessing.simulatedSensors.SensorDataContext; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Doug Stephen <a href="mailto:[email protected]">([email protected])</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class HumanoidRobotMPCContextData extends HumanoidRobotContextData | ||
{ | ||
public HumanoidRobotMPCContextData() | ||
{ | ||
super(); | ||
} | ||
|
||
public HumanoidRobotMPCContextData(HumanoidRobotContextJointData processedJointData, | ||
ForceSensorDataHolder forceSensorDataHolder, | ||
CenterOfMassDataHolder centerOfMassDataHolder, | ||
CenterOfPressureDataHolder centerOfPressureDataHolder, | ||
RobotMotionStatusHolder robotMotionStatusHolder, | ||
LowLevelOneDoFJointDesiredDataHolder jointDesiredOutputList, | ||
SensorDataContext sensorDataContext) | ||
{ | ||
super(processedJointData, | ||
forceSensorDataHolder, | ||
centerOfMassDataHolder, | ||
centerOfPressureDataHolder, | ||
robotMotionStatusHolder, | ||
jointDesiredOutputList, | ||
sensorDataContext); | ||
} | ||
|
||
public HumanoidRobotMPCContextData(FullHumanoidRobotModel fullRobotModel) | ||
{ | ||
super(fullRobotModel); | ||
} | ||
|
||
public HumanoidRobotMPCContextData(List<OneDoFJointBasics> joints) | ||
{ | ||
super(joints); | ||
} | ||
|
||
|
||
public void set(HumanoidRobotMPCContextData other) | ||
{ | ||
copyFrom(other); | ||
} | ||
|
||
public void copyFrom(HumanoidRobotMPCContextData src) | ||
{ | ||
super.copyFrom(src); | ||
} | ||
public boolean equals(Object obj) | ||
{ | ||
if(obj == this) | ||
{ | ||
return true; | ||
} | ||
else if(obj instanceof HumanoidRobotMPCContextData) | ||
{ | ||
HumanoidRobotMPCContextData other = (HumanoidRobotMPCContextData) obj; | ||
return super.equals(other); | ||
} | ||
else | ||
{ | ||
return false; | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...monWalkingControlModules/barrierScheduler/context/HumanoidRobotMPCContextDataFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package us.ihmc.commonWalkingControlModules.barrierScheduler.context; | ||
|
||
import us.ihmc.tools.factories.FactoryTools; | ||
|
||
public class HumanoidRobotMPCContextDataFactory extends HumanoidRobotContextDataFactory | ||
{ | ||
public HumanoidRobotMPCContextData createHumanoidRobotMPCContextData() | ||
{ | ||
FactoryTools.checkAllFactoryFieldsAreSet(this); | ||
|
||
return new HumanoidRobotMPCContextData(processedJointData.get(), | ||
forceSensorDataHolder.get(), | ||
centerOfMassDataHolder.get(), | ||
centerOfPressureDataHolder.get(), | ||
robotMotionStatusHolder.get(), | ||
jointDesiredOutputList.get(), | ||
sensorDataContext.get()); | ||
} | ||
} |