Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ private HumanoidKinematicsSimulation(DRCRobotModel robotModel, HumanoidKinematic
this.kinematicsSimulationParameters = kinematicsSimulationParameters;

// instantiate some existing controller ROS2 API?
ros2Node = new ROS2NodeBuilder().build(HumanoidControllerAPI.HUMANOID_KINEMATICS_CONTROLLER_NODE_NAME);
ROS2NodeBuilder nodeBuilder = kinematicsSimulationParameters.getRos2NodeBuilder();
if (nodeBuilder == null)
nodeBuilder = new ROS2NodeBuilder();
ros2Node = nodeBuilder.build(HumanoidControllerAPI.HUMANOID_KINEMATICS_CONTROLLER_NODE_NAME);
heartbeat = new ROS2Heartbeat(ros2Node, KINEMATICS_SIMULATION_HEARTBEAT);

String robotName = robotModel.getSimpleRobotName();
Expand Down Expand Up @@ -261,7 +264,7 @@ private HumanoidKinematicsSimulation(DRCRobotModel robotModel, HumanoidKinematic
walkingParentRegistry.addChild(walkingController.getYoVariableRegistry());

// create controller network subscriber here!!
realtimeROS2Node = new ROS2NodeBuilder().buildRealtime(HumanoidControllerAPI.HUMANOID_KINEMATICS_CONTROLLER_NODE_NAME + "_rt");
realtimeROS2Node = nodeBuilder.buildRealtime(HumanoidControllerAPI.HUMANOID_KINEMATICS_CONTROLLER_NODE_NAME + "_rt");
ROS2Topic inputTopic = HumanoidControllerAPI.getInputTopic(robotName);
ROS2Topic outputTopic = HumanoidControllerAPI.getOutputTopic(robotName);
ControllerNetworkSubscriber controllerNetworkSubscriber = new ControllerNetworkSubscriber(inputTopic,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import us.ihmc.avatar.scs2.SCS2AvatarSimulationFactory;
import us.ihmc.commons.UnitConversions;
import us.ihmc.ros2.ROS2NodeBuilder;

/**
* @deprecated Use {@link SCS2AvatarSimulationFactory#setKinematicsSimulation} instead.
Expand All @@ -20,6 +21,7 @@ public class HumanoidKinematicsSimulationParameters
private double dt = UnitConversions.hertzToSeconds(70);
private boolean runNoFasterThanMaxRealtimeRate = true;
private double maxRealtimeRate = 2.0;
private ROS2NodeBuilder ros2NodeBuilder = null;

public double getInitialGroundHeight()
{
Expand Down Expand Up @@ -140,4 +142,14 @@ public void setEnablePeriodicThread(boolean createPeriodicThread)
{
this.createPeriodicThread = createPeriodicThread;
}

public void setRos2NodeBuilder(ROS2NodeBuilder ros2NodeBuilder)
{
this.ros2NodeBuilder = ros2NodeBuilder;
}

public ROS2NodeBuilder getRos2NodeBuilder()
{
return ros2NodeBuilder;
}
}
61 changes: 61 additions & 0 deletions ihmc-high-level-behaviors/src/libgdx/external/icons/condition.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions ihmc-high-level-behaviors/src/libgdx/external/icons/fallback.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading