.. _program_listing_file__tmp_ws_src_vision_msgs_vision_msgs_rviz_plugins_include_vision_msgs_rviz_plugins_detection_3d_array.hpp: Program Listing for File detection_3d_array.hpp =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/vision_msgs/vision_msgs_rviz_plugins/include/vision_msgs_rviz_plugins/detection_3d_array.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2023 Georg Novotny // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef VISION_MSGS_RVIZ_PLUGINS__DETECTION_3D_ARRAY_HPP_ #define VISION_MSGS_RVIZ_PLUGINS__DETECTION_3D_ARRAY_HPP_ #include #include #include #include #include #include #include #include #include #include #include #include #include "vision_msgs_rviz_plugins/detection_3d_common.hpp" #include "vision_msgs_rviz_plugins/visibility_control.hpp" typedef std::shared_ptr BillboardLinePtr; namespace rviz_plugins { class Detection3DArrayDisplay : public Detection3DCommon { Q_OBJECT public: using Marker = visualization_msgs::msg::Marker; using BoundingBox3D = vision_msgs::msg::BoundingBox3D; using Detection3DArray = vision_msgs::msg::Detection3DArray; DETECTION_3D_ARRAY_DISPLAY_HPP_PUBLIC Detection3DArrayDisplay(); DETECTION_3D_ARRAY_DISPLAY_HPP_PUBLIC ~Detection3DArrayDisplay(); DETECTION_3D_ARRAY_DISPLAY_HPP_PUBLIC void onInitialize() override; DETECTION_3D_ARRAY_DISPLAY_HPP_PUBLIC void load(const rviz_common::Config & config) override; DETECTION_3D_ARRAY_DISPLAY_HPP_PUBLIC void update(float wall_dt, float ros_dt) override; DETECTION_3D_ARRAY_DISPLAY_HPP_PUBLIC void reset() override; private: // Convert boxes into markers, push them to the display queue void processMessage(Detection3DArray::ConstSharedPtr array) override; vision_msgs::msg::Detection3DArray::ConstSharedPtr latest_msg; protected: bool only_edge_, show_score_; rviz_common::properties::BoolProperty * only_edge_property_; rviz_common::properties::FloatProperty * line_width_property_; rviz_common::properties::FloatProperty * alpha_property_; rviz_common::properties::BoolProperty * show_score_property_; protected Q_SLOTS: void updateEdge(); void updateLineWidth(); void updateAlpha(); void updateShowScores(); void updateColorConfigs(); }; } // namespace rviz_plugins #endif // VISION_MSGS_RVIZ_PLUGINS__DETECTION_3D_ARRAY_HPP_