Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
  • Loading branch information
pre-commit-ci[bot] authored and lexavtanke committed Jan 31, 2023
1 parent c696b48 commit d1545b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_cylinder_line_list(
const autoware_auto_perception_msgs::msg::Shape & shape,
std::vector<geometry_msgs::msg::Point> & points);


AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC void calc_cylinder_bottom_line_list(
const autoware_auto_perception_msgs::msg::Shape & shape,
std::vector<geometry_msgs::msg::Point> & points);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
#ifndef OBJECT_DETECTION__OBJECT_POLYGON_DISPLAY_BASE_HPP_
#define OBJECT_DETECTION__OBJECT_POLYGON_DISPLAY_BASE_HPP_

#include "rviz_common/properties/enum_property.hpp"

#include <common/color_alpha_property.hpp>
#include <object_detection/object_polygon_detail.hpp>
#include <rviz_common/display.hpp>
#include "rviz_common/properties/enum_property.hpp"
#include <rviz_common/properties/color_property.hpp>
#include <rviz_common/properties/float_property.hpp>
#include <rviz_default_plugins/displays/marker/marker_common.hpp>
Expand Down Expand Up @@ -160,17 +161,18 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
if (m_display_type_property->getOptionInt() == 0) {
return detail::get_shape_marker_ptr(shape_msg, centroid, orientation, color_rgba, line_width);
} else if (m_display_type_property->getOptionInt() == 1) {
return detail::get_2d_shape_marker_ptr(shape_msg, centroid, orientation, color_rgba, line_width);
return detail::get_2d_shape_marker_ptr(
shape_msg, centroid, orientation, color_rgba, line_width);
} else {
return std::nullopt;
}
}

template <typename ClassificationContainerT>
visualization_msgs::msg::Marker::SharedPtr get_2d_shape_marker_ptr(
const autoware_auto_perception_msgs::msg::Shape & shape_msg,
const geometry_msgs::msg::Point & centroid, const geometry_msgs::msg::Quaternion & orientation,
const std_msgs::msg::ColorRGBA & color_rgba, const double & line_width);
const autoware_auto_perception_msgs::msg::Shape & shape_msg,
const geometry_msgs::msg::Point & centroid, const geometry_msgs::msg::Quaternion & orientation,
const std_msgs::msg::ColorRGBA & color_rgba, const double & line_width);

/// \brief Convert given shape msg into a Marker to visualize label name
/// \tparam ClassificationContainerT List type with ObjectClassificationMsg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ visualization_msgs::msg::Marker::SharedPtr get_2d_shape_marker_ptr(
using autoware_auto_perception_msgs::msg::Shape;
if (shape_msg.type == Shape::BOUNDING_BOX) {
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
// TODO change bounding box to 2d poligon
// TODO change bounding box to 2d poligon
// shoul be: getting bounding box take only bottom of it
// put bottom of it to calc_polygon_line_list
calc_2d_bounding_box_line_list(shape_msg, marker_ptr->points);
} else if (shape_msg.type == Shape::CYLINDER) {
marker_ptr->type = visualization_msgs::msg::Marker::LINE_LIST;
// TODO change cylinder to 2d poligon
// TODO change cylinder to 2d poligon
// shoul be: getting cylinder compute projected polygon of it
// put polygon to calc_polygon_line_list
calc_cylinder_bottom_line_list(shape_msg, marker_ptr->points);
Expand Down

0 comments on commit d1545b2

Please sign in to comment.