diff --git a/include/rviz_visual_tools/imarker_simple.h b/include/rviz_visual_tools/imarker_simple.h index 11aa21e..56fb0a2 100644 --- a/include/rviz_visual_tools/imarker_simple.h +++ b/include/rviz_visual_tools/imarker_simple.h @@ -54,8 +54,8 @@ namespace rviz_visual_tools { -using visualization_msgs::InteractiveMarkerFeedback; using visualization_msgs::InteractiveMarkerControl; +using visualization_msgs::InteractiveMarkerFeedback; typedef std::function IMarkerCallback; @@ -67,7 +67,7 @@ geometry_msgs::Pose getIdentityPose() pose.orientation.w = 1.0; return pose; } -} +} // namespace class IMarkerSimple { diff --git a/include/rviz_visual_tools/rviz_visual_tools.h b/include/rviz_visual_tools/rviz_visual_tools.h index 1f7eca1..75da0c1 100644 --- a/include/rviz_visual_tools/rviz_visual_tools.h +++ b/include/rviz_visual_tools/rviz_visual_tools.h @@ -726,7 +726,8 @@ class RvizVisualTools * \return true on success */ bool publishWireframeCuboid(const Eigen::Isometry3d& pose, double depth, double width, double height, - colors color = BLUE, const std::string& ns = "Wireframe Cuboid", std::size_t id = 0); + colors color = BLUE, scales scale = XXSMALL, const std::string& ns = "Wireframe Cuboid", + std::size_t id = 0); /** * \brief Publish transformed wireframe cuboid. Useful eg to show an oriented bounding box. @@ -739,7 +740,7 @@ class RvizVisualTools * \return true on success */ bool publishWireframeCuboid(const Eigen::Isometry3d& pose, const Eigen::Vector3d& min_point, - const Eigen::Vector3d& max_point, colors color = BLUE, + const Eigen::Vector3d& max_point, colors color = BLUE, scales scale = XXSMALL, const std::string& ns = "Wireframe Cuboid", std::size_t id = 0); /** diff --git a/src/rviz_visual_tools.cpp b/src/rviz_visual_tools.cpp index 6f5cf36..fb955df 100644 --- a/src/rviz_visual_tools.cpp +++ b/src/rviz_visual_tools.cpp @@ -2143,17 +2143,17 @@ bool RvizVisualTools::publishPolygon(const geometry_msgs::Polygon& polygon, colo } bool RvizVisualTools::publishWireframeCuboid(const Eigen::Isometry3d& pose, double depth, double width, double height, - colors color, const std::string& ns, std::size_t id) + colors color, scales scale, const std::string& ns, std::size_t id) { Eigen::Vector3d min_point, max_point; min_point << -depth / 2, -width / 2, -height / 2; max_point << depth / 2, width / 2, height / 2; - return publishWireframeCuboid(pose, min_point, max_point, color, ns, id); + return publishWireframeCuboid(pose, min_point, max_point, color, scale, ns, id); } bool RvizVisualTools::publishWireframeCuboid(const Eigen::Isometry3d& pose, const Eigen::Vector3d& min_point, - const Eigen::Vector3d& max_point, colors color, const std::string& ns, - std::size_t id) + const Eigen::Vector3d& max_point, colors color, scales scale, + const std::string& ns, std::size_t id) { // Extract 8 cuboid vertices Eigen::Vector3d p1(min_point[0], min_point[1], min_point[2]); @@ -2188,7 +2188,7 @@ bool RvizVisualTools::publishWireframeCuboid(const Eigen::Isometry3d& pose, cons } std_msgs::ColorRGBA this_color = getColor(color); - line_list_marker_.scale = getScale(XXSMALL); + line_list_marker_.scale = getScale(scale); line_list_marker_.scale.y = 0; line_list_marker_.scale.z = 0; line_list_marker_.color = this_color;