File tree Expand file tree Collapse file tree
autoware_collision_detector/src
autoware_pid_longitudinal_controller/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ autoware_utils_geometry::Polygon2d createObjPolygon(
6767
6868 autoware_utils_geometry::Polygon2d object_polygon;
6969 for (const auto & p : transformed_polygon.points ) {
70- object_polygon.outer ().push_back ( autoware_utils_geometry::Point2d ( p.x , p.y ) );
70+ object_polygon.outer ().emplace_back ( p.x , p.y );
7171 }
7272
7373 bg::correct (object_polygon);
@@ -119,10 +119,10 @@ autoware_utils_geometry::Polygon2d createSelfPolygon(
119119
120120 autoware_utils_geometry::Polygon2d ego_polygon;
121121
122- ego_polygon.outer ().push_back ( autoware_utils_geometry::Point2d ( front_m, width_left_m) );
123- ego_polygon.outer ().push_back ( autoware_utils_geometry::Point2d ( front_m, width_right_m) );
124- ego_polygon.outer ().push_back ( autoware_utils_geometry::Point2d ( rear_m, width_right_m) );
125- ego_polygon.outer ().push_back ( autoware_utils_geometry::Point2d ( rear_m, width_left_m) );
122+ ego_polygon.outer ().emplace_back ( front_m, width_left_m);
123+ ego_polygon.outer ().emplace_back ( front_m, width_right_m);
124+ ego_polygon.outer ().emplace_back ( rear_m, width_right_m);
125+ ego_polygon.outer ().emplace_back ( rear_m, width_left_m);
126126
127127 bg::correct (ego_polygon);
128128
Original file line number Diff line number Diff line change @@ -921,7 +921,7 @@ autoware_control_msgs::msg::Longitudinal PidLongitudinalController::createCtrlCm
921921 cmd.acceleration = static_cast <decltype (cmd.acceleration )>(ctrl_cmd.acc );
922922
923923 // store current velocity history
924- m_vel_hist.push_back ({ clock_->now (), current_vel} );
924+ m_vel_hist.emplace_back ( clock_->now (), current_vel);
925925 while (m_vel_hist.size () >
926926 static_cast <size_t >(m_delay_compensation_time / m_longitudinal_ctrl_period)) {
927927 m_vel_hist.erase (m_vel_hist.begin ());
You can’t perform that action at this time.
0 commit comments