Commit dda3cca 1 parent 44e4be7 commit dda3cca Copy full SHA for dda3cca
File tree 4 files changed +57
-0
lines changed
motion_utils/src/resample
include/tier4_autoware_utils/system
4 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 20
20
#include " motion_utils/resample/resample_utils.hpp"
21
21
#include " motion_utils/trajectory/trajectory.hpp"
22
22
#include " tier4_autoware_utils/geometry/geometry.hpp"
23
+ #include " tier4_autoware_utils/system/assert.hpp"
23
24
24
25
namespace motion_utils
25
26
{
@@ -28,6 +29,7 @@ std::vector<geometry_msgs::msg::Point> resamplePointVector(
28
29
const std::vector<double > & resampled_arclength, const bool use_akima_spline_for_xy,
29
30
const bool use_lerp_for_z)
30
31
{
32
+ ASSERT (false );
31
33
// validate arguments
32
34
if (!resample_utils::validate_arguments (points, resampled_arclength)) {
33
35
return points;
Original file line number Diff line number Diff line change @@ -16,8 +16,14 @@ ament_auto_add_library(tier4_autoware_utils SHARED
16
16
src/ros/marker_helper.cpp
17
17
src/ros/logger_level_configure.cpp
18
18
src/system /backtrace.cpp
19
+ src/system /assert.cpp
19
20
)
20
21
22
+ option (ENABLE_ASSERT_ABORT "Option to enable assert abort" ON )
23
+ if (ENABLE_ASSERT_ABORT)
24
+ target_compile_definitions (tier4_autoware_utils PUBLIC ENABLE_ASSERT_ABORT)
25
+ endif ()
26
+
21
27
if (BUILD_TESTING)
22
28
find_package (ament_cmake_ros REQUIRED)
23
29
Original file line number Diff line number Diff line change
1
+ // Copyright 2024 TIER IV, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #ifndef TIER4_AUTOWARE_UTILS__SYSTEM__ASSERT_HPP_
16
+ #define TIER4_AUTOWARE_UTILS__SYSTEM__ASSERT_HPP_
17
+
18
+ #ifdef ENABLE_ASSERT_ABORT
19
+
20
+ #define ASSERT (expr ) \
21
+ printf ( \
22
+ " [Assertion] %s() at %s:%d " #expr \
23
+ " --------------------------------------------------------------------------------------------" \
24
+ " ---------------------------------------------------------" , \
25
+ __FUNCTION__, __FILE__, __LINE__);
26
+
27
+ #else
28
+
29
+ #define ASSERT (...)
30
+ hogehoge
31
+
32
+ #endif
33
+
34
+ #endif // TIER4_AUTOWARE_UTILS__SYSTEM__ASSERT_HPP_
Original file line number Diff line number Diff line change
1
+ // Copyright 2024 TIER IV, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ #include " tier4_autoware_utils/system/assert.hpp"
You can’t perform that action at this time.
0 commit comments