Skip to content

Commit

Permalink
Rename class ServiceWithValidation to Service
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Dec 19, 2024
1 parent 5ac238a commit 71094df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <concealer/autoware_universe.hpp>
#include <concealer/launch.hpp>
#include <concealer/publisher.hpp>
#include <concealer/service_with_validation.hpp>
#include <concealer/service.hpp>
#include <concealer/subscriber.hpp>
#include <concealer/task_queue.hpp>
#include <concealer/transition_assertion.hpp>
Expand Down Expand Up @@ -119,14 +119,14 @@ struct FieldOperatorApplication : public rclcpp::Node,
Subscriber<Trajectory> getTrajectory;
Subscriber<TurnIndicatorsCommand> getTurnIndicatorsCommand;

ServiceWithValidation<ClearRoute> requestClearRoute;
ServiceWithValidation<CooperateCommands> requestCooperateCommands;
ServiceWithValidation<Engage> requestEngage;
ServiceWithValidation<InitializeLocalization> requestInitialPose;
ServiceWithValidation<SetRoutePoints> requestSetRoutePoints;
ServiceWithValidation<AutoModeWithModule> requestSetRtcAutoMode;
ServiceWithValidation<SetVelocityLimit> requestSetVelocityLimit;
ServiceWithValidation<ChangeOperationMode> requestEnableAutowareControl;
Service<ClearRoute> requestClearRoute;
Service<CooperateCommands> requestCooperateCommands;
Service<Engage> requestEngage;
Service<InitializeLocalization> requestInitialPose;
Service<SetRoutePoints> requestSetRoutePoints;
Service<AutoModeWithModule> requestSetRtcAutoMode;
Service<SetVelocityLimit> requestSetVelocityLimit;
Service<ChangeOperationMode> requestEnableAutowareControl;
// clang-format on

/*
Expand Down
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 CONCEALER__SERVICE_WITH_VALIDATION_HPP_
#define CONCEALER__SERVICE_WITH_VALIDATION_HPP_
#ifndef CONCEALER__SERVICE_HPP_
#define CONCEALER__SERVICE_HPP_

#include <autoware_adapi_v1_msgs/msg/response_status.hpp>
#include <chrono>
Expand All @@ -28,7 +28,7 @@
namespace concealer
{
template <typename T>
class ServiceWithValidation
class Service
{
const std::string service_name;

Expand All @@ -39,13 +39,13 @@ class ServiceWithValidation
rclcpp::WallRate validation_rate;

public:
template <typename FieldOperatorApplication>
explicit ServiceWithValidation(
const std::string & service_name, FieldOperatorApplication & autoware,
template <typename Node>
explicit Service(
const std::string & service_name, Node & node,
const std::chrono::nanoseconds validation_interval = std::chrono::seconds(1))
: service_name(service_name),
logger(autoware.get_logger()),
client(autoware.template create_client<T>(service_name, rmw_qos_profile_default)),
logger(node.get_logger()),
client(node.template create_client<T>(service_name, rmw_qos_profile_default)),
validation_rate(validation_interval)
{
}
Expand Down Expand Up @@ -142,4 +142,4 @@ class ServiceWithValidation
};
} // namespace concealer

#endif //CONCEALER__SERVICE_WITH_VALIDATION_HPP_
#endif //CONCEALER__SERVICE_HPP_

0 comments on commit 71094df

Please sign in to comment.