Skip to content

Commit 20b8777

Browse files
authored
Merge branch 'main' into arjun.ram/RT0-33698
2 parents 8c266a1 + 9ebdf7f commit 20b8777

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+706
-152
lines changed

.github/CODEOWNERS

-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ testing/autoware_test_utils/** egon.kang@autocore.ai junya.sasaki@tier4.jp kyoic
2727
testing/autoware_testing/** adam.dabrowski@robotec.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp @autowarefoundation/autoware-core-global-codeowners
2828

2929
### Copied from .github/CODEOWNERS-manual ###
30-
* @autowarefoundation/autoware-core-global-codeowners
3130
.* @autowarefoundation/autoware-core-global-codeowners

.github/CODEOWNERS-manual

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* @autowarefoundation/autoware-core-global-codeowners
21
.* @autowarefoundation/autoware-core-global-codeowners

common/autoware_lanelet2_utils/include/autoware/lanelet2_utils/intersection.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include <optional>
2121

22-
namespace autoware::lanelet2_utility
22+
namespace autoware::lanelet2_utils
2323
{
2424

2525
static constexpr const char * k_turn_direction = "turn_direction";
@@ -68,5 +68,5 @@ bool is_right_direction(const lanelet::ConstLanelet & lanelet);
6868
*/
6969
std::optional<TurnDirection> get_turn_direction(const lanelet::ConstLanelet & lanelet);
7070

71-
} // namespace autoware::lanelet2_utility
71+
} // namespace autoware::lanelet2_utils
7272
#endif // AUTOWARE__LANELET2_UTILS__INTERSECTION_HPP_

common/autoware_lanelet2_utils/include/autoware_lanelet2_utils/kind.hpp common/autoware_lanelet2_utils/include/autoware/lanelet2_utils/kind.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef AUTOWARE_LANELET2_UTILS__KIND_HPP_
16-
#define AUTOWARE_LANELET2_UTILS__KIND_HPP_
15+
#ifndef AUTOWARE__LANELET2_UTILS__KIND_HPP_
16+
#define AUTOWARE__LANELET2_UTILS__KIND_HPP_
1717

1818
#include <lanelet2_core/Forward.h>
1919

@@ -59,4 +59,4 @@ bool is_shoulder_lane(const lanelet::ConstLanelet & lanelet);
5959
*/
6060
bool is_bicycle_lane(const lanelet::ConstLanelet & lanelet);
6161
} // namespace autoware::lanelet2_utils
62-
#endif // AUTOWARE_LANELET2_UTILS__KIND_HPP_
62+
#endif // AUTOWARE__LANELET2_UTILS__KIND_HPP_

common/autoware_lanelet2_utils/include/autoware_lanelet2_utils/topology.hpp common/autoware_lanelet2_utils/include/autoware/lanelet2_utils/topology.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef AUTOWARE_LANELET2_UTILS__TOPOLOGY_HPP_
16-
#define AUTOWARE_LANELET2_UTILS__TOPOLOGY_HPP_
15+
#ifndef AUTOWARE__LANELET2_UTILS__TOPOLOGY_HPP_
16+
#define AUTOWARE__LANELET2_UTILS__TOPOLOGY_HPP_
1717

1818
#include <lanelet2_core/primitives/Lanelet.h>
1919
#include <lanelet2_routing/Forward.h>
@@ -183,4 +183,4 @@ lanelet::ConstLanelets from_ids(
183183
const lanelet::LaneletMapConstPtr lanelet_map, const std::vector<lanelet::Id> & ids);
184184
} // namespace autoware::lanelet2_utils
185185

186-
#endif // AUTOWARE_LANELET2_UTILS__TOPOLOGY_HPP_
186+
#endif // AUTOWARE__LANELET2_UTILS__TOPOLOGY_HPP_

common/autoware_lanelet2_utils/src/intersection.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <lanelet2_core/primitives/Lanelet.h>
1818

19-
namespace autoware::lanelet2_utility
19+
namespace autoware::lanelet2_utils
2020
{
2121

2222
bool is_intersection_lanelet(const lanelet::ConstLanelet & lanelet)
@@ -53,4 +53,4 @@ std::optional<TurnDirection> get_turn_direction(const lanelet::ConstLanelet & la
5353
return std::nullopt;
5454
}
5555

56-
} // namespace autoware::lanelet2_utility
56+
} // namespace autoware::lanelet2_utils

common/autoware_lanelet2_utils/src/kind.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <autoware_lanelet2_utils/kind.hpp>
15+
#include <autoware/lanelet2_utils/kind.hpp>
1616

1717
#include <lanelet2_core/primitives/Lanelet.h>
1818

common/autoware_lanelet2_utils/src/topology.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <autoware_lanelet2_utils/topology.hpp>
15+
#include <autoware/lanelet2_utils/topology.hpp>
1616
#include <range/v3/all.hpp>
1717
#include <rclcpp/logging.hpp>
1818

common/autoware_lanelet2_utils/test/intersection.cpp

+15-20
Original file line numberDiff line numberDiff line change
@@ -45,73 +45,68 @@ class TestWithIntersectionCrossingMap : public ::testing::Test
4545
TEST_F(TestWithIntersectionCrossingMap, is_intersection_lanelet_false)
4646
{
4747
EXPECT_EQ(
48-
lanelet2_utility::is_intersection_lanelet(lanelet_map_ptr_->laneletLayer.get(2257)), false);
48+
lanelet2_utils::is_intersection_lanelet(lanelet_map_ptr_->laneletLayer.get(2257)), false);
4949
}
5050

5151
TEST_F(TestWithIntersectionCrossingMap, is_intersection_lanelet_true)
5252
{
5353
EXPECT_EQ(
54-
lanelet2_utility::is_intersection_lanelet(lanelet_map_ptr_->laneletLayer.get(2274)), true);
54+
lanelet2_utils::is_intersection_lanelet(lanelet_map_ptr_->laneletLayer.get(2274)), true);
5555
}
5656

5757
TEST_F(TestWithIntersectionCrossingMap, is_straight_direction_false)
5858
{
59-
EXPECT_EQ(
60-
lanelet2_utility::is_straight_direction(lanelet_map_ptr_->laneletLayer.get(2274)), false);
59+
EXPECT_EQ(lanelet2_utils::is_straight_direction(lanelet_map_ptr_->laneletLayer.get(2274)), false);
6160
}
6261

6362
TEST_F(TestWithIntersectionCrossingMap, is_straight_direction_true)
6463
{
65-
EXPECT_EQ(
66-
lanelet2_utility::is_straight_direction(lanelet_map_ptr_->laneletLayer.get(2278)), true);
64+
EXPECT_EQ(lanelet2_utils::is_straight_direction(lanelet_map_ptr_->laneletLayer.get(2278)), true);
6765
}
6866

6967
TEST_F(TestWithIntersectionCrossingMap, is_left_direction_false)
7068
{
71-
EXPECT_EQ(lanelet2_utility::is_left_direction(lanelet_map_ptr_->laneletLayer.get(2278)), false);
69+
EXPECT_EQ(lanelet2_utils::is_left_direction(lanelet_map_ptr_->laneletLayer.get(2278)), false);
7270
}
7371

7472
TEST_F(TestWithIntersectionCrossingMap, is_left_direction_true)
7573
{
76-
EXPECT_EQ(lanelet2_utility::is_left_direction(lanelet_map_ptr_->laneletLayer.get(2274)), true);
74+
EXPECT_EQ(lanelet2_utils::is_left_direction(lanelet_map_ptr_->laneletLayer.get(2274)), true);
7775
}
7876

7977
TEST_F(TestWithIntersectionCrossingMap, is_right_direction_false)
8078
{
81-
EXPECT_EQ(lanelet2_utility::is_right_direction(lanelet_map_ptr_->laneletLayer.get(2274)), false);
79+
EXPECT_EQ(lanelet2_utils::is_right_direction(lanelet_map_ptr_->laneletLayer.get(2274)), false);
8280
}
8381

8482
TEST_F(TestWithIntersectionCrossingMap, is_right_direction_true)
8583
{
86-
EXPECT_EQ(lanelet2_utility::is_right_direction(lanelet_map_ptr_->laneletLayer.get(2277)), true);
84+
EXPECT_EQ(lanelet2_utils::is_right_direction(lanelet_map_ptr_->laneletLayer.get(2277)), true);
8785
}
8886

8987
TEST_F(TestWithIntersectionCrossingMap, get_turn_direction)
9088
{
9189
// not intersection
9290
EXPECT_EQ(
93-
lanelet2_utility::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2257)).has_value(),
91+
lanelet2_utils::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2257)).has_value(),
9492
false);
9593

9694
// straight
9795
{
98-
const auto lane =
99-
lanelet2_utility::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2278));
100-
EXPECT_EQ(lane.has_value() && lane.value() == lanelet2_utility::TurnDirection::Straight, true);
96+
const auto lane = lanelet2_utils::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2278));
97+
EXPECT_EQ(lane.has_value() && lane.value() == lanelet2_utils::TurnDirection::Straight, true);
10198
}
10299

103100
// left
104101
{
105-
const auto lane =
106-
lanelet2_utility::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2274));
107-
EXPECT_EQ(lane.has_value() && lane.value() == lanelet2_utility::TurnDirection::Left, true);
102+
const auto lane = lanelet2_utils::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2274));
103+
EXPECT_EQ(lane.has_value() && lane.value() == lanelet2_utils::TurnDirection::Left, true);
108104
}
109105

110106
// right
111107
{
112-
const auto lane =
113-
lanelet2_utility::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2277));
114-
EXPECT_EQ(lane.has_value() && lane.value() == lanelet2_utility::TurnDirection::Right, true);
108+
const auto lane = lanelet2_utils::get_turn_direction(lanelet_map_ptr_->laneletLayer.get(2277));
109+
EXPECT_EQ(lane.has_value() && lane.value() == lanelet2_utils::TurnDirection::Right, true);
115110
}
116111
}
117112

common/autoware_lanelet2_utils/test/kind.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "map_loader.hpp"
1616

1717
#include <ament_index_cpp/get_package_share_directory.hpp>
18-
#include <autoware_lanelet2_utils/kind.hpp>
18+
#include <autoware/lanelet2_utils/kind.hpp>
1919

2020
#include <gtest/gtest.h>
2121

common/autoware_lanelet2_utils/test/topology.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "map_loader.hpp"
1616

1717
#include <ament_index_cpp/get_package_share_directory.hpp>
18-
#include <autoware_lanelet2_utils/topology.hpp>
18+
#include <autoware/lanelet2_utils/topology.hpp>
1919
#include <range/v3/all.hpp>
2020

2121
#include <gtest/gtest.h>

common/autoware_motion_utils/test/src/distance/test_distance.cpp

+30
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,36 @@ TEST(distance, calcDecelDistWithJerkAndAccConstraints)
111111
current_vel, target_vel, current_acc, acc_min, jerk_acc, jerk_dec);
112112
EXPECT_NEAR(expected_dist, *dist, epsilon);
113113
}
114+
115+
// need to decelerate
116+
{
117+
constexpr double current_vel = 10.0;
118+
constexpr double target_vel = 0.5;
119+
constexpr double current_acc = -2.0;
120+
constexpr double acc_min = -3.0;
121+
constexpr double jerk_acc = 1.0;
122+
constexpr double jerk_dec = -0.5;
123+
124+
constexpr double expected_dist = 21.3333;
125+
const auto dist = calcDecelDistWithJerkAndAccConstraints(
126+
current_vel, target_vel, current_acc, acc_min, jerk_acc, jerk_dec);
127+
EXPECT_NEAR(expected_dist, *dist, epsilon);
128+
}
129+
130+
// no need to decelerate
131+
{
132+
constexpr double current_vel = 16.7;
133+
constexpr double target_vel = 16.7;
134+
constexpr double current_acc = 0.0;
135+
constexpr double acc_min = -0.5;
136+
constexpr double jerk_acc = 1.0;
137+
constexpr double jerk_dec = -0.5;
138+
139+
constexpr double expected_dist = 0.0;
140+
const auto dist = calcDecelDistWithJerkAndAccConstraints(
141+
current_vel, target_vel, current_acc, acc_min, jerk_acc, jerk_dec);
142+
EXPECT_NEAR(expected_dist, *dist, epsilon);
143+
}
114144
}
115145

116146
} // namespace

common/autoware_motion_utils/test/src/marker/test_virtual_wall_marker_creator.cpp

+22-14
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "gtest/gtest.h"
1717

1818
#include <string>
19+
#include <vector>
1920

2021
namespace
2122
{
@@ -67,32 +68,37 @@ TEST(VirtualWallMarkerCreator, oneWall)
6768
TEST(VirtualWallMarkerCreator, manyWalls)
6869
{
6970
autoware::motion_utils::VirtualWall wall;
71+
std::vector<autoware::motion_utils::VirtualWall> walls;
7072
autoware::motion_utils::VirtualWallMarkerCreator creator;
7173
wall.style = autoware::motion_utils::VirtualWallType::stop;
7274
wall.ns = "ns1_";
73-
creator.add_virtual_wall(wall);
74-
creator.add_virtual_wall(wall);
75-
creator.add_virtual_wall(wall);
75+
walls.push_back(wall);
76+
walls.push_back(wall);
77+
walls.push_back(wall);
7678
wall.ns = "ns2_";
77-
creator.add_virtual_wall(wall);
79+
walls.push_back(wall);
7880
wall.style = autoware::motion_utils::VirtualWallType::slowdown;
7981
wall.ns = "ns2_";
80-
creator.add_virtual_wall(wall);
81-
creator.add_virtual_wall(wall);
82+
walls.push_back(wall);
83+
walls.push_back(wall);
8284
wall.ns = "ns3_";
83-
creator.add_virtual_wall(wall);
84-
creator.add_virtual_wall(wall);
85-
creator.add_virtual_wall(wall);
85+
walls.push_back(wall);
86+
walls.push_back(wall);
87+
walls.push_back(wall);
8688
wall.style = autoware::motion_utils::VirtualWallType::deadline;
8789
wall.ns = "ns1_";
88-
creator.add_virtual_wall(wall);
90+
walls.push_back(wall);
8991
wall.ns = "ns2_";
90-
creator.add_virtual_wall(wall);
92+
walls.push_back(wall);
9193
wall.ns = "ns3_";
92-
creator.add_virtual_wall(wall);
94+
walls.push_back(wall);
95+
wall.style = autoware::motion_utils::VirtualWallType::pass;
96+
wall.ns = "ns1_";
97+
walls.push_back(wall);
98+
creator.add_virtual_walls(walls);
9399

94100
auto markers = creator.create_markers();
95-
ASSERT_EQ(markers.markers.size(), 12UL * 2);
101+
ASSERT_EQ(markers.markers.size(), 13UL * 2);
96102
EXPECT_TRUE(has_ns_id(markers, std::string("ns1_stop") + wall_ns_suffix, 0, 2));
97103
EXPECT_TRUE(has_ns_id(markers, std::string("ns1_stop") + text_ns_suffix, 0, 2));
98104
EXPECT_TRUE(has_ns_id(markers, std::string("ns2_stop") + wall_ns_suffix, 0));
@@ -107,8 +113,10 @@ TEST(VirtualWallMarkerCreator, manyWalls)
107113
EXPECT_TRUE(has_ns_id(markers, std::string("ns2_dead_line") + text_ns_suffix, 0));
108114
EXPECT_TRUE(has_ns_id(markers, std::string("ns3_dead_line") + wall_ns_suffix, 0));
109115
EXPECT_TRUE(has_ns_id(markers, std::string("ns3_dead_line") + text_ns_suffix, 0));
116+
EXPECT_TRUE(has_ns_id(markers, std::string("ns1_intended_pass") + "_direction", 0));
117+
EXPECT_TRUE(has_ns_id(markers, std::string("ns1_intended_pass") + text_ns_suffix, 0));
110118
markers = creator.create_markers();
111-
ASSERT_EQ(markers.markers.size(), 12UL * 2);
119+
ASSERT_EQ(markers.markers.size(), 13UL * 2);
112120
for (const auto & marker : markers.markers)
113121
EXPECT_EQ(marker.action, visualization_msgs::msg::Marker::DELETE);
114122
markers = creator.create_markers();

common/autoware_qp_interface/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ if(BUILD_TESTING)
5454
test/test_osqp_interface.cpp
5555
test/test_csc_matrix_conv.cpp
5656
test/test_proxqp_interface.cpp
57+
test/test_qp_interface.cpp
5758
)
5859
set(TEST_OSQP_INTERFACE_EXE test_osqp_interface)
5960
ament_add_ros_isolated_gtest(${TEST_OSQP_INTERFACE_EXE} ${TEST_SOURCES})

0 commit comments

Comments
 (0)