Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(yabloc): suppress no viable conversion error #7299

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions localization/yabloc/yabloc_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<depend>sophus</depend>
<depend>std_msgs</depend>
<depend>tf2_ros</depend>
<depend>tier4_autoware_utils</depend>
<depend>visualization_msgs</depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "yabloc_common/ll2_decomposer/ll2_decomposer.hpp"

#include <lanelet2_extension/utility/message_conversion.hpp>
#include <yabloc_common/color.hpp>
#include <tier4_autoware_utils/ros/marker_helper.hpp>
#include <yabloc_common/pub_sub.hpp>

#include <geometry_msgs/msg/polygon.hpp>
Expand Down Expand Up @@ -198,7 +198,7 @@ Ll2Decomposer::MarkerArray Ll2Decomposer::make_sign_marker_msg(
marker.header.frame_id = "map";
marker.header.stamp = get_clock()->now();
marker.type = Marker::LINE_STRIP;
marker.color = common::Color(0.6f, 0.6f, 0.6f, 0.999f);
marker.color = tier4_autoware_utils::createMarkerColor(0.6f, 0.6f, 0.6f, 0.999f);
marker.scale.x = 0.1;
marker.ns = ns;
marker.id = id++;
Expand Down Expand Up @@ -228,7 +228,7 @@ Ll2Decomposer::MarkerArray Ll2Decomposer::make_polygon_marker_msg(
marker.header.frame_id = "map";
marker.header.stamp = get_clock()->now();
marker.type = Marker::LINE_STRIP;
marker.color = common::Color(0.4f, 0.4f, 0.8f, 0.999f);
marker.color = tier4_autoware_utils::createMarkerColor(0.4f, 0.4f, 0.8f, 0.999f);
marker.scale.x = 0.2;
marker.ns = ns;
marker.id = id++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ class ParticleVisualize : public rclcpp::Node
marker.scale.y = 0.1;
marker.scale.z = 0.1;

marker.color = common::color_scale::rainbow(bound_weight(p.weight));
marker.color =
static_cast<std_msgs::msg::ColorRGBA>(common::color_scale::rainbow(bound_weight(p.weight)));
marker.pose.orientation = p.pose.orientation;
marker.pose.position.x = p.pose.position.x;
marker.pose.position.y = p.pose.position.y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ void ParticleVisualizer::publish(const ParticleArray & msg)
marker.scale.x = 0.3;
marker.scale.y = 0.1;
marker.scale.z = 0.1;
marker.color = common::color_scale::rainbow(boundWeight(p.weight));
marker.color =
static_cast<std_msgs::msg::ColorRGBA>(common::color_scale::rainbow(boundWeight(p.weight)));
marker.pose.orientation = p.pose.orientation;
marker.pose.position.x = p.pose.position.x;
marker.pose.position.y = p.pose.position.y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void GnssParticleCorrector::publish_marker(const Eigen::Vector3f & position, boo
marker.pose.position.z = latest_height_.data;

float prob = i / 4.0f;
marker.color = common::color_scale::rainbow(prob);
marker.color = static_cast<std_msgs::msg::ColorRGBA>(common::color_scale::rainbow(prob));
marker.color.a = 0.5f;
marker.scale.x = 0.1;
drawCircle(marker.points, weight_manager_.inverse_normal_pdf(prob, is_rtk_fixed));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <opencv4/opencv2/highgui.hpp>
#include <opencv4/opencv2/imgproc.hpp>
#include <yabloc_common/color.hpp>
#include <tier4_autoware_utils/ros/marker_helper.hpp>

#include <boost/geometry/geometry.hpp>

Expand Down Expand Up @@ -169,7 +169,7 @@ HierarchicalCostMap::MarkerArray HierarchicalCostMap::show_map_range() const
marker.header.frame_id = "map";
marker.id = id++;
marker.type = Marker::LINE_STRIP;
marker.color = common::Color(0, 0, 1.0f, 1.0f);
marker.color = tier4_autoware_utils::createMarkerColor(0, 0, 1.0f, 1.0f);
marker.scale.x = 0.1;
Eigen::Vector2f xy = area.real_scale();
marker.points.push_back(point_msg(xy.x(), xy.y()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ void MarkerModule::publish_marker(
marker.type = Marker::ARROW;
marker.id = i;
marker.ns = "arrow";
marker.color = common::color_scale::rainbow(normalize(scores.at(i)));
marker.color =
static_cast<std_msgs::msg::ColorRGBA>(common::color_scale::rainbow(normalize(scores.at(i))));
marker.color.a = 0.5;

marker.pose.position.x = position.x();
Expand Down
Loading