Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IHMC Commons Release Changes #439

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
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 @@ -22,7 +22,7 @@
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.utilities.ros.RosMainNode;
import us.ihmc.utilities.ros.RosTools;
import us.ihmc.utilities.ros.subscriber.AbstractRosTopicSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.utilities.ros.RosMainNode;
import us.ihmc.utilities.ros.RosTools;
import us.ihmc.utilities.ros.subscriber.AbstractRosTopicSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.utilities.ros.RosMainNode;
import us.ihmc.utilities.ros.RosTools;
import us.ihmc.utilities.ros.subscriber.AbstractRosTopicSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.utilities.ros.RosMainNode;
import us.ihmc.utilities.ros.RosTools;
import us.ihmc.utilities.ros.subscriber.AbstractRosTopicSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.utilities.ros.RosMainNode;
import us.ihmc.utilities.ros.RosTools;
import us.ihmc.utilities.ros.subscriber.AbstractRosTopicSubscriber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import us.ihmc.perception.ImageDimensions;
import us.ihmc.robotics.robotSide.RobotSide;
import us.ihmc.robotics.robotSide.SideDependentList;
import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;

import java.io.IOException;
import java.net.DatagramPacket;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import us.ihmc.communication.ros2.ROS2PublishSubscribeAPI;
import us.ihmc.tools.property.StoredPropertySetBasics;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

/**
* ROS 2 enabled, synced, interprocess stored property set. It allows external process
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package us.ihmc.communication.ros2;

import std_msgs.msg.dds.Empty;
import us.ihmc.commons.UnitConversions;
import us.ihmc.commons.exception.DefaultExceptionHandler;
import us.ihmc.commons.exception.ExceptionTools;
import us.ihmc.commons.thread.ThreadTools;
import us.ihmc.ros2.ROS2PublisherBasics;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.ros2.ROS2NodeInterface;
import us.ihmc.ros2.ROS2PublisherBasics;
import us.ihmc.ros2.ROS2Topic;
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.Throttler;

/**
* Use this class to indicate to other things on the network that something is active.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import us.ihmc.ros2.ROS2Input;
import us.ihmc.ros2.ROS2Topic;
import us.ihmc.tools.Timer;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

import java.util.function.Consumer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import us.ihmc.ros2.ROS2Input;
import us.ihmc.communication.packets.MessageTools;
import us.ihmc.euclid.transform.RigidBodyTransform;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

/**
* This class is used to hava UI that tunes a transform running remotely on the robot.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.io.resources.ResourceTools;
import us.ihmc.tools.processManagement.UnsignedByteTools;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

import javax.imageio.ImageIO;
import java.awt.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package us.ihmc.rdx.imgui;

import imgui.internal.ImGui;
import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;

public class ImGuiAveragedFrequencyText
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package us.ihmc.rdx.imgui;

import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;

/**
* Call {@link #ping} at some frequency and optionally render a size 100 window
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import us.ihmc.tools.io.HybridResourceDirectory;
import us.ihmc.tools.io.HybridResourceFile;
import us.ihmc.tools.io.JSONFileTools;
import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;

import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package us.ihmc.rdx.imgui;

import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;

public class ImPlotFrequencyPlot
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
import us.ihmc.rdx.ui.RDXBaseUI;
import us.ihmc.rdx.ui.gizmo.RDXPose3DGizmo;
import us.ihmc.robotics.robotSide.RobotSide;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

public class RDXVRManager
Expand Down Expand Up @@ -101,15 +99,15 @@ private boolean pollEvents(RDXBaseUI baseUI)
{
initializing = true;
contextCreatedNotification = new Notification();
MissingThreadTools.startAsDaemon(getClass().getSimpleName() + "-initSystem", DefaultExceptionHandler.MESSAGE_AND_STACKTRACE, () ->
ThreadTools.startAsDaemon(() ->
{
synchronized (syncObject)
{
initSystemCount++;
context.initSystem();
}
contextCreatedNotification.set();
});
}, DefaultExceptionHandler.MESSAGE_AND_STACKTRACE, getClass().getSimpleName() + "-initSystem");
}
if (contextCreatedNotification != null && contextCreatedNotification.poll())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import imgui.ImGui;
import imgui.type.ImInt;
import us.ihmc.commons.FormattingTools;
import us.ihmc.commons.UnitConversions;
import us.ihmc.commons.thread.ThreadTools;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.commons.time.Stopwatch;
import us.ihmc.log.LogTools;
import us.ihmc.rdx.imgui.ImGuiUniqueLabelMap;
import us.ihmc.rdx.imgui.ImPlotFrequencyPlot;
import us.ihmc.log.LogTools;
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.Throttler;

import java.io.File;
import java.lang.reflect.Constructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import us.ihmc.perception.BytedecoImage;
import us.ihmc.perception.ffmpeg.FFmpegTools;
import us.ihmc.perception.logging.PerceptionLoggerConstants;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

public class FFMPEGVideoPlaybackManager
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.SwapReference;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

import java.util.ArrayList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import us.ihmc.rdx.imgui.ImPlotFrequencyPlot;
import us.ihmc.rdx.imgui.ImPlotIntegerPlot;
import us.ihmc.rdx.imgui.ImPlotStopwatchPlot;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

import java.io.File;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import us.ihmc.rdx.imgui.ImGuiUniqueLabelMap;
import us.ihmc.rdx.ui.RDXBaseUI;
import us.ihmc.rdx.ui.interactable.RDXInteractableRealsenseD435;
import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;
import us.ihmc.yoVariables.registry.YoRegistry;

import java.nio.ByteOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import us.ihmc.rdx.sceneManager.RDXSceneLevel;
import us.ihmc.rdx.ui.RDXBaseUI;
import us.ihmc.rdx.ui.interactable.RDXInteractableRealsenseL515;
import us.ihmc.tools.time.FrequencyCalculator;
import us.ihmc.commons.time.FrequencyCalculator;
import us.ihmc.yoVariables.registry.YoRegistry;

import java.nio.ByteOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import us.ihmc.rdx.imgui.ImPlotStopwatchPlot;
import us.ihmc.robotics.time.TimeTools;
import us.ihmc.ros2.RealtimeROS2Node;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

/**
* Subscribes to ROS 2 webcam images with best performance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import us.ihmc.rdx.imgui.ImGuiUniqueLabelMap;
import us.ihmc.rdx.ui.RDXBaseUI;
import us.ihmc.sensors.ZEDColorDepthImageRetrieverSVO.RecordMode;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

public class RDXZEDSVORecorderPanel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
import us.ihmc.tools.string.StringTools;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import us.ihmc.avatar.inverseKinematics.ArmIKSolver;
import us.ihmc.behaviors.tools.CommunicationHelper;
import us.ihmc.commons.exception.DefaultExceptionHandler;
import us.ihmc.commons.thread.ThreadTools;
import us.ihmc.commons.thread.TypedNotification;
import us.ihmc.communication.packets.MessageTools;
import us.ihmc.euclid.referenceFrame.FramePose3D;
Expand All @@ -35,7 +36,6 @@
import us.ihmc.robotics.partNames.ArmJointName;
import us.ihmc.robotics.robotSide.RobotSide;
import us.ihmc.robotics.robotSide.SideDependentList;
import us.ihmc.tools.thread.MissingThreadTools;

import java.util.function.BooleanSupplier;

Expand Down Expand Up @@ -182,7 +182,7 @@ public void update(boolean interactablesEnabled)
armIKSolvers.get(side).copySourceToWork();
}

MissingThreadTools.startAThread("IKSolver", DefaultExceptionHandler.MESSAGE_AND_STACKTRACE, () ->
ThreadTools.startAThread(() ->
{
try
{
Expand All @@ -195,7 +195,7 @@ public void update(boolean interactablesEnabled)
{
readyToCopySolution = true;
}
});
}, DefaultExceptionHandler.MESSAGE_AND_STACKTRACE, "IKSolver");
}

if (readyToCopySolution)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import us.ihmc.robotics.physics.RobotCollisionModel;
import us.ihmc.robotics.referenceFrames.ReferenceFrameLibrary;
import us.ihmc.tools.io.WorkspaceResourceDirectory;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

/**
* Top level class for the operator's behavior tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import us.ihmc.sensorProcessing.heightMap.HeightMapData;
import us.ihmc.tools.thread.MissingThreadTools;
import us.ihmc.tools.thread.ResettableExceptionHandlingExecutorService;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

import java.util.ArrayList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import imgui.internal.ImGui;
import us.ihmc.commons.FormattingTools;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

/**
* Keep track of the size of the incoming messages while slowing it down
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
import us.ihmc.euclid.transform.RigidBodyTransform;
import us.ihmc.pubsub.DomainFactory.PubSubImplementation;
import us.ihmc.pubsub.subscriber.Subscriber;
import us.ihmc.rdx.imgui.ImGuiAveragedFrequencyText;
import us.ihmc.rdx.imgui.ImGuiExpandCollapseRenderer;
import us.ihmc.rdx.imgui.ImGuiTools;
import us.ihmc.rdx.sceneManager.RDXSceneLevel;
import us.ihmc.rdx.ui.graphics.RDXTrajectoryGraphic;
import us.ihmc.ros2.ROS2Topic;
import us.ihmc.ros2.RealtimeROS2Node;
import us.ihmc.tools.string.StringTools;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

import java.time.Instant;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
import us.ihmc.communication.PerceptionAPI;
import us.ihmc.communication.ros2.ROS2Heartbeat;
import us.ihmc.communication.ros2.ROS2PublishSubscribeAPI;
import us.ihmc.rdx.imgui.ImGuiTools;
import us.ihmc.rdx.ui.graphics.RDXVisualizer;
import us.ihmc.tools.thread.Throttler;

import java.util.Arrays;
import java.util.HashSet;
import us.ihmc.commons.thread.Throttler;

/*
* FIXME: It doesn't make sense to have a visualizer for settings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
import us.ihmc.avatar.drcRobot.ROS2SyncedRobotModel;
import us.ihmc.avatar.ros2.ROS2ControllerHelper;
import us.ihmc.commons.MathTools;
import us.ihmc.commons.UnitConversions;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.communication.packets.MessageTools;
import us.ihmc.euclid.referenceFrame.FrameYawPitchRoll;
import us.ihmc.euclid.referenceFrame.ReferenceFrame;
import us.ihmc.euclid.tools.EuclidCoreTools;
import us.ihmc.rdx.imgui.ImGuiUniqueLabelMap;
import us.ihmc.rdx.ui.teleoperation.RDXTeleoperationParameters;
import us.ihmc.humanoidRobotics.communication.packets.HumanoidMessageTools;
import us.ihmc.log.LogTools;
import us.ihmc.rdx.imgui.ImGuiUniqueLabelMap;
import us.ihmc.rdx.ui.teleoperation.RDXTeleoperationParameters;
import us.ihmc.robotics.geometry.YawPitchRollAxis;
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.Throttler;

public class RDXChestOrientationSlider
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import imgui.internal.ImGui;
import us.ihmc.avatar.drcRobot.ROS2SyncedRobotModel;
import us.ihmc.avatar.ros2.ROS2ControllerHelper;
import us.ihmc.commons.UnitConversions;
import us.ihmc.commons.thread.Throttler;
import us.ihmc.rdx.imgui.ImGuiUniqueLabelMap;
import us.ihmc.rdx.ui.teleoperation.RDXTeleoperationParameters;
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.thread.Throttler;

public class RDXNeckPitchSlider
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import us.ihmc.log.LogTools;
import us.ihmc.commons.UnitConversions;
import us.ihmc.tools.string.StringTools;
import us.ihmc.tools.thread.Throttler;
import us.ihmc.commons.thread.Throttler;

public class RDXPelvisHeightSlider
{
Expand Down
Loading
Loading