Skip to content

Commit

Permalink
Merge pull request #515 from una-auxme/511-feature-create-new-message…
Browse files Browse the repository at this point in the history
…-type-for-trajectory-messages

Added new message types Trajectory and Navigation Point.
  • Loading branch information
THDThieleT authored Nov 27, 2024
2 parents 248f380 + 5c37dfc commit 0a8c40e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
22 changes: 15 additions & 7 deletions code/planning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ project(planning)
find_package(catkin REQUIRED COMPONENTS
perception
rospy
rosout
roslaunch
std_msgs
geometry_msgs
message_generation
)

roslaunch_add_file_check(launch)
Expand Down Expand Up @@ -48,9 +51,11 @@ catkin_python_setup()
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
# add_message_files(
# MinDistance.msg
# )
add_message_files(
FILES
NavigationPoint.msg
Trajectory.msg
)

## Generate services in the 'srv' folder
# add_service_files(
Expand All @@ -67,9 +72,12 @@ catkin_python_setup()
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
# perception
# )
generate_messages(
DEPENDENCIES
std_msgs
perception
geometry_msgs
)

################################################
## Declare ROS dynamic reconfigure parameters ##
Expand Down Expand Up @@ -105,7 +113,7 @@ catkin_package(
# LIBRARIES planning
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
CATKIN_DEPENDS perception rospy
CATKIN_DEPENDS perception rospy message_runtime
)

###########
Expand Down
3 changes: 3 additions & 0 deletions code/planning/msg/NavigationPoint.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
geometry_msgs/Point position
float32 speed
uint8 behaviour
2 changes: 2 additions & 0 deletions code/planning/msg/Trajectory.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Header header
planning/NavigationPoint[] navigationPoints
4 changes: 4 additions & 0 deletions code/planning/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<!-- <test_depend>gtest</test_depend> -->
<!-- Use doc_depend for packages you need only for building documentation: -->
<!-- <doc_depend>doxygen</doc_depend> -->
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>

<build_depend>rospy</build_depend>
<build_depend>roslaunch</build_depend>

Expand All @@ -57,6 +60,7 @@
<exec_depend>carla_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>perception</exec_depend>

<build_depend>perception</build_depend>
Expand Down
8 changes: 8 additions & 0 deletions code/planning/src/BehaviourEnum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from enum import IntEnum

# getattr(Behaviour, "name").value returns the ID
# Behaviour(id) returns Behaviour.NAME


class BehaviourEnum(IntEnum):
CRUISING = 0

0 comments on commit 0a8c40e

Please sign in to comment.