-
Notifications
You must be signed in to change notification settings - Fork 682
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
feat: add publisher for detailed stop reason #723
Changes from all commits
1146124
c8ecd24
4bbccc4
13bf8cc
5972591
2b88cd5
cdcec89
984855b
f4022b6
acaa066
6214c5e
be17996
47601b4
4901bf1
64aa005
414bbf2
c9e11e8
ebd9f12
21643d8
b9bea9a
3029a8b
4698bf7
3ceee9b
de5f8cc
8d3241d
c5d52d7
dba41e3
da7b4d6
b3cd94f
f407561
6007892
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# constants for reason | ||
uint16 INTERSECTION=1 | ||
uint16 MERGE_FROM_PRIVATE_ROAD=2 | ||
uint16 CROSSWALK=3 | ||
uint16 WALKWAY=4 | ||
uint16 STOP_LINE=5 | ||
uint16 DETECTION_AREA=6 | ||
uint16 NO_STOPPING_AREA=7 | ||
uint16 TRAFFIC_LIGHT=8 | ||
uint16 OBSTACLE_STOP=9 | ||
uint16 SURROUND_OBSTACLE_CHECK=10 | ||
uint16 BLIND_SPOT=11 | ||
uint16 BLOCKED_BY_OBSTACLE=12 | ||
uint16 STOPPING_LANE_CHANGE=13 | ||
uint16 REMOTE_EMERGENCY_STOP=14 | ||
uint16 VIRTUAL_TRAFFIC_LIGHT=15 | ||
|
||
# constants for status | ||
uint16 STOP_FALSE=1 | ||
uint16 STOP_TRUE=2 | ||
|
||
# variables | ||
geometry_msgs/Pose pose | ||
float32 distance | ||
uint16 reason | ||
uint16 status | ||
string detail |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
std_msgs/Header header | ||
autoware_ad_api_msgs/MotionFactor[] motion_factors |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,8 @@ class StopLineModule : public SceneModuleInterface | |
|
||
bool modifyPathVelocity( | ||
autoware_auto_planning_msgs::msg::PathWithLaneId * path, | ||
tier4_planning_msgs::msg::StopReason * stop_reason) override; | ||
tier4_planning_msgs::msg::StopReason * stop_reason, | ||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor) override; | ||
|
||
visualization_msgs::msg::MarkerArray createDebugMarkerArray() override; | ||
visualization_msgs::msg::MarkerArray createVirtualWallMarkerArray() override; | ||
|
@@ -109,7 +110,8 @@ class StopLineModule : public SceneModuleInterface | |
autoware_auto_planning_msgs::msg::PathWithLaneId insertStopPose( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
const autoware_auto_planning_msgs::msg::PathWithLaneId & path, | ||
const StopLineModule::SegmentIndexWithPose & insert_index_with_pose, | ||
tier4_planning_msgs::msg::StopReason * stop_reason); | ||
tier4_planning_msgs::msg::StopReason * stop_reason, | ||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor); | ||
|
||
lanelet::ConstLineString3d stop_line_; | ||
int64_t lane_id_; | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -72,7 +72,8 @@ class TrafficLightModule : public SceneModuleInterface | |||||
|
||||||
bool modifyPathVelocity( | ||||||
autoware_auto_planning_msgs::msg::PathWithLaneId * path, | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason) override; | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason, | ||||||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor) override; | ||||||
|
||||||
visualization_msgs::msg::MarkerArray createDebugMarkerArray() override; | ||||||
visualization_msgs::msg::MarkerArray createVirtualWallMarkerArray() override; | ||||||
|
@@ -98,7 +99,8 @@ class TrafficLightModule : public SceneModuleInterface | |||||
autoware_auto_planning_msgs::msg::PathWithLaneId insertStopPose( | ||||||
const autoware_auto_planning_msgs::msg::PathWithLaneId & input, | ||||||
const size_t & insert_target_point_idx, const Eigen::Vector2d & target_point, | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason); | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason, | ||||||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor); | ||||||
|
||||||
bool isPassthrough(const double & signed_arc_length) const; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -80,7 +80,8 @@ class VirtualTrafficLightModule : public SceneModuleInterface | |||||
|
||||||
bool modifyPathVelocity( | ||||||
autoware_auto_planning_msgs::msg::PathWithLaneId * path, | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason) override; | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason, | ||||||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor) override; | ||||||
|
||||||
visualization_msgs::msg::MarkerArray createDebugMarkerArray() override; | ||||||
visualization_msgs::msg::MarkerArray createVirtualWallMarkerArray() override; | ||||||
|
@@ -100,6 +101,10 @@ class VirtualTrafficLightModule : public SceneModuleInterface | |||||
void setStopReason( | ||||||
const geometry_msgs::msg::Pose & stop_pose, tier4_planning_msgs::msg::StopReason * stop_reason); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
void setMotionFactor( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
const geometry_msgs::msg::Pose & stop_pose, | ||||||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor); | ||||||
|
||||||
bool isBeforeStartLine(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
bool isBeforeStopLine(); | ||||||
|
@@ -116,11 +121,13 @@ class VirtualTrafficLightModule : public SceneModuleInterface | |||||
|
||||||
void insertStopVelocityAtStopLine( | ||||||
autoware_auto_planning_msgs::msg::PathWithLaneId * path, | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason); | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason, | ||||||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor); | ||||||
|
||||||
void insertStopVelocityAtEndLine( | ||||||
autoware_auto_planning_msgs::msg::PathWithLaneId * path, | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason); | ||||||
tier4_planning_msgs::msg::StopReason * stop_reason, | ||||||
autoware_ad_api_msgs::msg::MotionFactor * motion_factor); | ||||||
}; | ||||||
} // namespace behavior_velocity_planner | ||||||
#endif // SCENE_MODULE__VIRTUAL_TRAFFIC_LIGHT__SCENE_HPP_ |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,6 +20,7 @@ | |||||
#include <tier4_autoware_utils/trajectory/trajectory.hpp> | ||||||
#include <utilization/boost_geometry_helper.hpp> | ||||||
|
||||||
#include <autoware_ad_api_msgs/msg/motion_factor.hpp> | ||||||
#include <autoware_auto_perception_msgs/msg/predicted_object.hpp> | ||||||
#include <autoware_auto_perception_msgs/msg/predicted_objects.hpp> | ||||||
#include <autoware_auto_planning_msgs/msg/path.hpp> | ||||||
|
@@ -280,6 +281,7 @@ double findReachTime( | |||||
const double t_min, const double t_max); | ||||||
|
||||||
tier4_planning_msgs::msg::StopReason initializeStopReason(const std::string & stop_reason); | ||||||
autoware_ad_api_msgs::msg::MotionFactor initializeMotionFactor(const uint16_t stop_reason); | ||||||
|
||||||
void appendStopReason( | ||||||
const tier4_planning_msgs::msg::StopFactor stop_factor, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
empty
method should be used to check for emptiness instead of comparing to an empty object