Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync develop to master #270

Merged
merged 20 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1cc6d68
Update config files to point candidate images
SaikrishnaBairamoni Feb 9, 2024
d107b2b
fix dockerhub org name
SaikrishnaBairamoni Feb 9, 2024
8c8675d
Increase hardcoded acceleration limit for simulation (#265)
MishkaMN Mar 5, 2024
07e0577
Update Version to 4.5.0 (#266)
paulbourelly999 Apr 9, 2024
a4c819d
Merge release/lavida (4.5.0) branch into carma-master (#267)
MishkaMN Apr 9, 2024
b079096
Sync develop to master and remove ci/cd and build branch coupling
paulbourelly999 Apr 22, 2024
ab083d8
Merge branch 'carma-develop' into sync-develop-to-master
paulbourelly999 Apr 22, 2024
5d9f0e1
Add secret GH_PAT
paulbourelly999 Apr 22, 2024
217abaf
Update branch for github submodule
paulbourelly999 Apr 23, 2024
f5a532f
Use docker build kit argument
paulbourelly999 Apr 23, 2024
43161a2
Update to use stol feature branch actions which set docker build arg
paulbourelly999 Apr 23, 2024
acea202
Update URL
paulbourelly999 Apr 23, 2024
57b4123
Update to use path instead of default github context
paulbourelly999 Apr 23, 2024
d7d8283
Update to use path context instead of default git context
paulbourelly999 Apr 23, 2024
bfce6f8
Update checkout.bash script
paulbourelly999 Apr 23, 2024
8c3d7b1
Add jira issue numbers to TODO comments
paulbourelly999 Apr 23, 2024
3a1e559
Update checkout script to account for carma-master and carma-develop
paulbourelly999 Apr 23, 2024
1933cc3
Update
paulbourelly999 Apr 23, 2024
36735e5
Fix checkout script
paulbourelly999 Apr 23, 2024
9eac965
Update README badges and checkout script comment
paulbourelly999 Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ version: 2
# Run static code analyzer for SourceCloud
# Upload test results
# Every run command should start with source ${INIT_ENV} to ensure all default dependancies are available
# TODO (CAR-6022) Replace with GitHub action to remove branch coupling (develop/release-candidate/master)
jobs:
build:
# Pull docker image from docker hub
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
name: Docker build

on:
push:
branches-ignore:
- "carma-develop"
- "master"
- "release/*"
pull_request:
types: [opened, synchronize, reopened]

jobs:
docker:
runs-on: ubuntu-latest-8-cores
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v3
with:
context: .
uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main
with:
context: .
30 changes: 11 additions & 19 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,17 @@ name: Docker Hub build
on:
push:
branches:
- "carma-develop"
- "master"
- carma-develop
- carma-master
- "release/*"
tags:
- carma-system-*
jobs:
dockerhub:
runs-on: ubuntu-latest-8-cores
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: usdotfhwastoldev/${{ github.event.repository.name }}:develop
uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GH_PAT: ${{ secrets.GH_PAT }}
with:
context: .
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM usdotfhwastoldev/carma-base:develop AS base_image
ARG DOCKER_ORG=usdotfhwastoldev
ARG DOCKER_TAG=develop
FROM ${DOCKER_ORG}/carma-base:${DOCKER_TAG} as base_image

FROM base_image AS build

ARG GIT_BRANCH=develop
ARG ROS1_PACKAGES=""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since users will typically use the build-image.sh script directly, which calls this Dockerfile, do we want to update build-image.sh to take a git branch as an argument, and then pass it as a GIT_BRANCH arg into Dockerfile?

I suppose the same question can be asked for DOCKER_ORG and DOCKER_TAG as well.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or if this PR is only addressing the fix from an automated CI standpoint, we can create a separate story (or multiple) to fix it from a user standpoint.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they new arguments in the docker file will largely replace build-image.sh functionality that is responsible for setting org/tag for images.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am okay with merging this since that build-images.sh script needed manual edits to work correctly anyways (such as checkout scripts or Dockerfile edits).
I do agree we can create new story to modify pass in these arguments based on what build-script.sh sets the metada.

ENV ROS1_PACKAGES=${ROS1_PACKAGES}
ARG ROS2_PACKAGES=""
ENV ROS2_PACKAGES=${ROS2_PACKAGES}

COPY --chown=carma . /home/carma/autoware.ai
RUN /home/carma/autoware.ai/docker/checkout.bash
RUN /home/carma/autoware.ai/docker/checkout.bash -b ${GIT_BRANCH}
RUN ./home/carma/autoware.ai/docker/install.sh

FROM base_image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,19 @@ namespace hardcoded_params
namespace control_limits
{
/**
* The maximum allowable longitudinal velocity of the vehicle in m/s
* The maximum allowable longitudinal velocity of the vehicle in m/s
*/
constexpr double MAX_LONGITUDINAL_VELOCITY_MPS = 35.7632;
constexpr double MAX_LONGITUDINAL_ACCEL_MPS2 = 3.5;

/**
* The maximum allowable simulation parameters
* At the time of writing this, platform uses CARLA 0.9.10 as the vehicle's physics simulator.
* CARLA 0.9.10 uses below hardcoded value for its vehicles (so even if increasing this value,
* actual simulation won't support larger values unless forked and compiled)
* https://github.com/carla-simulator/ros-bridge/blob/0.9.10.1/carla_ackermann_control/src/carla_ackermann_control/carla_control_physics.py#L254
*/
constexpr double MAX_SIMULATION_LONGITUDINAL_ACCEL_MPS2 = 8.0;

}
} // namespace hardcoded_params
18 changes: 10 additions & 8 deletions core_planning/twist_filter/include/accel_limiter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
namespace twist_filter{

constexpr double MAX_LONGITUDINAL_ACCEL_HARDCODED_LIMIT_M_S_2 = hardcoded_params::control_limits::MAX_LONGITUDINAL_ACCEL_MPS2;
constexpr double MAX_SIMULATION_LONGITUDINAL_ACCEL_HARDCODED_LIMIT_M_S_2 = hardcoded_params::control_limits::MAX_SIMULATION_LONGITUDINAL_ACCEL_MPS2;


class LongitudinalAccelLimiter
{
public:
public:
/**
* Default constructor, not recommended for use.
*/
Expand All @@ -24,31 +26,31 @@ class LongitudinalAccelLimiter

/**
* \brief Constructor for LongitudinalAccelLimiter
*
*
* \param accel_limit The acceleration limit that should be enforced, in
* units of m/s/s
*/
LongitudinalAccelLimiter(double accel_limit):
_accel_limit(accel_limit),
_initialized(false),
_prev_v(0.0),
_prev_t(0.0) {};
_prev_t(0.0) {};

/**
* Limit the longitudinal acceleration found in the input ControlCommandStamped
*
*
* \param msg The message to be evaluated
* \return A copy of the message with the longitudinal accel limited
* \return A copy of the message with the longitudinal accel limited
* based on params or hardcoded limit
*/
autoware_msgs::msg::ControlCommandStamped
longitudinalAccelLimitCtrl(const autoware_msgs::msg::ControlCommandStamped& msg);

/**
* Limit the longitudinal acceleration found in the input TwistStamped
*
*
* \param msg The message to be evaluated
* \return A copy of the message with the longitudinal accel limited
* \return A copy of the message with the longitudinal accel limited
* based on params or hardcoded limit
*/
geometry_msgs::msg::TwistStamped
Expand All @@ -58,7 +60,7 @@ class LongitudinalAccelLimiter
double _accel_limit;
bool _initialized;
double _prev_v;
rclcpp::Time _prev_t;
rclcpp::Time _prev_t;
};

}
6 changes: 3 additions & 3 deletions core_planning/twist_filter/include/twist_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Modifications:
* - Added limiting for longitudinal velocity per CARMA specifications. Refactored
* namespacing and header as needed to support unit testing.
* - Kyle Rush
* - Kyle Rush
* - 9/11/2020
* - Refactored for ros2
* - 11/16/2022
Expand Down Expand Up @@ -75,12 +75,12 @@ class TwistFilter : public carma_ros2_utils::CarmaLifecycleNode
carma_ros2_utils::PubPtr<std_msgs::msg::Float32> ctrl_lacc_limit_debug_pub_, ctrl_ljerk_limit_debug_pub_;
carma_ros2_utils::PubPtr<std_msgs::msg::Float32> twist_lacc_result_pub_, twist_ljerk_result_pub_;
carma_ros2_utils::PubPtr<std_msgs::msg::Float32> ctrl_lacc_result_pub_, ctrl_ljerk_result_pub_;

//subscribers
carma_ros2_utils::SubPtr<geometry_msgs::msg::TwistStamped> twist_sub_;
carma_ros2_utils::SubPtr<autoware_msgs::msg::ControlCommandStamped> ctrl_sub_;
carma_ros2_utils::SubPtr<autoware_config_msgs::msg::ConfigTwistFilter> config_sub_;

//ros params
double wheel_base_;
double longitudinal_velocity_limit_;
Expand Down
33 changes: 25 additions & 8 deletions core_planning/twist_filter/src/twist_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Modifications:
* - Added limiting for longitudinal velocity per CARMA specifications. Refactored
* namespacing and header as needed to support unit testing.
* - Kyle Rush
* - Kyle Rush
* - 9/11/2020
*/

Expand Down Expand Up @@ -53,17 +53,34 @@ carma_ros2_utils::CallbackReturn TwistFilter::handle_on_configure(const rclcpp_l
// parameters on private handles
get_parameter<double>("config_speed_limit", longitudinal_velocity_limit_);
longitudinal_velocity_limit_ = longitudinal_velocity_limit_ * 0.44704;

get_parameter<double>("vehicle_acceleration_limit", longitudinal_accel_limit_);

bool use_sim_time = false;
get_parameter<bool>("use_sim_time", use_sim_time);

auto hardcoded_acceleration_limit = MAX_LONGITUDINAL_ACCEL_HARDCODED_LIMIT_M_S_2;

// if simulation
if (use_sim_time)
{
hardcoded_acceleration_limit = MAX_SIMULATION_LONGITUDINAL_ACCEL_HARDCODED_LIMIT_M_S_2;
RCLCPP_INFO_STREAM(get_logger(), "Simulation mode detected. Accounting for hardcoded limit, longitudinal acceleration limit used: " << hardcoded_acceleration_limit);
}
else
{
RCLCPP_INFO_STREAM(get_logger(), "Accounting for hardcoded limit, longitudinal acceleration limit used: " << hardcoded_acceleration_limit);
}

_lon_accel_limiter = LongitudinalAccelLimiter{
std::min(longitudinal_accel_limit_, MAX_LONGITUDINAL_ACCEL_HARDCODED_LIMIT_M_S_2)};
std::min(longitudinal_accel_limit_, hardcoded_acceleration_limit)};

get_parameter<double>("vehicle_lateral_accel_limit", lateral_accel_limit_);
get_parameter<double>("vehicle_lateral_jerk_limit", lateral_jerk_limit_);
get_parameter<double>("lowpass_gain_linear_x", lowpass_gain_linear_x_);
get_parameter<double>("lowpass_gain_angular_x", lowpass_gain_angular_z_);
get_parameter<double>("lowpass_gain_steering_angle", lowpass_gain_steering_angle_);


//Setup subscribers
twist_sub_ = create_subscription<geometry_msgs::msg::TwistStamped>("twist_raw", 1, std::bind(&TwistFilter::TwistCmdCallback, this, std_ph::_1));
Expand All @@ -73,7 +90,7 @@ carma_ros2_utils::CallbackReturn TwistFilter::handle_on_configure(const rclcpp_l
//Setup publishers
twist_pub_ = create_publisher<geometry_msgs::msg::TwistStamped>("twist_cmd", 5);
ctrl_pub_ = create_publisher<autoware_msgs::msg::ControlCommandStamped>("ctrl_cmd", 5);

// Publishers on private handles
twist_lacc_limit_debug_pub_ = create_publisher<std_msgs::msg::Float32>("~/limitation_debug/twist/lateral_accel", 5);
twist_ljerk_limit_debug_pub_ = create_publisher<std_msgs::msg::Float32>("~/limitation_debug/twist/lateral_jerk", 5);
Expand All @@ -83,7 +100,7 @@ carma_ros2_utils::CallbackReturn TwistFilter::handle_on_configure(const rclcpp_l
twist_ljerk_result_pub_ = create_publisher<std_msgs::msg::Float32>("~/result/twist/lateral_jerk", 5);
ctrl_lacc_result_pub_ = create_publisher<std_msgs::msg::Float32>("~/result/ctrl/lateral_accel", 5);
ctrl_ljerk_result_pub_ = create_publisher<std_msgs::msg::Float32>("~/result/ctrl/lateral_jerk", 5);


return CallbackReturn::SUCCESS;

Expand Down Expand Up @@ -413,4 +430,4 @@ void TwistFilter::CtrlCmdCallback(
#include "rclcpp_components/register_node_macro.hpp"

// Register the component with class_loader
RCLCPP_COMPONENTS_REGISTER_NODE(twist_filter::TwistFilter)
RCLCPP_COMPONENTS_REGISTER_NODE(twist_filter::TwistFilter)
28 changes: 14 additions & 14 deletions docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
set -exo pipefail

dir=~
BRANCH=develop
while [[ $# -gt 0 ]]; do
arg="$1"
case $arg in
-d|--develop)
BRANCH=develop
-b|--branch)
BRANCH=$2
shift
shift
;;
-r|--root)
Expand All @@ -31,18 +33,16 @@ while [[ $# -gt 0 ]]; do
;;
esac
done

cd ${dir}/autoware.ai

if [[ "$BRANCH" = "develop" ]]; then
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch $BRANCH
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch $BRANCH
git clone --depth=1 https://github.com/usdot-fhwa-stol/autoware.auto.git --branch $BRANCH
else
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch develop
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch develop
git clone --depth=1 https://github.com/usdot-fhwa-stol/autoware.auto.git --branch develop
# When brance is carma-develop or carma-master strip carma prefix
JonSmet marked this conversation as resolved.
Show resolved Hide resolved
if [[ "$BRANCH" == "carma-develop" ]]; then
BRANCH=develop
elif [[ "$BRANCH" == "carma-master"]] then
BRANCH=master
fi

cd ${dir}/autoware.ai
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch $BRANCH
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch $BRANCH
git clone --depth=1 https://github.com/usdot-fhwa-stol/autoware.auto.git --branch $BRANCH
# TODO(CAR-6023): Should this external dependencies be moved into install.sh
# Required to build pacmod_msgs
git clone https://github.com/astuff/astuff_sensor_msgs.git ${dir}/src/astuff_sensor_msgs -b 3.0.1
3 changes: 2 additions & 1 deletion jsk_common_msgs/.gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule ".travis"]
path = .travis
url = git://github.com/jsk-ros-pkg/jsk_travis
url = https://github.com/jsk-ros-pkg/jsk_travis.git
branch = 0.4.26
2 changes: 2 additions & 0 deletions jsk_recognition/.gitmodules
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[submodule "jsk_perception/slic"]
path = jsk_perception/slic
url = https://github.com/garaemon/SLIC-Superpixels.git
branch = master
[submodule ".travis"]
path = .travis
url = https://github.com/jsk-ros-pkg/jsk_travis.git
branch = 0.4.26
[submodule "jsk_perception/node_scripts/deep_sort/deep_sort"]
path = jsk_perception/node_scripts/deep_sort/deep_sort
url = https://github.com/nwojke/deep_sort.git
branch = master
Loading