diff --git a/code/planning/CMakeLists.txt b/code/planning/CMakeLists.txt
index 34c3ccd0..c6288e03 100755
--- a/code/planning/CMakeLists.txt
+++ b/code/planning/CMakeLists.txt
@@ -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)
@@ -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(
@@ -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 ##
@@ -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
)
###########
diff --git a/code/planning/msg/NavigationPoint.msg b/code/planning/msg/NavigationPoint.msg
new file mode 100644
index 00000000..e9eb53c9
--- /dev/null
+++ b/code/planning/msg/NavigationPoint.msg
@@ -0,0 +1,3 @@
+geometry_msgs/Point position
+float32 speed
+uint8 behaviour
\ No newline at end of file
diff --git a/code/planning/msg/Trajectory.msg b/code/planning/msg/Trajectory.msg
new file mode 100644
index 00000000..94060cdd
--- /dev/null
+++ b/code/planning/msg/Trajectory.msg
@@ -0,0 +1,2 @@
+Header header
+planning/NavigationPoint[] navigationPoints
\ No newline at end of file
diff --git a/code/planning/package.xml b/code/planning/package.xml
index a321a109..daf36bc6 100755
--- a/code/planning/package.xml
+++ b/code/planning/package.xml
@@ -47,6 +47,9 @@
+ message_generation
+ message_runtime
+
rospy
roslaunch
@@ -57,6 +60,7 @@
carla_msgs
sensor_msgs
std_msgs
+ geometry_msgs
perception
perception
diff --git a/code/planning/src/BehaviourEnum.py b/code/planning/src/BehaviourEnum.py
new file mode 100644
index 00000000..361b0b43
--- /dev/null
+++ b/code/planning/src/BehaviourEnum.py
@@ -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