Skip to content

Commit

Permalink
Merge branch 'lidar_centerpoint_branch' of https://github.com/tby-ude…
Browse files Browse the repository at this point in the history
…l/autoware.universe into lidar_centerpoint_branch

update the branch first, then renamed one .schema.json file.
  • Loading branch information
tby-udel committed Jun 5, 2024
2 parents a06ad1a + 4f497c3 commit d0b5926
Show file tree
Hide file tree
Showing 1,119 changed files with 6,628 additions and 15,120 deletions.
59 changes: 59 additions & 0 deletions .cppcheck_suppressions
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
arrayIndexThenCheck
assignBoolToFloat
checkersReport
constParameterPointer
constParameterReference
constStatement
constVariable
constVariablePointer
constVariableReference
containerOutOfBounds
cstyleCast
ctuOneDefinitionRuleViolation
current_deleted_index
duplicateAssignExpression
duplicateBranch
duplicateBreak
duplicateCondition
duplicateExpression
funcArgNamesDifferent
functionConst
functionStatic
invalidPointerCast
knownConditionTrueFalse
missingInclude
missingIncludeSystem
multiCondition
noConstructor
noExplicitConstructor
noValidConfiguration
obstacle_cruise_planner
passedByValue
preprocessorErrorDirective
redundantAssignment
redundantContinue
redundantIfRemove
redundantInitialization
returnByReference
selfAssignment
shadowArgument
shadowFunction
shadowVariable
stlFindInsert
syntaxError
uninitMemberVar
unknownMacro
unmatchedSuppression
unpreciseMathCall
unreadVariable
unsignedLessThanZero
unusedFunction
unusedScopedObject
unusedStructMember
unusedVariable
useInitializationList
useStlAlgorithm
uselessCallsSubstr
uselessOverride
variableScope
virtualCallInConstructor
9 changes: 3 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
### Automatically generated from package.xml ###
common/autoware_ad_api_specs/** [email protected] [email protected]
common/autoware_auto_common/** [email protected] [email protected] [email protected] [email protected]
common/autoware_auto_geometry/** [email protected]
common/autoware_auto_perception_rviz_plugin/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
common/autoware_auto_tf2/** [email protected] [email protected] [email protected] [email protected]
common/autoware_perception_rviz_plugin/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
common/autoware_overlay_rviz_plugin/autoware_mission_details_overlay_rviz_plugin/** [email protected]
common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/** [email protected]
common/autoware_point_types/** [email protected]
Expand Down Expand Up @@ -148,6 +146,8 @@ perception/traffic_light_occlusion_predictor/** [email protected] tao.zhon
perception/traffic_light_visualization/** [email protected] [email protected]
planning/autoware_behavior_path_external_request_lane_change_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_behavior_velocity_planner/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_behavior_velocity_template_module/** [email protected]
planning/autoware_behavior_velocity_virtual_traffic_light_module/** [email protected] [email protected] [email protected]
planning/autoware_planning_test_manager/** [email protected] [email protected]
planning/autoware_remaining_distance_time_calculator/** [email protected]
planning/autoware_static_centerline_generator/** [email protected] [email protected]
Expand All @@ -174,9 +174,7 @@ planning/behavior_velocity_planner_common/** [email protected] isamu.taka
planning/behavior_velocity_run_out_module/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_speed_bump_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_stop_line_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_template_module/** [email protected]
planning/behavior_velocity_traffic_light_module/** [email protected] [email protected] [email protected] [email protected]
planning/behavior_velocity_virtual_traffic_light_module/** [email protected] [email protected] [email protected]
planning/behavior_velocity_walkway_module/** [email protected] [email protected] [email protected] [email protected]
planning/costmap_generator/** [email protected] [email protected] [email protected]
planning/external_velocity_limit_selector/** [email protected] [email protected] [email protected] [email protected] [email protected]
Expand Down Expand Up @@ -219,7 +217,6 @@ simulator/fault_injection/** [email protected]
simulator/learning_based_vehicle_model/** [email protected] [email protected]
simulator/simple_planning_simulator/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
simulator/vehicle_door_simulator/** [email protected]
system/autoware_auto_msgs_adapter/** [email protected] [email protected]
system/bluetooth_monitor/** [email protected]
system/component_state_monitor/** [email protected]
system/default_ad_api/** [email protected] [email protected] [email protected]
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/cppcheck-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: cppcheck-all

on:
pull_request:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

jobs:
cppcheck-all:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake git libpcre3-dev
# cppcheck from apt does not yet support --check-level args, and thus install from source
- name: Install Cppcheck from source
run: |
mkdir /tmp/cppcheck
git clone https://github.com/danmar/cppcheck.git /tmp/cppcheck
cd /tmp/cppcheck
git checkout 2.14.1
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
- name: Run Cppcheck on all files
continue-on-error: true
id: cppcheck
run: |
cppcheck --enable=all --inconclusive --check-level=exhaustive --error-exitcode=1 --xml . 2> cppcheck-report.xml
shell: bash

- name: Count errors by error ID and severity
run: |
#!/bin/bash
temp_file=$(mktemp)
grep -oP '(?<=id=")[^"]+" severity="[^"]+' cppcheck-report.xml | sed 's/" severity="/,/g' > "$temp_file"
echo "Error counts by error ID and severity:"
sort "$temp_file" | uniq -c
rm "$temp_file"
shell: bash

- name: Upload Cppcheck report
uses: actions/upload-artifact@v2
with:
name: cppcheck-report
path: cppcheck-report.xml

- name: Fail the job if Cppcheck failed
if: steps.cppcheck.outcome == 'failure'
run: exit 1
65 changes: 65 additions & 0 deletions .github/workflows/cppcheck-differential.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: cppcheck-differential

on:
pull_request:

jobs:
cppcheck-differential:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake git libpcre3-dev
# cppcheck from apt does not yet support --check-level args, and thus install from source
- name: Install Cppcheck from source
run: |
mkdir /tmp/cppcheck
git clone https://github.com/danmar/cppcheck.git /tmp/cppcheck
cd /tmp/cppcheck
git checkout 2.14.1
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
- name: Get changed files
id: changed-files
run: |
git fetch origin ${{ github.base_ref }} --depth=1
git diff --name-only FETCH_HEAD ${{ github.sha }} > changed_files.txt
cat changed_files.txt
- name: Run Cppcheck on changed files
continue-on-error: true
id: cppcheck
run: |
files=$(cat changed_files.txt | grep -E '\.(cpp|hpp)$' || true)
if [ -n "$files" ]; then
echo "Running Cppcheck on changed files: $files"
cppcheck --enable=all --inconclusive --check-level=exhaustive --error-exitcode=1 --suppressions-list=.cppcheck_suppressions $files 2> cppcheck-report.txt
else
echo "No C++ files changed."
touch cppcheck-report.txt
fi
shell: bash

- name: Show cppcheck-report result
run: |
cat cppcheck-report.txt
- name: Upload Cppcheck report
uses: actions/upload-artifact@v2
with:
name: cppcheck-report
path: cppcheck-report.txt

- name: Fail the job if Cppcheck failed
if: steps.cppcheck.outcome == 'failure'
run: exit 1
21 changes: 21 additions & 0 deletions .github/workflows/dco.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: DCO
# ref: https://github.com/anchore/syft/pull/2926/files
on:
pull_request:
jobs:
dco:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Check DCO
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip3 install -U dco-check
dco-check --verbose --exclude-pattern 'pre-commit-ci\[bot\]@users\.noreply\.github\.com'
4 changes: 0 additions & 4 deletions build_depends.repos
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ repositories:
type: git
url: https://github.com/autowarefoundation/autoware_internal_msgs.git
version: main
core/external/autoware_auto_msgs:
type: git
url: https://github.com/tier4/autoware_auto_msgs.git
version: tier4/main
# universe
universe/external/tier4_autoware_msgs:
type: git
Expand Down
7 changes: 1 addition & 6 deletions common/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ nav:
- 'Common Libraries':
- 'autoware_auto_common':
- 'comparisons': common/autoware_auto_common/design/comparisons
- 'autoware_auto_geometry':
- 'interval': common/autoware_auto_geometry/design/interval
- 'polygon intersection 2d': common/autoware_auto_geometry/design/polygon_intersection_2d-design
- 'spatial hash': common/autoware_auto_geometry/design/spatial-hash-design
- 'autoware_auto_tf2': common/autoware_auto_tf2/design/autoware-auto-tf2-design
- 'autoware_point_types': common/autoware_point_types
- 'Cuda Utils': common/cuda_utils
- 'Geography Utils': common/geography_utils
Expand All @@ -35,7 +30,7 @@ nav:
- 'Introduction': common/tvm_utility
- 'YOLOv2 Tiny Example': common/tvm_utility/tvm-utility-yolo-v2-tiny-tests
- 'RVIZ2 Plugins':
- 'autoware_auto_perception_rviz_plugin': common/autoware_auto_perception_rviz_plugin
- 'autoware_perception_rviz_plugin': common/autoware_perception_rviz_plugin
- 'autoware_overlay_rviz_plugin': common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin
- 'autoware_mission_details_overlay_rviz_plugin': common/autoware_overlay_rviz_plugin/autoware_mission_details_overlay_rviz_plugin
- 'bag_time_manager_rviz_plugin': common/bag_time_manager_rviz_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using TimeStamp = builtin_interfaces::msg::Time;

/// \brief Helper class to check existence of header file in compile time:
/// https://stackoverflow.com/a/16000226/2325407
template <typename T, typename = nullptr_t>
template <typename T, typename = std::nullptr_t>
struct HasHeader : std::false_type
{
};
Expand All @@ -48,60 +48,60 @@ struct HasHeader<T, decltype((void)T::header, nullptr)> : std::true_type

/////////// Template declarations

/// Get frame id from message. nullptr_t is used to prevent template ambiguity on
/// Get frame id from message. std::nullptr_t is used to prevent template ambiguity on
/// SFINAE specializations. Provide a default value on specializations for a friendly API.
/// \tparam T Message type.
/// \param msg Message.
/// \return Frame id of the message.
template <typename T, nullptr_t>
template <typename T, std::nullptr_t>
const std::string & get_frame_id(const T & msg) noexcept;

/// Get a reference to the frame id from message. nullptr_t is used to prevent
/// Get a reference to the frame id from message. std::nullptr_t is used to prevent
/// template ambiguity on SFINAE specializations. Provide a default value on
/// specializations for a friendly API.
/// \tparam T Message type.
/// \param msg Message.
/// \return Frame id of the message.
template <typename T, nullptr_t>
template <typename T, std::nullptr_t>
std::string & get_frame_id(T & msg) noexcept;

/// Get stamp from message. nullptr_t is used to prevent template ambiguity on
/// Get stamp from message. std::nullptr_t is used to prevent template ambiguity on
/// SFINAE specializations. Provide a default value on specializations for a friendly API.
/// \tparam T Message type.
/// \param msg Message.
/// \return Frame id of the message.
template <typename T, nullptr_t>
template <typename T, std::nullptr_t>
const TimeStamp & get_stamp(const T & msg) noexcept;

/// Get a reference to the stamp from message. nullptr_t is used to prevent
/// Get a reference to the stamp from message. std::nullptr_t is used to prevent
/// template ambiguity on SFINAE specializations. Provide a default value on
/// specializations for a friendly API.
/// \tparam T Message type.
/// \param msg Message.
/// \return Frame id of the message.
template <typename T, nullptr_t>
template <typename T, std::nullptr_t>
TimeStamp & get_stamp(T & msg) noexcept;

/////////////// Default specializations for message types that contain a header.
template <class T, typename std::enable_if<HasHeader<T>::value, nullptr_t>::type = nullptr>
template <class T, typename std::enable_if<HasHeader<T>::value, std::nullptr_t>::type = nullptr>
const std::string & get_frame_id(const T & msg) noexcept
{
return msg.header.frame_id;
}

template <class T, typename std::enable_if<HasHeader<T>::value, nullptr_t>::type = nullptr>
template <class T, typename std::enable_if<HasHeader<T>::value, std::nullptr_t>::type = nullptr>
std::string & get_frame_id(T & msg) noexcept
{
return msg.header.frame_id;
}

template <class T, typename std::enable_if<HasHeader<T>::value, nullptr_t>::type = nullptr>
template <class T, typename std::enable_if<HasHeader<T>::value, std::nullptr_t>::type = nullptr>
TimeStamp & get_stamp(T & msg) noexcept
{
return msg.header.stamp;
}

template <class T, typename std::enable_if<HasHeader<T>::value, nullptr_t>::type = nullptr>
template <class T, typename std::enable_if<HasHeader<T>::value, std::nullptr_t>::type = nullptr>
TimeStamp get_stamp(const T & msg) noexcept
{
return msg.header.stamp;
Expand Down
Loading

0 comments on commit d0b5926

Please sign in to comment.