Skip to content

Commit

Permalink
refactor(component_interface_specs): prefix package and namespace wit…
Browse files Browse the repository at this point in the history
…h autoware (#9094)

Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve authored Oct 29, 2024
1 parent 9bd0f77 commit 589fee4
Show file tree
Hide file tree
Showing 59 changed files with 243 additions and 201 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(component_interface_specs)
project(autoware_component_interface_specs)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# component_interface_specs
# autoware_component_interface_specs

This package is a specification of component interfaces.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
#define COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_

#include <rclcpp/qos.hpp>

Expand All @@ -23,7 +23,7 @@
#include <tier4_control_msgs/srv/set_pause.hpp>
#include <tier4_control_msgs/srv/set_stop.hpp>

namespace control_interface
namespace autoware::component_interface_specs::control
{

struct SetPause
Expand Down Expand Up @@ -65,6 +65,6 @@ struct IsStopped
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

} // namespace control_interface
} // namespace autoware::component_interface_specs::control

#endif // COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
#define COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_

#include <rclcpp/qos.hpp>

Expand All @@ -22,7 +22,7 @@
#include <nav_msgs/msg/odometry.hpp>
#include <tier4_localization_msgs/srv/initialize_localization.hpp>

namespace localization_interface
namespace autoware::component_interface_specs::localization
{

struct Initialize
Expand Down Expand Up @@ -58,6 +58,6 @@ struct Acceleration
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

} // namespace localization_interface
} // namespace autoware::component_interface_specs::localization

#endif // COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__MAP_HPP_
#define COMPONENT_INTERFACE_SPECS__MAP_HPP_
#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_

#include <rclcpp/qos.hpp>

#include <tier4_map_msgs/msg/map_projector_info.hpp>

namespace map_interface
namespace autoware::component_interface_specs::map
{

struct MapProjectorInfo
Expand All @@ -31,6 +31,6 @@ struct MapProjectorInfo
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

} // namespace map_interface
} // namespace autoware::component_interface_specs::map

#endif // COMPONENT_INTERFACE_SPECS__MAP_HPP_
#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_
#define COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_
#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_

#include <rclcpp/qos.hpp>

#include <autoware_perception_msgs/msg/predicted_objects.hpp>

namespace perception_interface
namespace autoware::component_interface_specs::perception
{

struct ObjectRecognition
Expand All @@ -31,6 +31,6 @@ struct ObjectRecognition
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

} // namespace perception_interface
} // namespace autoware::component_interface_specs::perception

#endif // COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_
#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__PLANNING_HPP_
#define COMPONENT_INTERFACE_SPECS__PLANNING_HPP_
#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_

#include <rclcpp/qos.hpp>

Expand All @@ -24,7 +24,7 @@
#include <tier4_planning_msgs/srv/set_lanelet_route.hpp>
#include <tier4_planning_msgs/srv/set_waypoint_route.hpp>

namespace planning_interface
namespace autoware::component_interface_specs::planning
{

struct SetLaneletRoute
Expand Down Expand Up @@ -73,6 +73,6 @@ struct Trajectory
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

} // namespace planning_interface
} // namespace autoware::component_interface_specs::planning

#endif // COMPONENT_INTERFACE_SPECS__PLANNING_HPP_
#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_
#define COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_
#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_

#include <rclcpp/qos.hpp>

Expand All @@ -22,7 +22,7 @@
#include <tier4_system_msgs/srv/change_autoware_control.hpp>
#include <tier4_system_msgs/srv/change_operation_mode.hpp>

namespace system_interface
namespace autoware::component_interface_specs::system
{

struct MrmState
Expand Down Expand Up @@ -55,6 +55,6 @@ struct OperationModeState
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

} // namespace system_interface
} // namespace autoware::component_interface_specs::system

#endif // COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_
#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_
#define COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_
#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_

#include <rclcpp/qos.hpp>

Expand All @@ -26,7 +26,7 @@
#include <autoware_vehicle_msgs/msg/turn_indicators_report.hpp>
#include <tier4_vehicle_msgs/msg/battery_status.hpp>

namespace vehicle_interface
namespace autoware::component_interface_specs::vehicle
{

struct SteeringStatus
Expand Down Expand Up @@ -95,6 +95,6 @@ struct DoorStatus
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

} // namespace vehicle_interface
} // namespace autoware::component_interface_specs::vehicle

#endif // COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_
#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>component_interface_specs</name>
<name>autoware_component_interface_specs</name>
<version>0.0.0</version>
<description>The component_interface_specs package</description>
<description>The autoware_component_interface_specs package</description>
<maintainer email="[email protected]">Takagi, Isamu</maintainer>
<maintainer email="[email protected]">Yukihiro Saito</maintainer>
<license>Apache License 2.0</license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "component_interface_specs/control.hpp"
#include "autoware/component_interface_specs/control.hpp"
#include "gtest/gtest.h"

TEST(control, interface)
{
{
using control_interface::IsPaused;
using autoware::component_interface_specs::control::IsPaused;
IsPaused is_paused;
size_t depth = 1;
EXPECT_EQ(is_paused.depth, depth);
Expand All @@ -27,7 +27,7 @@ TEST(control, interface)
}

{
using control_interface::IsStartRequested;
using autoware::component_interface_specs::control::IsStartRequested;
IsStartRequested is_start_requested;
size_t depth = 1;
EXPECT_EQ(is_start_requested.depth, depth);
Expand All @@ -36,7 +36,7 @@ TEST(control, interface)
}

{
using control_interface::IsStopped;
using autoware::component_interface_specs::control::IsStopped;
IsStopped is_stopped;
size_t depth = 1;
EXPECT_EQ(is_stopped.depth, depth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "component_interface_specs/localization.hpp"
#include "autoware/component_interface_specs/localization.hpp"
#include "gtest/gtest.h"

TEST(localization, interface)
{
{
using localization_interface::InitializationState;
using autoware::component_interface_specs::localization::InitializationState;
InitializationState initialization_state;
size_t depth = 1;
EXPECT_EQ(initialization_state.depth, depth);
Expand All @@ -27,7 +27,7 @@ TEST(localization, interface)
}

{
using localization_interface::KinematicState;
using autoware::component_interface_specs::localization::KinematicState;
KinematicState kinematic_state;
size_t depth = 1;
EXPECT_EQ(kinematic_state.depth, depth);
Expand All @@ -36,7 +36,7 @@ TEST(localization, interface)
}

{
using localization_interface::Acceleration;
using autoware::component_interface_specs::localization::Acceleration;
Acceleration acceleration;
size_t depth = 1;
EXPECT_EQ(acceleration.depth, depth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "component_interface_specs/map.hpp"
#include "autoware/component_interface_specs/map.hpp"
#include "gtest/gtest.h"

TEST(map, interface)
{
{
using map_interface::MapProjectorInfo;
using autoware::component_interface_specs::map::MapProjectorInfo;
MapProjectorInfo map_projector;
size_t depth = 1;
EXPECT_EQ(map_projector.depth, depth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "component_interface_specs/perception.hpp"
#include "autoware/component_interface_specs/perception.hpp"
#include "gtest/gtest.h"

TEST(perception, interface)
{
{
using perception_interface::ObjectRecognition;
using autoware::component_interface_specs::perception::ObjectRecognition;
ObjectRecognition object_recognition;
size_t depth = 1;
EXPECT_EQ(object_recognition.depth, depth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "component_interface_specs/planning.hpp"
#include "autoware/component_interface_specs/planning.hpp"
#include "gtest/gtest.h"

TEST(planning, interface)
{
{
using planning_interface::RouteState;
using autoware::component_interface_specs::planning::RouteState;
RouteState state;
size_t depth = 1;
EXPECT_EQ(state.depth, depth);
Expand All @@ -27,7 +27,7 @@ TEST(planning, interface)
}

{
using planning_interface::LaneletRoute;
using autoware::component_interface_specs::planning::LaneletRoute;
LaneletRoute route;
size_t depth = 1;
EXPECT_EQ(route.depth, depth);
Expand All @@ -36,7 +36,7 @@ TEST(planning, interface)
}

{
using planning_interface::Trajectory;
using autoware::component_interface_specs::planning::Trajectory;
Trajectory trajectory;
size_t depth = 1;
EXPECT_EQ(trajectory.depth, depth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "component_interface_specs/system.hpp"
#include "autoware/component_interface_specs/system.hpp"
#include "gtest/gtest.h"

TEST(system, interface)
{
{
using system_interface::MrmState;
using autoware::component_interface_specs::system::MrmState;
MrmState state;
size_t depth = 1;
EXPECT_EQ(state.depth, depth);
Expand All @@ -27,7 +27,7 @@ TEST(system, interface)
}

{
using system_interface::OperationModeState;
using autoware::component_interface_specs::system::OperationModeState;
OperationModeState state;
size_t depth = 1;
EXPECT_EQ(state.depth, depth);
Expand Down
Loading

0 comments on commit 589fee4

Please sign in to comment.