Skip to content

Commit

Permalink
feat(tier4_planning_msgs): add new msgs to analyze ego behavior (#155)
Browse files Browse the repository at this point in the history
* feat: add ControlPoint.msg

Signed-off-by: satoshi-ota <[email protected]>

* feat: add SafetyFactor.msg

Signed-off-by: satoshi-ota <[email protected]>

* feat: add SafetyFactorArray.msg

Signed-off-by: satoshi-ota <[email protected]>

* feat: add PlanningFactor.msg

Signed-off-by: satoshi-ota <[email protected]>

* feat: add PlanningFactorArray.msg

Signed-off-by: satoshi-ota <[email protected]>

* feat: build new msgs

Signed-off-by: satoshi-ota <[email protected]>

* fix: integrate lat/lon

Signed-off-by: satoshi-ota <[email protected]>

* fix: remove redundancy

Signed-off-by: satoshi-ota <[email protected]>

* Apply suggestions from code review

---------

Signed-off-by: satoshi-ota <[email protected]>
Co-authored-by: Mamoru Sobue <[email protected]>
  • Loading branch information
satoshi-ota and soblin authored Dec 13, 2024
1 parent 08da64e commit be1e368
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tier4_planning_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"msg/AvoidanceDebugFactor.msg"
"msg/AvoidanceDebugMsg.msg"
"msg/AvoidanceDebugMsgArray.msg"
"msg/ControlPoint.msg"
"msg/EnableAvoidance.msg"
"msg/ExpandStopRange.msg"
"msg/IsAvoidancePossible.msg"
Expand All @@ -34,8 +35,12 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"msg/PathPoint.msg"
"msg/PathPointWithLaneId.msg"
"msg/PathWithLaneId.msg"
"msg/PlanningFactor.msg"
"msg/PlanningFactorArray.msg"
"msg/RerouteAvailability.msg"
"msg/RouteState.msg"
"msg/SafetyFactor.msg"
"msg/SafetyFactorArray.msg"
"msg/Scenario.msg"
"msg/StopFactor.msg"
"msg/StopReason.msg"
Expand All @@ -52,6 +57,7 @@ rosidl_generate_interfaces(${PROJECT_NAME}
DEPENDENCIES
autoware_common_msgs
autoware_planning_msgs
autoware_perception_msgs
builtin_interfaces
geometry_msgs
nav_msgs
Expand Down
4 changes: 4 additions & 0 deletions tier4_planning_msgs/msg/ControlPoint.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
geometry_msgs/Pose pose
float32 velocity
float32 shift_length
float32 distance
20 changes: 20 additions & 0 deletions tier4_planning_msgs/msg/PlanningFactor.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# constants for behavior
uint16 UNKNOWN = 0
uint16 NONE = 1
uint16 SLOW_DOWN = 2
uint16 STOP = 3
uint16 LEFT_SHIFT = 4
uint16 RIGHT_SHIFT = 5

# variables
string module

bool is_driving_forward

tier4_planning_msgs/ControlPoint[] control_points

uint16 behavior

string detail

tier4_planning_msgs/SafetyFactorArray safety_factors
2 changes: 2 additions & 0 deletions tier4_planning_msgs/msg/PlanningFactorArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
std_msgs/Header header
tier4_planning_msgs/PlanningFactor[] factors
27 changes: 27 additions & 0 deletions tier4_planning_msgs/msg/SafetyFactor.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# constants for common use
uint16 UNKNOWN = 0

# constants for factor type
uint16 POINTCLOUD = 1
uint16 OBJECT = 2

# variables
uint16 type

# use only for predicted objects
unique_identifier_msgs/UUID object_id

# use only for predicted objects
autoware_perception_msgs/PredictedPath predicted_path

# time to collision in relative to the header time
float32 ttc_begin

float32 ttc_end

# type == POINTCLOUD: the position of the each points
# type == OBJECT: the object position
geometry_msgs/Point[] points

# module's primitive judgement of the safety for its decision
bool is_safe
4 changes: 4 additions & 0 deletions tier4_planning_msgs/msg/SafetyFactorArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
std_msgs/Header header
tier4_planning_msgs/SafetyFactor[] factors
bool is_safe
string detail
1 change: 1 addition & 0 deletions tier4_planning_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<build_depend>rosidl_default_generators</build_depend>

<depend>autoware_common_msgs</depend>
<depend>autoware_perception_msgs</depend>
<depend>autoware_planning_msgs</depend>
<depend>builtin_interfaces</depend>
<depend>geometry_msgs</depend>
Expand Down

0 comments on commit be1e368

Please sign in to comment.