From d5b274fae5829ad43b12abbbb1f29f773fa6a6ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Fri, 17 Nov 2023 09:41:14 +0100 Subject: [PATCH] Fixed screw display (#1093) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- .../displays/screw/screw_display.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/rviz_default_plugins/src/rviz_default_plugins/displays/screw/screw_display.cpp b/rviz_default_plugins/src/rviz_default_plugins/displays/screw/screw_display.cpp index e9a95c09e..c2788f02b 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/displays/screw/screw_display.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/displays/screw/screw_display.cpp @@ -224,19 +224,14 @@ void ScrewDisplay::processMessagePrivate( visual->setFramePosition(position); visual->setFrameOrientation(orientation); float alpha = alpha_property_->getFloat(); - float linear_scale = linear_scale_property_->getFloat(); - float angular_scale = angular_scale_property_->getFloat(); - float width = width_property_->getFloat(); Ogre::ColourValue linear_color = linear_color_property_->getOgreColor(); Ogre::ColourValue angular_color = angular_color_property_->getOgreColor(); visual->setLinearColor(linear_color.r, linear_color.g, linear_color.b, alpha); visual->setAngularColor(angular_color.r, angular_color.g, angular_color.b, alpha); - visual->setLinearScale(linear_scale); - visual->setAngularScale(angular_scale); - visual->setWidth(width); - visual->setScrew( - Ogre::Vector3(linear.x, linear.y, linear.z), - Ogre::Vector3(angular.x, angular.y, angular.z)); + visual->setLinearScale(linear_scale_property_->getFloat()); + visual->setAngularScale(angular_scale_property_->getFloat()); + visual->setWidth(width_property_->getFloat()); + visual->setHideSmallValues(hide_small_values_property_->getBool()); // And send it to the end of the circular buffer visuals_.push_back(visual);