Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/concealer 1 #1488

Merged
merged 45 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6467268
Remove class `concealer::Autoware`
yamacir-kit Dec 6, 2024
d54d506
Remove member function `AutowareUniverse::stopAndJoin`
yamacir-kit Dec 6, 2024
564b75a
Remove member function `AutowareUniverse::set`
yamacir-kit Dec 9, 2024
0a4b2b0
Update `FieldOperatorApplication::getTurnIndicatorsCommand` to pure v…
yamacir-kit Dec 9, 2024
064ac14
Remove stream input/output operator for `TurnIndicatorsCommand`
yamacir-kit Dec 9, 2024
580c1d2
Remove member function `FieldOperatorApplication::restrictTargetSpeed`
yamacir-kit Dec 9, 2024
830b8f1
Remove member function `FieldOperatorApplication::checkAutowareProcess`
yamacir-kit Dec 9, 2024
c4e331d
Cleanup `FieldOperatorApplication::spinSome`
yamacir-kit Dec 11, 2024
d57b87c
Remove parameter `random_offset` from scenario `sample.yaml`
yamacir-kit Dec 11, 2024
3cf5169
Remove virtual function `sendSIGINT`
yamacir-kit Dec 11, 2024
e0f40f2
Remove member function `isStopRequested` and `stopRequest`
yamacir-kit Dec 11, 2024
724d705
Update `~FieldOperatorApplication()` to be non-virtual
yamacir-kit Dec 11, 2024
0149632
Merge remote-tracking branch 'origin/master' into refactor/concealer-1
yamacir-kit Dec 11, 2024
3f40160
Remove macro `CONCEALER_ISOLATE_STANDARD_OUTPUT`
yamacir-kit Dec 11, 2024
f0c86a4
Update all members of `FieldOperatorApplicationFor<...>` to be public
yamacir-kit Dec 11, 2024
b84c41f
Move `getAutowareState` into `FieldOperatorApplication`
yamacir-kit Dec 11, 2024
a2cae3a
Move base class `TransitionAssertion<T>` to `FieldOperatorApplication`
yamacir-kit Dec 11, 2024
b6ecb69
Remove member function `receiveEmergencyState`
yamacir-kit Dec 11, 2024
7c9d6d6
Remove member function `receiveMrmState`
yamacir-kit Dec 11, 2024
3bfba93
Move data members into base class `FieldOperatorApplication`
yamacir-kit Dec 12, 2024
be05813
Merge remote-tracking branch 'origin/master' into refactor/concealer-1
yamacir-kit Dec 13, 2024
a9d81db
Update some member functions of `FieldOperatorApplication` to be non-…
yamacir-kit Dec 13, 2024
0b16184
Update all member function of `FieldOperatorApplication` to be non-vi…
yamacir-kit Dec 13, 2024
9fefd58
Remove class template `FieldOperatorApplicationFor<T>`
yamacir-kit Dec 13, 2024
dd91e15
Merge remote-tracking branch 'origin/master' into refactor/concealer-1
yamacir-kit Dec 16, 2024
0b75502
Remove function template `toAutowareStateString`
yamacir-kit Dec 16, 2024
0e4277f
Remove function template `listup`
yamacir-kit Dec 16, 2024
3a22042
Move member function implementations into `field_operator_application…
yamacir-kit Dec 16, 2024
14c5051
Remove header file `autoware_stream.hpp`
yamacir-kit Dec 16, 2024
3897b9f
Merge remote-tracking branch 'origin/master' into refactor/concealer-1
yamacir-kit Dec 16, 2024
cd96887
Cleanup class template `SubscriberWrapper`
yamacir-kit Dec 16, 2024
ecde7c0
Add new header file `concealer/member_detector.hpp`
yamacir-kit Dec 16, 2024
5c65f27
Add using declarations for subscribers and publishers
yamacir-kit Dec 16, 2024
2400c42
Remove member function `FieldOperatorApplication::shutdownAutoware`
yamacir-kit Dec 16, 2024
2104027
Remove class `ServceWithValidation::TimeoutError`
yamacir-kit Dec 17, 2024
f55d308
Merge remote-tracking branch 'origin/master' into refactor/concealer-1
yamacir-kit Dec 17, 2024
937daeb
Remove member function `validateAvailability` and `callWithTimeoutVal…
yamacir-kit Dec 17, 2024
d86260e
Remove free function `sudokill`
yamacir-kit Dec 17, 2024
0aa6335
Remove member function `TaskQueue::stopAndJoin`
yamacir-kit Dec 17, 2024
166a239
Remove macro `DEFINE_STATE_PREDICATE`
yamacir-kit Dec 17, 2024
fb1cb9a
Remove `getAcceleration`, `getSteeringAngle`, `getVelocity` and `getG…
yamacir-kit Dec 17, 2024
5f599bb
Reformat
yamacir-kit Dec 18, 2024
04c283d
Merge branch 'master' into refactor/concealer-1
yamacir-kit Dec 18, 2024
6ab47db
Merge branch 'master' into refactor/concealer-1
yamacir-kit Dec 18, 2024
9d88a21
Merge branch 'master' into refactor/concealer-1
yamacir-kit Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions external/concealer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

ament_auto_add_library(${PROJECT_NAME} SHARED
src/autoware.cpp
src/autoware_universe.cpp
src/execute.cpp
src/field_operator_application.cpp
src/field_operator_application_for_autoware_universe.cpp
src/is_package_exists.cpp
src/task_queue.cpp)

Expand Down
83 changes: 0 additions & 83 deletions external/concealer/include/concealer/autoware.hpp

This file was deleted.

31 changes: 0 additions & 31 deletions external/concealer/include/concealer/autoware_stream.hpp

This file was deleted.

56 changes: 27 additions & 29 deletions external/concealer/include/concealer/autoware_universe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,57 +15,68 @@
#ifndef CONCEALER__AUTOWARE_UNIVERSE_HPP_
#define CONCEALER__AUTOWARE_UNIVERSE_HPP_

#include <atomic>
#include <autoware_control_msgs/msg/control.hpp>
#include <autoware_vehicle_msgs/msg/control_mode_report.hpp>
#include <autoware_vehicle_msgs/msg/gear_command.hpp>
#include <autoware_vehicle_msgs/msg/gear_report.hpp>
#include <autoware_vehicle_msgs/msg/steering_report.hpp>
#include <autoware_vehicle_msgs/msg/turn_indicators_command.hpp>
#include <autoware_vehicle_msgs/msg/turn_indicators_report.hpp>
#include <autoware_vehicle_msgs/msg/velocity_report.hpp>
#include <autoware_vehicle_msgs/srv/control_mode_command.hpp>
#include <concealer/autoware.hpp>
#include <concealer/continuous_transform_broadcaster.hpp>
#include <concealer/publisher_wrapper.hpp>
#include <concealer/subscriber_wrapper.hpp>
#include <concealer/visibility.hpp>
#include <geometry_msgs/msg/accel_with_covariance_stamped.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <rclcpp/rclcpp.hpp>
#include <tier4_planning_msgs/msg/path_with_lane_id.hpp>

namespace concealer
{
/*
* Implements Autoware interface for Autoware Universe
* NOTE: This class is intended to be move to simple_sensor_simulator
*/
class AutowareUniverse : public Autoware
class AutowareUniverse : public rclcpp::Node,
public ContinuousTransformBroadcaster<AutowareUniverse>
{
public:
// clang-format off
using AccelWithCovarianceStamped = geometry_msgs::msg::AccelWithCovarianceStamped;
using Control = autoware_control_msgs::msg::Control;
using ControlModeCommand = autoware_vehicle_msgs::srv::ControlModeCommand;
using ControlModeReport = autoware_vehicle_msgs::msg::ControlModeReport;
using GearCommand = autoware_vehicle_msgs::msg::GearCommand;
using GearReport = autoware_vehicle_msgs::msg::GearReport;
using Odometry = nav_msgs::msg::Odometry;
using PathWithLaneId = tier4_planning_msgs::msg::PathWithLaneId;
using PoseWithCovarianceStamped = geometry_msgs::msg::PoseWithCovarianceStamped;
using SteeringReport = autoware_vehicle_msgs::msg::SteeringReport;
using TurnIndicatorsCommand = autoware_vehicle_msgs::msg::TurnIndicatorsCommand;
using TurnIndicatorsReport = autoware_vehicle_msgs::msg::TurnIndicatorsReport;
using VelocityReport = autoware_vehicle_msgs::msg::VelocityReport;

SubscriberWrapper<Control, ThreadSafety::safe> getCommand;
SubscriberWrapper<GearCommand, ThreadSafety::safe> getGearCommandImpl;
SubscriberWrapper<TurnIndicatorsCommand, ThreadSafety::safe> getTurnIndicatorsCommand;
SubscriberWrapper<PathWithLaneId, ThreadSafety::safe> getPathWithLaneId;
SubscriberWrapper<Control> getCommand;
SubscriberWrapper<GearCommand> getGearCommand;
SubscriberWrapper<TurnIndicatorsCommand> getTurnIndicatorsCommand;
SubscriberWrapper<PathWithLaneId> getPathWithLaneId;

PublisherWrapper<AccelWithCovarianceStamped> setAcceleration;
PublisherWrapper<nav_msgs::msg::Odometry> setOdometry;
PublisherWrapper<Odometry> setOdometry;
PublisherWrapper<PoseWithCovarianceStamped> setPose;
PublisherWrapper<SteeringReport> setSteeringReport;
PublisherWrapper<GearReport> setGearReport;
PublisherWrapper<ControlModeReport> setControlModeReport;
PublisherWrapper<VelocityReport> setVelocityReport;
PublisherWrapper<TurnIndicatorsReport> setTurnIndicatorsReport;

std::atomic<geometry_msgs::msg::Accel> current_acceleration;
std::atomic<geometry_msgs::msg::Pose> current_pose;
std::atomic<geometry_msgs::msg::Twist> current_twist;
// clang-format on

private:
rclcpp::Service<ControlModeCommand>::SharedPtr control_mode_request_server;

const rclcpp::TimerBase::SharedPtr localization_update_timer;
Expand All @@ -82,38 +93,25 @@ class AutowareUniverse : public Autoware

std::exception_ptr thrown;

auto stopAndJoin() -> void;

public:
CONCEALER_PUBLIC explicit AutowareUniverse(bool);

~AutowareUniverse();

auto rethrow() -> void override;

auto getAcceleration() const -> double override;

auto getSteeringAngle() const -> double override;

auto getVelocity() const -> double override;
auto rethrow() -> void;

auto updateLocalization() -> void;

auto updateVehicleState() -> void;

auto getGearCommand() const -> GearCommand override;

auto getGearSign() const -> double override;
auto getVehicleCommand() const -> std::tuple<double, double, double, double, int>;

auto getVehicleCommand() const -> std::tuple<Control, GearCommand> override;
auto getRouteLanelets() const -> std::vector<std::int64_t>;

auto getRouteLanelets() const -> std::vector<std::int64_t> override;
auto getControlModeReport() const -> ControlModeReport;

auto getControlModeReport() const -> ControlModeReport override;

auto setManualMode() -> void override;
auto setManualMode() -> void;
};

} // namespace concealer

#endif // CONCEALER__AUTOWARE_UNIVERSE_HPP_
2 changes: 0 additions & 2 deletions external/concealer/include/concealer/execute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ auto execute(const std::vector<std::string> &) -> int;

// Emulates shell's $(...) expression.
auto dollar(const std::string & command) -> std::string;

void sudokill(const pid_t process_id);
} // namespace concealer

#endif // CONCEALER__EXECUTE_HPP_
Loading
Loading