From 64845b4e02bb736d307c3d06f9860684ad69f1bc Mon Sep 17 00:00:00 2001 From: Ryosuke Tajima Date: Thu, 25 Apr 2019 09:15:24 +0900 Subject: [PATCH] Fix rviz marker scale --- aruco_ros/src/simple_single.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/aruco_ros/src/simple_single.cpp b/aruco_ros/src/simple_single.cpp index e77c0ba..0f9973a 100644 --- a/aruco_ros/src/simple_single.cpp +++ b/aruco_ros/src/simple_single.cpp @@ -265,9 +265,18 @@ class ArucoSimple visMarker.type = visualization_msgs::Marker::CUBE; visMarker.action = visualization_msgs::Marker::ADD; visMarker.pose = poseMsg.pose; - visMarker.scale.x = marker_size; - visMarker.scale.y = 0.001; - visMarker.scale.z = marker_size; + if (rotate_marker_axis_) + { + visMarker.scale.x = marker_size; + visMarker.scale.y = 0.001; + visMarker.scale.z = marker_size; + } + else + { + visMarker.scale.x = marker_size; + visMarker.scale.y = marker_size; + visMarker.scale.z = 0.001; + } visMarker.color.r = 1.0; visMarker.color.g = 0; visMarker.color.b = 0;