@@ -40,21 +40,27 @@ class SideShiftModule : public SceneModuleInterface
40
40
{
41
41
public:
42
42
SideShiftModule (
43
- const std::string & name, rclcpp::Node & node, const SideShiftParameters & parameters);
43
+ const std::string & name, rclcpp::Node & node,
44
+ const std::shared_ptr<SideShiftParameters> & parameters);
44
45
45
46
bool isExecutionRequested () const override ;
46
47
bool isExecutionReady () const override ;
47
48
bool isReadyForNextRequest (
48
49
const double & min_request_time_sec, bool override_requests = false ) const noexcept ;
49
- BT::NodeStatus updateState () override ;
50
+ ModuleStatus updateState () override ;
50
51
void updateData () override ;
51
52
BehaviorModuleOutput plan () override ;
52
53
BehaviorModuleOutput planWaitingApproval () override ;
53
54
CandidateOutput planCandidate () const override ;
54
55
void onEntry () override ;
55
56
void onExit () override ;
56
57
57
- void setParameters (const SideShiftParameters & parameters);
58
+ void setParameters (const std::shared_ptr<SideShiftParameters> & parameters);
59
+
60
+ void updateModuleParams (const std::shared_ptr<SideShiftParameters> & parameters)
61
+ {
62
+ parameters_ = parameters;
63
+ }
58
64
59
65
void acceptVisitor (
60
66
[[maybe_unused]] const std::shared_ptr<SceneModuleVisitor> & visitor) const override
@@ -66,7 +72,9 @@ class SideShiftModule : public SceneModuleInterface
66
72
67
73
void initVariables ();
68
74
75
+ #ifdef USE_OLD_ARCHITECTURE
69
76
void onLateralOffset (const LateralOffset::ConstSharedPtr lateral_offset_msg);
77
+ #endif
70
78
71
79
// non-const methods
72
80
void adjustDrivableArea (ShiftedPath * path) const ;
@@ -82,9 +90,10 @@ class SideShiftModule : public SceneModuleInterface
82
90
83
91
// member
84
92
PathWithLaneId refined_path_{};
85
- std::shared_ptr<PathWithLaneId> reference_path_{std::make_shared<PathWithLaneId>()};
93
+ PathWithLaneId reference_path_{};
94
+ PathWithLaneId prev_reference_{};
86
95
lanelet::ConstLanelets current_lanelets_;
87
- SideShiftParameters parameters_;
96
+ std::shared_ptr< SideShiftParameters> parameters_;
88
97
89
98
// Requested lateral offset to shift the reference path.
90
99
double requested_lateral_offset_{0.0 };
@@ -112,6 +121,7 @@ class SideShiftModule : public SceneModuleInterface
112
121
// NOTE: this function is ported from avoidance.
113
122
Pose getUnshiftedEgoPose (const ShiftedPath & prev_path) const ;
114
123
inline Pose getEgoPose () const { return planner_data_->self_odometry ->pose .pose ; }
124
+ PathWithLaneId extendBackwardLength (const PathWithLaneId & original_path) const ;
115
125
PathWithLaneId calcCenterLinePath (
116
126
const std::shared_ptr<const PlannerData> & planner_data, const Pose & pose) const ;
117
127
0 commit comments