diff --git a/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.cpp b/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.cpp index ee18edb60a35ddddbb70722a48be45900d588bbb..53bfb391389cc6daaf94e933d0b2449f496611e6 100644 --- a/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.cpp +++ b/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.cpp @@ -82,6 +82,11 @@ namespace armarx } } + void DebugDrawerTopic::setShortSleepDuration(const std::chrono::milliseconds& duration) + { + this->shortSleepDuration = duration; + } + void DebugDrawerTopic::drawBox( const Eigen::Vector3f& position, const Eigen::Quaternionf& orientation, const Eigen::Vector3f& extents, diff --git a/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.h b/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.h index dad8e8c195cafcd6e4938266684e962e157ae0b0..e73215a836f527ca9dd4edb6ba7d587ff540a2d6 100644 --- a/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.h +++ b/source/RobotAPI/libraries/core/visualization/DebugDrawerTopic.h @@ -32,7 +32,6 @@ namespace armarx * All methods check whether the internal topic proxy is set, and do * nothing if it is not set. To disable visualization by this classs * completely, just do not set the topic. - * */ class DebugDrawerTopic { @@ -66,14 +65,20 @@ namespace armarx void setPoseScaleMillimeters(); + /// If enabled, sleep for the given duration (e.g. a chrono duration). + template <typename DurationT> + void sleepFor(const DurationT& duration); + + /// Set the duration for "short sleeps". + void setShortSleepDuration(const std::chrono::milliseconds& duration); + /// Clear all layers. + /// @param sleep If true, do a short sleep clearing. void clearAll(bool sleep = false); /// Clear the given layer. + /// @param sleep If true, do a short sleep clearing. void clearLayer(const std::string& layer, bool sleep = false); - /// If enabled, sleep for the given duration (e.g. a chrono duration). - template <typename DurationT> - void sleepFor(const DurationT& duration); void drawBox(const Eigen::Vector3f& position, const Eigen::Quaternionf& orientation, @@ -124,8 +129,8 @@ namespace armarx std::chrono::milliseconds shortSleepDuration { 50 }; }; - - + + template <typename DurationT> void DebugDrawerTopic::sleepFor(const DurationT& duration) {