Skip to content

Commit 4b63a77

Browse files
committed
Setup custom control state.
1 parent d791883 commit 4b63a77

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package us.ihmc.commonWalkingControlModules.highLevelHumanoidControl.factories;
2+
3+
import us.ihmc.commonWalkingControlModules.highLevelHumanoidControl.HighLevelControllerFactoryHelper;
4+
import us.ihmc.commonWalkingControlModules.highLevelHumanoidControl.highLevelStates.HighLevelControllerState;
5+
import us.ihmc.commonWalkingControlModules.highLevelHumanoidControl.highLevelStates.PositionPassthroughControllerState;
6+
import us.ihmc.humanoidRobotics.communication.packets.dataobjects.HighLevelControllerName;
7+
8+
public class PositionPassthroughControllerStateFactory implements HighLevelControllerStateFactory
9+
{
10+
private PositionPassthroughControllerState positionPassthroughControllerState;
11+
12+
@Override
13+
public HighLevelControllerState getOrCreateControllerState(HighLevelControllerFactoryHelper controllerFactoryHelper)
14+
{
15+
if (positionPassthroughControllerState == null)
16+
{
17+
positionPassthroughControllerState = new PositionPassthroughControllerState(controllerFactoryHelper.getCommandInputManager(),
18+
controllerFactoryHelper.getHighLevelHumanoidControllerToolbox(),
19+
controllerFactoryHelper.getHighLevelControllerParameters());
20+
}
21+
22+
return positionPassthroughControllerState;
23+
}
24+
25+
@Override
26+
public HighLevelControllerName getStateEnum()
27+
{
28+
return HighLevelControllerName.POSITION_PASSTHROUGH;
29+
}
30+
}

0 commit comments

Comments
 (0)