Skip to content

Commit

Permalink
Merge pull request #192 from usdot-fhwa-stol/release/cabin
Browse files Browse the repository at this point in the history
Release/cabin
  • Loading branch information
kjrush committed Jul 29, 2022
2 parents 7ef4318 + a3970a1 commit 5988017
Show file tree
Hide file tree
Showing 27 changed files with 383 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
# Setup docker
docker:
- image: usdotfhwastol/carma-base:carma-system-4.1.0
- image: usdotfhwastol/carma-base:carma-system-4.2.0
user: carma
environment:
TERM: xterm # use xterm to get full display output from build
Expand Down
42 changes: 5 additions & 37 deletions Dockerfile
@@ -1,4 +1,4 @@
FROM usdotfhwastol/carma-base:carma-system-4.1.0 as base_image
FROM usdotfhwastol/carma-base:carma-system-4.2.0 as base_image
SHELL ["/bin/bash", "-c"]

ARG DEBIAN_FRONTEND="noninteractive"
Expand All @@ -13,42 +13,10 @@ LABEL org.label-schema.vcs-url="https://github.com/usdot-fhwa-stol/carma-msgs"
LABEL org.label-schema.vcs-ref=${VCS_REF}
LABEL org.label-schema.build-date=${BUILD_DATE}

# Clone autoware repo to access messages
RUN cd /home/carma/ && git clone https://github.com/usdot-fhwa-stol/autoware.ai.git --depth 1 --branch carma-system-4.1.0

# ROS 1 msgs setup
RUN mkdir -p ~/.base-image/ros1_msgs_ws/src/carma_msgs
RUN mkdir -p ~/.base-image/ros1_msgs_ws/src/carma_msgs
RUN mkdir -p /home/carma/src
COPY . /home/carma/.base-image/ros1_msgs_ws/src/carma_msgs/
RUN cp -R /home/carma/autoware.ai/messages /home/carma/.base-image/ros1_msgs_ws/src/autoware.ai/
RUN cp -R /home/carma/autoware.ai/jsk_common_msgs /home/carma/.base-image/ros1_msgs_ws/src/autoware.ai/
RUN cp -R /home/carma/autoware.ai/jsk_recognition /home/carma/.base-image/ros1_msgs_ws/src/autoware.ai/


# ROS 2 msgs setup
RUN mkdir -p ~/.base-image/ros2_msgs_ws/src/carma_msgs
RUN mkdir -p ~/.base-image/ros2_msgs_ws/src/carma_msgs
COPY . /home/carma/.base-image/ros2_msgs_ws/src/carma_msgs/
RUN mkdir -p ~/.base-image/ros2_msgs_ws/src/autoware.ai
RUN cp -R /home/carma/autoware.ai/messages /home/carma/.base-image/ros2_msgs_ws/src/autoware.ai/
RUN cp -R /home/carma/autoware.ai/jsk_common_msgs /home/carma/.base-image/ros2_msgs_ws/src/autoware.ai/
RUN cp -R /home/carma/autoware.ai/jsk_recognition /home/carma/.base-image/ros2_msgs_ws/src/autoware.ai/

# Cleanup autoware repo once messages have been moved
RUN rm -r /home/carma/autoware.ai/

# ROS1 message setup
RUN cd ~/.base-image/ros1_msgs_ws && source /opt/ros/noetic/setup.bash && colcon build --packages-up-to autoware_msgs cav_msgs cav_srvs j2735_msgs can_msgs carma_debug_msgs autoware_lanelet2_msgs

# ROS2 message setup
RUN cd ~/.base-image/ros2_msgs_ws && source /opt/ros/foxy/setup.bash && colcon build --packages-up-to autoware_msgs autoware_lanelet2_msgs can_msgs carma_debug_ros2_msgs carma_driver_msgs carma_localization_msgs carma_msgs carma_perception_msgs carma_planning_msgs carma_v2x_msgs j2735_v2x_msgs
RUN /home/carma/.base-image/ros1_msgs_ws/src/carma_msgs/docker/install.sh

# Build the bridge
RUN source /opt/ros/noetic/setup.bash \
&& source /opt/ros/foxy/setup.bash \
&& source ~/.base-image/ros1_msgs_ws/install/local_setup.bash \
&& source ~/.base-image/ros2_msgs_ws/install/local_setup.bash \
&& cd ~/.base-image/workspace/src \
&& git clone --depth 1 --branch carma-system-4.1.0 https://github.com/usdot-fhwa-stol/ros1_bridge.git \
&& cd ../ \
&& sudo apt-get update \
&& colcon build --packages-select ros1_bridge --cmake-args "--debug-output" \
&& sudo chmod -R ugo+x ~/.base-image/workspace/install
2 changes: 2 additions & 0 deletions carma_planning_msgs/CMakeLists.txt
Expand Up @@ -28,6 +28,7 @@ find_package(ament_cmake REQUIRED)
find_package(std_msgs REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(carma_v2x_msgs REQUIRED)

## Generate messages
file(GLOB msg_files msg/*.msg)
Expand All @@ -52,6 +53,7 @@ rosidl_generate_interfaces(
std_msgs
builtin_interfaces
geometry_msgs
carma_v2x_msgs
)

ament_export_dependencies(rosidl_default_runtime)
Expand Down
18 changes: 18 additions & 0 deletions carma_planning_msgs/msg/PlatooningInfo.msg
Expand Up @@ -42,3 +42,21 @@ float32 host_cmd_speed

# Desired gap with leader
float32 desired_gap

# Actual gap with leader
float32 actual_gap

# The time headway summation of all predecessors
float32 current_predecessor_time_headway_sum

# The speed of the preceding vehicle, in m/s.
float32 predecessor_speed

# The position of the preceding vehicle, in m.
float32 predecessor_position

# The status of gap creation.
bool is_create_gap

# Ratio to increase desired gap
float32 create_gap_adjuster
1 change: 1 addition & 0 deletions carma_planning_msgs/package.xml
Expand Up @@ -30,6 +30,7 @@
<depend>geometry_msgs</depend>
<depend>std_msgs</depend>
<depend>builtin_interfaces</depend>
<depend>carma_v2x_msgs</depend>

<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
Expand Down
10 changes: 10 additions & 0 deletions carma_planning_msgs/srv/SetActiveRoute.srv
Expand Up @@ -9,8 +9,18 @@
#

# Request
# Enumeration values for the method being used to provide the route destination points
uint8 choice

uint8 ROUTE_ID=0
uint8 DESTINATION_POINTS_ARRAY=1

# The id of the route to select
string route_id

# The array of destination points to be used for route generation
carma_v2x_msgs/Position3D[] destination_points

---
# Response
# An enumeration representing a service execution error as defined in the route design document.
Expand Down
18 changes: 18 additions & 0 deletions carma_v2x_msgs/msg/MobilityReason.msg
@@ -0,0 +1,18 @@
# MobilityReason.msg
#
#

# Variable which can be used to store a specific reason value.
uint8 reason

# enumeration values for mobility reason:

uint8 UNKNOWN=0
uint8 ACCEPTED=1
uint8 SAFETY_VIOLATION=2
uint8 INSUFFICIENT_TIME=3
uint8 PLAN_CONFLICT=4
uint8 OTHERWISE_ENGAGED=5
uint8 INSUFFICIENT_URGENCY=6
uint8 PLAN_UNCLEAR=7
uint8 OTHER=8
12 changes: 12 additions & 0 deletions carma_v2x_msgs/msg/MobilityRepeat.msg
@@ -0,0 +1,12 @@
# MobilityRepeat.msg
#
#

# Variable which can be used to store a specific repeat value.
uint8 repeat

# enumeration values for mobility repeat:

uint8 UNKNOWN=0
uint8 REQUEST_AGAIN=1
uint8 NEVER_REQUEST_AGAIN=2
15 changes: 12 additions & 3 deletions carma_v2x_msgs/msg/MobilityResponse.msg
Expand Up @@ -4,10 +4,19 @@
# recevied a MobilityRequest from that CAV and decide to involve in that plan

# standard header for all mobility messages
carma_v2x_msgs/MobilityHeader m_header
carma_v2x_msgs/MobilityHeader m_header

# urgency of the current plan from 0 to 1000
uint16 urgency
uint16 urgency

# the content of this response
bool is_accepted
bool is_accepted

# type of the proposal being suggested to neighbors
carma_v2x_msgs/PlanType plan_type

#
carma_v2x_msgs/MobilityReason reason # OPTIONAL

# Whether or not to repeat the MobilityRequest
carma_v2x_msgs/MobilityRepeat repeat # OPTIONAL
13 changes: 13 additions & 0 deletions carma_v2x_msgs/msg/PlanType.msg
Expand Up @@ -12,6 +12,16 @@ uint8 CHANGE_LANE_LEFT = 1
uint8 CHANGE_LANE_RIGHT = 2
uint8 JOIN_PLATOON_AT_REAR = 3
uint8 PLATOON_FOLLOWER_JOIN = 4
uint8 JOIN_PLATOON_FROM_FRONT = 5
uint8 PLATOON_FRONT_JOIN = 6
uint8 CUT_IN_FROM_SIDE = 7
uint8 PLATOON_CUT_IN_JOIN = 8
uint8 STOP_CREATE_GAP = 9
uint8 CUT_IN_FRONT_DONE = 10
uint8 CUT_IN_MID_OR_REAR_DONE = 11
uint8 PLATOON_DEPARTURE = 12
uint8 DELETE_MEMBER = 13


# ideas for future additions:
# uint8 SEARCHING_FOR_PLATOON = 5
Expand All @@ -21,3 +31,6 @@ uint8 PLATOON_FOLLOWER_JOIN = 4
# uint8 PASSING = 9
# pulling onto shoulder, need multi-lane change
# join platoon in middle, merging platoons
# MobilityPlanType.msg
#
#
43 changes: 25 additions & 18 deletions carma_v2x_msgs/msg/TrafficControlDetail.msg
Expand Up @@ -24,15 +24,17 @@
# lataffinity ENUMERATED {left, right},
# latperm SEQUENCE (SIZE(2)) OF ENUMERATED {none, permitted, passing-only, emergency-only},
# parking ENUMERATED {no, parallel, angled},
# minspeed INTEGER (0..1023), -- tenths of m/s
# maxspeed INTEGER (0..1023), -- tenths of m/s
# minhdwy INTEGER (0..2047), -- tenths of meters
# maxvehmass INTEGER (0..65535), -- kg
# maxvehheight INTEGER (0..127), -- tenths of meters
# maxvehwidth INTEGER (0..127), -- tenths of meters
# maxvehlength INTEGER (0..1023), -- tenths of meters
# maxvehaxles INTEGER (2..15),
# minvehocc INTEGER (1..15),
# minspeed DOUBLE (0..1023), -- m/s
# maxspeed DOUBLE (0..1023), -- m/s
# minhdwy DOUBLE (0..2047), -- meters
# maxvehmass DOUBLE (0..65535), -- kg
# maxvehheight DOUBLE (0..127), -- meters
# maxvehwidth DOUBLE (0..127), -- meters
# maxvehlength DOUBLE (0..1023), -- meters
# maxvehaxles INTEGER (2..15), -- number of axles
# minvehocc INTEGER (1..15), -- vehicle passenger count
# maxplatoonsize INTEGER (1..63), -- vehicle count
# minplatoonhdwy DOUBLE (0..2047), -- meters
# ...
#}

Expand Down Expand Up @@ -61,6 +63,8 @@ uint8 MAXVEHWIDTH_CHOICE=16
uint8 MAXVEHLENGTH_CHOICE=17
uint8 MAXVEHAXLES_CHOICE=18
uint8 MINVEHOCC_CHOICE=19
uint8 MAXPLATOONSIZE_CHOICE=20
uint8 MINPLATOONHDWY_CHOICE=21

# signal ::= OCTET STRING SIZE(0..63)
uint8[] signal
Expand Down Expand Up @@ -142,32 +146,35 @@ uint8 PARALLEL=1

uint8 ANGLED=2

#minspeed ::= INTEGER (0..1023), -- tenths of m/s
#minspeed ::= INTEGER (0..1023), -- m/s
float64 minspeed

#maxspeed ::= INTEGER (0..1023), -- tenths of m/s
#maxspeed ::= INTEGER (0..1023), -- m/s
float64 maxspeed

#minhdwy ::= INTEGER (0..2047), -- tenths of meters
#minhdwy ::= INTEGER (0..2047), -- meters
float64 minhdwy

#maxvehmass ::= INTEGER (0..65535), -- kg
float64 maxvehmass

#maxvehheight ::= INTEGER (0..127), -- tenths of meters
#maxvehheight ::= INTEGER (0..127), -- meters
float64 maxvehheight

#maxvehwidth ::= INTEGER (0..127), -- tenths of meters
#maxvehwidth ::= INTEGER (0..127), -- meters
float64 maxvehwidth

#maxvehlength ::= INTEGER (0..1023), -- tenths of meters
#maxvehlength ::= INTEGER (0..1023), -- meters
float64 maxvehlength

#maxvehaxles ::= INTEGER (2..15)
#maxvehaxles ::= INTEGER (2..15), -- number of axles
uint8 maxvehaxles

#minvehocc ::= INTEGER (1..15)
#minvehocc ::= INTEGER (1..15), -- vehicle passenger count
uint8 minvehocc

#maxplatoonsize ::= INTEGER (1..63), -- vehicle count
uint8 maxplatoonsize


#minplatoonhdwy ::= INTEGER (0..2047), -- meters
float64 minplatoonhdwy
1 change: 0 additions & 1 deletion cav_msgs/msg/MobilityHeader.msg
Expand Up @@ -24,4 +24,3 @@ string plan_id
# A UNIX timestamp in milliseconds, which indicates the time elapsed since UNIX epoch
# Example: "9223372036854775807"
uint64 timestamp

1 change: 0 additions & 1 deletion cav_msgs/msg/MobilityOperation.msg
Expand Up @@ -12,4 +12,3 @@ string strategy
# strategy parameters specified by each individual plugin/component
# the maximum length of this string is 100
string strategy_params

18 changes: 18 additions & 0 deletions cav_msgs/msg/MobilityReason.msg
@@ -0,0 +1,18 @@
# MobilityReason.msg
#
#

# Variable which can be used to store a specific reason value.
uint8 reason

# enumeration values for mobility reason:

uint8 UNKNOWN=0
uint8 ACCEPTED=1
uint8 SAFETY_VIOLATION=2
uint8 INSUFFICIENT_TIME=3
uint8 PLAN_CONFLICT=4
uint8 OTHERWISE_ENGAGED=5
uint8 INSUFFICIENT_URGENCY=6
uint8 PLAN_UNCLEAR=7
uint8 OTHER=8
12 changes: 12 additions & 0 deletions cav_msgs/msg/MobilityRepeat.msg
@@ -0,0 +1,12 @@
# MobilityRepeat.msg
#
#

# Variable which can be used to store a specific repeat value.
uint8 repeat

# enumeration values for mobility repeat:

uint8 UNKNOWN=0
uint8 REQUEST_AGAIN=1
uint8 NEVER_REQUEST_AGAIN=2
15 changes: 12 additions & 3 deletions cav_msgs/msg/MobilityResponse.msg
Expand Up @@ -4,10 +4,19 @@
# recevied a MobilityRequest from that CAV and decide to involve in that plan

# standard header for all mobility messages
cav_msgs/MobilityHeader m_header
cav_msgs/MobilityHeader m_header

# urgency of the current plan from 0 to 1000
uint16 urgency
uint16 urgency

# the content of this response
bool is_accepted
bool is_accepted

# type of the proposal being suggested to neighbors
cav_msgs/PlanType plan_type

#
cav_msgs/MobilityReason reason # OPTIONAL

# Whether or not to repeat the MobilityRequest
cav_msgs/MobilityRepeat repeat # OPTIONAL
13 changes: 13 additions & 0 deletions cav_msgs/msg/PlanType.msg
Expand Up @@ -12,6 +12,16 @@ uint8 CHANGE_LANE_LEFT = 1
uint8 CHANGE_LANE_RIGHT = 2
uint8 JOIN_PLATOON_AT_REAR = 3
uint8 PLATOON_FOLLOWER_JOIN = 4
uint8 JOIN_PLATOON_FROM_FRONT = 5
uint8 PLATOON_FRONT_JOIN = 6
uint8 CUT_IN_FROM_SIDE = 7
uint8 PLATOON_CUT_IN_JOIN = 8
uint8 STOP_CREATE_GAP = 9
uint8 CUT_IN_FRONT_DONE = 10
uint8 CUT_IN_MID_OR_REAR_DONE = 11
uint8 PLATOON_DEPARTURE = 12
uint8 DELETE_MEMBER = 13


# ideas for future additions:
# uint8 SEARCHING_FOR_PLATOON = 5
Expand All @@ -21,3 +31,6 @@ uint8 PLATOON_FOLLOWER_JOIN = 4
# uint8 PASSING = 9
# pulling onto shoulder, need multi-lane change
# join platoon in middle, merging platoons
# MobilityPlanType.msg
#
#

0 comments on commit 5988017

Please sign in to comment.