Skip to content

Commit

Permalink
fix(autoware_auto_common): move headers to a separate directory (auto…
Browse files Browse the repository at this point in the history
…warefoundation#5919)

* fix(autoware_auto_common): move headers to a separate directory

Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and karishma1911 committed Jun 3, 2024
1 parent e9fd9a5 commit e0f0be5
Show file tree
Hide file tree
Showing 36 changed files with 79 additions and 77 deletions.
4 changes: 2 additions & 2 deletions common/autoware_auto_common/design/comparisons.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ The `exclusive_or` function will test whether two values cast to different boole
## Example Usage

```c++
#include "common/bool_comparisons.hpp"
#include "common/float_comparisons.hpp"
#include "autoware_auto_common/common/bool_comparisons.hpp"
#include "autoware_auto_common/common/float_comparisons.hpp"

#include <iostream>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
//
// Developed by Apex.AI, Inc.

#include <common/types.hpp>
#include <common/visibility_control.hpp>
#include "autoware_auto_common/common/types.hpp"
#include "autoware_auto_common/common/visibility_control.hpp"

#include <cstdint>
#include <tuple>
#include <type_traits>

#ifndef COMMON__TYPE_TRAITS_HPP_
#define COMMON__TYPE_TRAITS_HPP_
#ifndef AUTOWARE_AUTO_COMMON__COMMON__TYPE_TRAITS_HPP_
#define AUTOWARE_AUTO_COMMON__COMMON__TYPE_TRAITS_HPP_

namespace autoware
{
Expand Down Expand Up @@ -219,4 +219,4 @@ struct intersect
} // namespace common
} // namespace autoware

#endif // COMMON__TYPE_TRAITS_HPP_
#endif // AUTOWARE_AUTO_COMMON__COMMON__TYPE_TRAITS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
/// \file
/// \brief This file includes common type definition

#ifndef COMMON__TYPES_HPP_
#define COMMON__TYPES_HPP_
#ifndef AUTOWARE_AUTO_COMMON__COMMON__TYPES_HPP_
#define AUTOWARE_AUTO_COMMON__COMMON__TYPES_HPP_

#include "common/visibility_control.hpp"
#include "helper_functions/float_comparisons.hpp"
#include "autoware_auto_common/common/visibility_control.hpp"
#include "autoware_auto_common/helper_functions/float_comparisons.hpp"

#include <cstdint>
#include <limits>
Expand Down Expand Up @@ -122,4 +122,4 @@ using void_t = void;
} // namespace common
} // namespace autoware

#endif // COMMON__TYPES_HPP_
#endif // AUTOWARE_AUTO_COMMON__COMMON__TYPES_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#ifndef COMMON__VISIBILITY_CONTROL_HPP_
#define COMMON__VISIBILITY_CONTROL_HPP_
#ifndef AUTOWARE_AUTO_COMMON__COMMON__VISIBILITY_CONTROL_HPP_
#define AUTOWARE_AUTO_COMMON__COMMON__VISIBILITY_CONTROL_HPP_

#if defined(_MSC_VER) && defined(_WIN64)
#if defined(COMMON_BUILDING_DLL) || defined(COMMON_EXPORTS)
Expand All @@ -35,4 +35,4 @@
#error "Unsupported Build Configuration"
#endif // _MSC_VER

#endif // COMMON__VISIBILITY_CONTROL_HPP_
#endif // AUTOWARE_AUTO_COMMON__COMMON__VISIBILITY_CONTROL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#ifndef HELPER_FUNCTIONS__ANGLE_UTILS_HPP_
#define HELPER_FUNCTIONS__ANGLE_UTILS_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__ANGLE_UTILS_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__ANGLE_UTILS_HPP_

#include <cmath>
#include <type_traits>
Expand Down Expand Up @@ -63,4 +63,4 @@ constexpr T wrap_angle(T angle) noexcept
} // namespace common
} // namespace autoware

#endif // HELPER_FUNCTIONS__ANGLE_UTILS_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__ANGLE_UTILS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.

#ifndef HELPER_FUNCTIONS__BOOL_COMPARISONS_HPP_
#define HELPER_FUNCTIONS__BOOL_COMPARISONS_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__BOOL_COMPARISONS_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__BOOL_COMPARISONS_HPP_

#include "common/types.hpp"
#include "autoware_auto_common/common/types.hpp"

namespace autoware
{
Expand All @@ -47,4 +47,4 @@ types::bool8_t exclusive_or(const T & a, const T & b)
} // namespace common
} // namespace autoware

#endif // HELPER_FUNCTIONS__BOOL_COMPARISONS_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__BOOL_COMPARISONS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
/// \file
/// \brief This file includes common helper functions

#ifndef HELPER_FUNCTIONS__BYTE_READER_HPP_
#define HELPER_FUNCTIONS__BYTE_READER_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__BYTE_READER_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__BYTE_READER_HPP_

#include <cstdint>
#include <cstring>
Expand Down Expand Up @@ -70,4 +70,4 @@ class ByteReader
} // namespace common
} // namespace autoware

#endif // HELPER_FUNCTIONS__BYTE_READER_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__BYTE_READER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
/// \file
/// \brief This file includes common helper functions

#ifndef HELPER_FUNCTIONS__CRTP_HPP_
#define HELPER_FUNCTIONS__CRTP_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__CRTP_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__CRTP_HPP_

namespace autoware
{
Expand Down Expand Up @@ -49,4 +49,4 @@ class crtp
} // namespace common
} // namespace autoware

#endif // HELPER_FUNCTIONS__CRTP_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__CRTP_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.

#ifndef HELPER_FUNCTIONS__FLOAT_COMPARISONS_HPP_
#define HELPER_FUNCTIONS__FLOAT_COMPARISONS_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__FLOAT_COMPARISONS_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__FLOAT_COMPARISONS_HPP_

#include <algorithm>
#include <cmath>
Expand Down Expand Up @@ -146,4 +146,4 @@ bool approx_eq(const T & a, const T & b, const T & abs_eps, const T & rel_eps)
} // namespace common
} // namespace autoware

#endif // HELPER_FUNCTIONS__FLOAT_COMPARISONS_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__FLOAT_COMPARISONS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#ifndef HELPER_FUNCTIONS__MAHALANOBIS_DISTANCE_HPP_
#define HELPER_FUNCTIONS__MAHALANOBIS_DISTANCE_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__MAHALANOBIS_DISTANCE_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__MAHALANOBIS_DISTANCE_HPP_

#include <Eigen/Cholesky>

Expand Down Expand Up @@ -69,4 +69,4 @@ types::float32_t calculate_mahalanobis_distance(
} // namespace common
} // namespace autoware

#endif // HELPER_FUNCTIONS__MAHALANOBIS_DISTANCE_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__MAHALANOBIS_DISTANCE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
/// \file
/// \brief This file includes common helper functions

#ifndef HELPER_FUNCTIONS__MESSAGE_ADAPTERS_HPP_
#define HELPER_FUNCTIONS__MESSAGE_ADAPTERS_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__MESSAGE_ADAPTERS_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__MESSAGE_ADAPTERS_HPP_

#include <builtin_interfaces/msg/time.hpp>

Expand Down Expand Up @@ -112,4 +112,4 @@ TimeStamp get_stamp(const T & msg) noexcept
} // namespace common
} // namespace autoware

#endif // HELPER_FUNCTIONS__MESSAGE_ADAPTERS_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__MESSAGE_ADAPTERS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#ifndef HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
#define HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_

#include <common/types.hpp>
#include "autoware_auto_common/common/types.hpp"

#include <type_traits>

Expand Down Expand Up @@ -72,4 +72,4 @@ struct expression_valid_with_return<
} // namespace helper_functions
} // namespace common
} // namespace autoware
#endif // HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#ifndef HELPER_FUNCTIONS__TYPE_NAME_HPP_
#define HELPER_FUNCTIONS__TYPE_NAME_HPP_
#ifndef AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__TYPE_NAME_HPP_
#define AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__TYPE_NAME_HPP_

#include <common/visibility_control.hpp>
#include "autoware_auto_common/common/visibility_control.hpp"

#include <string>
#include <typeinfo>
Expand Down Expand Up @@ -53,4 +53,4 @@ COMMON_PUBLIC std::string get_type_name(const T &)
} // namespace helper_functions
} // namespace autoware

#endif // HELPER_FUNCTIONS__TYPE_NAME_HPP_
#endif // AUTOWARE_AUTO_COMMON__HELPER_FUNCTIONS__TYPE_NAME_HPP_
4 changes: 2 additions & 2 deletions common/autoware_auto_common/test/test_angle_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// Developed by Apex.AI, Inc.

#include <common/types.hpp>
#include <helper_functions/angle_utils.hpp>
#include "autoware_auto_common/common/types.hpp"
#include "autoware_auto_common/helper_functions/angle_utils.hpp"

#include <gtest/gtest.h>

Expand Down
2 changes: 1 addition & 1 deletion common/autoware_auto_common/test/test_bool_comparisons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.

#include "helper_functions/bool_comparisons.hpp"
#include "autoware_auto_common/helper_functions/bool_comparisons.hpp"

#include <gtest/gtest.h>

Expand Down
7 changes: 4 additions & 3 deletions common/autoware_auto_common/test/test_byte_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#include "common/types.hpp"
#include "gtest/gtest.h"
#include "helper_functions/byte_reader.hpp"
#include "autoware_auto_common/common/types.hpp"
#include "autoware_auto_common/helper_functions/byte_reader.hpp"

#include <gtest/gtest.h>

#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.

#include "helper_functions/float_comparisons.hpp"
#include "autoware_auto_common/helper_functions/float_comparisons.hpp"

#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.
#include <common/types.hpp>
#include <helper_functions/mahalanobis_distance.hpp>
#include "autoware_auto_common/common/types.hpp"
#include "autoware_auto_common/helper_functions/mahalanobis_distance.hpp"

#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#include <helper_functions/message_adapters.hpp>
#include "autoware_auto_common/helper_functions/message_adapters.hpp"

#include <geometry_msgs/msg/transform_stamped.hpp>

Expand Down
2 changes: 1 addition & 1 deletion common/autoware_auto_common/test/test_template_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#include <helper_functions/template_utils.hpp>
#include "autoware_auto_common/helper_functions/template_utils.hpp"

#include <gtest/gtest.h>

Expand Down
4 changes: 2 additions & 2 deletions common/autoware_auto_common/test/test_type_name.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// Developed by Apex.AI, Inc.

#include <common/types.hpp>
#include <helper_functions/type_name.hpp>
#include "autoware_auto_common/common/types.hpp"
#include "autoware_auto_common/helper_functions/type_name.hpp"

#include <gtest/gtest.h>

Expand Down
4 changes: 2 additions & 2 deletions common/autoware_auto_common/test/test_type_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// Developed by Apex.AI, Inc.

#include <common/type_traits.hpp>
#include <common/types.hpp>
#include "autoware_auto_common/common/type_traits.hpp"
#include "autoware_auto_common/common/types.hpp"

#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "autoware_auto_geometry/interval.hpp"

#include <common/types.hpp>
#include <autoware_auto_common/common/types.hpp>

#include "autoware_auto_planning_msgs/msg/trajectory_point.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "autoware_auto_geometry/common_2d.hpp"

#include <common/types.hpp>
#include <autoware_auto_common/common/types.hpp>

// lint -e537 NOLINT pclint vs cpplint
#include <algorithm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "autoware_auto_geometry/common_2d.hpp"

#include <common/types.hpp>
#include <autoware_auto_common/common/types.hpp>

#include <algorithm>
#include <iterator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#ifndef AUTOWARE_AUTO_GEOMETRY__INTERVAL_HPP_
#define AUTOWARE_AUTO_GEOMETRY__INTERVAL_HPP_

#include "common/types.hpp"
#include "helper_functions/float_comparisons.hpp"
#include <autoware_auto_common/common/types.hpp>
#include <autoware_auto_common/helper_functions/float_comparisons.hpp>

#include <algorithm>
#include <cmath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#define AUTOWARE_AUTO_GEOMETRY__LOOKUP_TABLE_HPP_

#include "autoware_auto_geometry/interval.hpp"
#include "common/types.hpp"

#include <autoware_auto_common/common/types.hpp>

#include <cmath>
#include <stdexcept>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "autoware_auto_geometry/spatial_hash_config.hpp"
#include "autoware_auto_geometry/visibility_control.hpp"

#include <common/types.hpp>
#include <autoware_auto_common/common/types.hpp>

#include <unordered_map>
#include <utility>
Expand Down
Loading

0 comments on commit e0f0be5

Please sign in to comment.