Skip to content

Commit d62f23e

Browse files
author
Dhruv Tyagi
committed
Merge branch 'dhruv/move-cortex_msgs' into 'main'
Resolve "Move cortex_msgs" Closes #11 See merge request polymathrobotics/polymath_msgs!10
2 parents 8342743 + 83a98fb commit d62f23e

20 files changed

+266
-6
lines changed

CMakeLists.txt

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,36 @@ find_package(ament_cmake REQUIRED)
1010
find_package(rosidl_default_generators REQUIRED)
1111
find_package(std_msgs REQUIRED)
1212
find_package(geometry_msgs REQUIRED)
13+
find_package(builtin_interfaces REQUIRED)
14+
find_package(actionlib_msgs REQUIRED)
15+
find_package(action_msgs REQUIRED)
16+
find_package(geographic_msgs REQUIRED)
17+
find_package(nav_msgs REQUIRED)
18+
19+
set(dependencies
20+
std_msgs
21+
builtin_interfaces
22+
actionlib_msgs
23+
geometry_msgs
24+
nav_msgs
25+
geographic_msgs
26+
action_msgs
27+
)
1328

1429
rosidl_generate_interfaces(${PROJECT_NAME}
30+
"msg/Option.msg"
31+
"msg/KeyValue.msg"
32+
"msg/VehicleFeedback.msg"
33+
"msg/NavigationOptions.msg"
34+
"msg/VehicleCommand.msg"
35+
"msg/CortexStatus.msg"
36+
"msg/FlowCommand.msg"
37+
"msg/ReferenceTarget.msg"
38+
"msg/NavigationCommand.msg"
39+
"msg/NavigationFeedback.msg"
40+
"msg/CortexCommand.msg"
41+
"msg/CortexFeedback.msg"
42+
"msg/RouteNavGoal.msg"
1543
"msg/RouteNode.msg"
1644
"msg/RouteEdge.msg"
1745
"msg/Route.msg"
@@ -20,12 +48,13 @@ rosidl_generate_interfaces(${PROJECT_NAME}
2048
"srv/ModifyRouteEdge.srv"
2149
"srv/ListRouteGraphs.srv"
2250
"srv/ManageRouteGraph.srv"
23-
DEPENDENCIES std_msgs geometry_msgs
51+
"srv/CommandCortexFlow.srv"
52+
"srv/ModifyCortexQueue.srv"
53+
"srv/ListVehicleOptions.srv"
54+
"srv/ListPathLogicOptions.srv"
55+
"srv/ListReferenceTargets.srv"
56+
DEPENDENCIES ${dependencies}
2457
)
2558

26-
if(BUILD_TESTING)
27-
find_package(ament_lint_auto REQUIRED)
28-
ament_lint_auto_find_test_dependencies()
29-
endif()
30-
59+
install(DIRECTORY msg srv DESTINATION share/${PROJECT_NAME})
3160
ament_package()

msg/CortexCommand.msg

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Command Types (Enum)
2+
#
3+
# FLOW: Cortex logic flow commands such as PAUSE
4+
# NAVIGATION: Navigation commands that we will ask Nav2 to complete
5+
# VEHICLE: Commands that we will ask the HAL layer to complete
6+
uint8 FLOW=1
7+
uint8 NAVIGATION=2
8+
uint8 VEHICLE=3
9+
10+
# Command Type defines type of command to be applied
11+
# (See available options above)
12+
#
13+
# default: Undefined. Command will not do anything unless explicitly set.
14+
uint8 type
15+
16+
# Only command of type specified by "type" will be used. All others will be ignored.
17+
# Effectively implemented as a oneof
18+
19+
polymath_msgs/FlowCommand flow
20+
polymath_msgs/NavigationCommand navigation
21+
polymath_msgs/VehicleCommand vehicle

msg/CortexFeedback.msg

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# General Information
2+
builtin_interfaces/Time timestamp_utc
3+
4+
# Cortex Status
5+
polymath_msgs/CortexStatus cortex_status
6+
7+
# Navigation Feedback
8+
polymath_msgs/NavigationFeedback navigation_feedback
9+
10+
# Vehicle Feedback
11+
polymath_msgs/VehicleFeedback vehicle_feedback
12+
13+
# Current Pose converted back to GPS post Filters
14+
# Requires localization to be up to return useful data
15+
geographic_msgs/GeoPoseStamped current_pose
16+
17+
# Number in queue that is currently running
18+
uint32 current_command_index
19+
20+
# Number of commands remaining in the queue
21+
uint32 number_commands_remaining

msg/CortexStatus.msg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Cortex Status (Enum)
2+
#
3+
# STOPPED: Cortex in a STOPPED state
4+
# IDLE: Cortex waiting in idle
5+
# PAUSED: Cortex paused and waiting to resume or stop
6+
# NAVIGATION_EXECUTING: Cortex in Navigation Subtree
7+
# VEHICLE_EXECUTING: Cortex in Vehicle subtree
8+
uint8 STOPPED=0
9+
uint8 IDLE=1
10+
uint8 PAUSED=2
11+
uint8 NAVIGATION_EXECUTING=3
12+
uint8 VEHICLE_EXECUTING=4
13+
14+
# Cortex Current Status
15+
# (See available options above)
16+
uint8 status
17+
18+
# Additional description if needed on current state
19+
string description

msg/FlowCommand.msg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Cortex Control Commands (ENUM)
2+
# STOP terminates all commands, stops operations, and clears queues
3+
# PAUSE stores commands and stops operation. Can be resumed.
4+
# RESUME resumes from PAUSE
5+
uint8 STOP=0
6+
uint8 PAUSE=1
7+
uint8 RESUME=2
8+
9+
# Set cortex control command type for Cortex to implement
10+
# (See types above)
11+
uint8 command

msg/KeyValue.msg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# polymath_msgs/KeyValue
2+
string key
3+
string value

msg/NavigationCommand.msg

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Navigation Command Type (ENUM)
2+
#
3+
# GEO_PATH: Geo Path Command type
4+
# RELATIVE_PATH: Relative Path Command type
5+
# ROUTE_PATH: Route Navigation Path Command Type
6+
7+
uint8 GEO_PATH=0
8+
uint8 RELATIVE_PATH=1
9+
uint8 ROUTE_PATH=2
10+
11+
# Navigation Command Type
12+
# (See available options above)
13+
#
14+
# Default: GEOPATH
15+
uint8 type
16+
17+
polymath_msgs/NavigationOptions options
18+
19+
# Array of offsetted values to each pose
20+
# Orientation relative to goal_paths below
21+
# Should either be Length=1 OR Length=Length of Path
22+
geometry_msgs/PoseArray path_offsets
23+
24+
# ONEOF the following goal_paths:
25+
geographic_msgs/GeoPath geo_path
26+
27+
# Relative to current position at the time this path is initialized
28+
nav_msgs/Path relative_path
29+
30+
# For route server navigation
31+
polymath_msgs/RouteNavGoal route_path

msg/NavigationFeedback.msg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Nav2 Goal State
2+
action_msgs/GoalStatus nav2_goal_status
3+
4+
# Distance in meters
5+
float32 total_distance_remaining
6+
7+
# Current Target GeoPose
8+
geographic_msgs/GeoPoseStamped target_pose
9+
10+
# Final Target Geopose
11+
geographic_msgs/GeoPoseStamped final_pose
12+
13+
# Current Pose ID
14+
int16 current_pose_index
15+
16+
# Number of Poses remaining
17+
int16 number_of_poses_remaining
18+
19+
builtin_interfaces/Duration navigation_time
20+
builtin_interfaces/Duration estimated_time_remaining

msg/NavigationOptions.msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# option
2+
# This is a key-value-pair of path type and options. It will be parsed into a machine readable format for usage.
3+
# Call "GetNavigationOptions" to get supported options
4+
polymath_msgs/Option path_option

msg/Option.msg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# polymath_msgs/Action
2+
string name
3+
polymath_msgs/KeyValue[] params

0 commit comments

Comments
 (0)