Skip to content

Commit

Permalink
Drop support for galactic (#594)
Browse files Browse the repository at this point in the history
* Drop support for galactic

* Add changelog entry
  • Loading branch information
ad-daniel authored Jan 11, 2023
1 parent 0bbc8ac commit 8787e22
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
ROS_REPO: [main, testing]
ROS_DISTRO: [foxy, galactic, humble, rolling]
ROS_DISTRO: [foxy, humble, rolling]
runs-on: ubuntu-latest
env:
AFTER_INIT: ./scripts/ci_after_init.bash ${ROS_DISTRO} ${ROS_REPO}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
ROS_REPO: [main, testing]
ROS_DISTRO: [foxy, galactic, humble, rolling]
ROS_DISTRO: [foxy, humble, rolling]
runs-on: ubuntu-latest
env:
AFTER_INIT: ./scripts/ci_after_init.bash ${ROS_DISTRO} ${ROS_REPO}
Expand Down
5 changes: 2 additions & 3 deletions scripts/ci_after_init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ if [[ $(lsb_release -rs) == "22.04" && ${WEBOTS_RELEASE_VERSION} == "2022a" ]];
mv /tmp/openssl-1.1/* /usr/local/webots/lib/webots/
fi

# The following packages are only available in the ROS 2 Foxy/Galactic distributions. Therefore, we cannot include them in the package.xml, but we have to install them manually here.

if [[ "${ROS_DISTRO}" == "foxy" || "${ROS_DISTRO}" == "galactic" ]]; then
# The following packages are only available in the ROS 2 Foxy distribution. Therefore, we cannot include them in the package.xml, but we have to install them manually here.
if [[ "${ROS_DISTRO}" == "foxy" ]]; then
apt install -y ros-${ROS_DISTRO}-turtlebot3-cartographer ros-${ROS_DISTRO}-turtlebot3-navigation2
fi

Expand Down
4 changes: 4 additions & 0 deletions webots_ros2/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package webots_ros2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2023.0.2 (2023-XX-XX)
------------------
* Drop support for Galactic.

2023.0.1 (2023-01-05)
------------------
* Fixed relative assets in WSL.
Expand Down
2 changes: 0 additions & 2 deletions webots_ros2_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ project(webots_ros2_control)
# Check which ROS distribution is used, ros2control depends of that
if($ENV{ROS_DISTRO} MATCHES "foxy")
add_compile_definitions(FOXY)
elseif($ENV{ROS_DISTRO} MATCHES "galactic")
add_compile_definitions(GALACTIC)
elseif($ENV{ROS_DISTRO} MATCHES "humble")
add_compile_definitions(HUMBLE)
elseif($ENV{ROS_DISTRO} MATCHES "rolling")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace webots_ros2_control

std::vector<hardware_interface::StateInterface> export_state_interfaces() override;
std::vector<hardware_interface::CommandInterface> export_command_interfaces() override;
#if FOXY || GALACTIC
#if FOXY
hardware_interface::return_type read() override;
hardware_interface::return_type write() override;
#else // HUMBLE, ROLLING
Expand Down
4 changes: 2 additions & 2 deletions webots_ros2_control/src/Ros2Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace webots_ros2_control
const rclcpp::Duration dt = rclcpp::Duration::from_seconds(mControlPeriodMs / 1000.0);
if (periodMs >= mControlPeriodMs)
{
#if FOXY || GALACTIC
#if FOXY
mControllerManager->read();
#else
mControllerManager->read(mNode->get_clock()->now(), dt);
Expand All @@ -55,7 +55,7 @@ namespace webots_ros2_control
mLastControlUpdateMs = nowMs;
#endif

#if FOXY || GALACTIC
#if FOXY
mControllerManager->write();
#else // HUMBLE, ROLLING
mControllerManager->write(mNode->get_clock()->now(), dt);
Expand Down
8 changes: 4 additions & 4 deletions webots_ros2_control/src/Ros2ControlSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ namespace webots_ros2_control
WbDeviceTag device = wb_robot_get_device(joint.name.c_str());
WbNodeType type = wb_device_get_node_type(device);
joint.motor = (type == WB_NODE_LINEAR_MOTOR || type == WB_NODE_ROTATIONAL_MOTOR) ? device : wb_position_sensor_get_motor(device);
device = (component.parameters.count("sensor") == 0) ?
wb_robot_get_device(joint.name.c_str()) :
device = (component.parameters.count("sensor") == 0) ?
wb_robot_get_device(joint.name.c_str()) :
wb_robot_get_device(component.parameters.at("sensor").c_str());
type = wb_device_get_node_type(device);
joint.sensor = (type == WB_NODE_POSITION_SENSOR) ? device : wb_motor_get_position_sensor(device);
Expand Down Expand Up @@ -158,7 +158,7 @@ namespace webots_ros2_control
}
#endif

#if FOXY || GALACTIC
#if FOXY
hardware_interface::return_type Ros2ControlSystem::read()
#else // HUMBLE, ROLLING
hardware_interface::return_type Ros2ControlSystem::read(const rclcpp::Time &/*time*/, const rclcpp::Duration &/*period*/)
Expand All @@ -185,7 +185,7 @@ namespace webots_ros2_control
return hardware_interface::return_type::OK;
}

#if FOXY || GALACTIC
#if FOXY
hardware_interface::return_type Ros2ControlSystem::write()
#else // HUMBLE, ROLLING
hardware_interface::return_type Ros2ControlSystem::write(const rclcpp::Time &/*time*/, const rclcpp::Duration &/*period*/)
Expand Down
8 changes: 1 addition & 7 deletions webots_ros2_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ if($ENV{ROS_DISTRO} MATCHES "foxy")
add_compile_definitions(FOXY)
endif()

if($ENV{ROS_DISTRO} MATCHES "galactic")
add_compile_definitions(GALACTIC)
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)

# Check which ROS distribution is used, vision_msgs depends of that
if($ENV{ROS_DISTRO} MATCHES "foxy")
add_compile_definitions(FOXY)
elseif($ENV{ROS_DISTRO} MATCHES "galactic")
add_compile_definitions(GALACTIC)
elseif($ENV{ROS_DISTRO} MATCHES "humble")
add_compile_definitions(HUMBLE)
elseif($ENV{ROS_DISTRO} MATCHES "rolling")
Expand All @@ -40,7 +34,7 @@ find_package(webots_ros2_msgs REQUIRED)
find_package(tinyxml2_vendor REQUIRED)
find_package(TinyXML2 REQUIRED)

if($ENV{ROS_DISTRO} MATCHES "foxy" OR $ENV{ROS_DISTRO} MATCHES "galactic")
if($ENV{ROS_DISTRO} MATCHES "foxy")
find_package(PythonLibs 3.8 EXACT REQUIRED)
else()
find_package(PythonLibs 3.10 EXACT REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_driver/src/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int main(int argc, char **argv) {
webots_ros2_driver::WebotsNode::handleSignals();

rclcpp::InitOptions options{};
#if FOXY || GALACTIC
#if FOXY
options.shutdown_on_sigint = false;
#else
options.shutdown_on_signal = false;
Expand Down
4 changes: 2 additions & 2 deletions webots_ros2_driver/src/plugins/static/Ros2Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace webots_ros2_driver
vision_msgs::msg::ObjectHypothesisWithPose hypothesis;
hypothesis.pose.pose = pose.pose;
detection.results.push_back(hypothesis);
#if FOXY || GALACTIC
#if FOXY
detection.bbox.center.x = objects[i].position_on_image[0];
detection.bbox.center.y = objects[i].position_on_image[1];
#else
Expand All @@ -174,7 +174,7 @@ namespace webots_ros2_driver
recognitionWebotsObject.id = objects[i].id;
recognitionWebotsObject.model = std::string(objects[i].model);
recognitionWebotsObject.pose = pose;
#if FOXY || GALACTIC
#if FOXY
recognitionWebotsObject.bbox.center.x = objects[i].position_on_image[0];
recognitionWebotsObject.bbox.center.y = objects[i].position_on_image[1];
#else
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_tests/test/test_system_tiago.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
def generate_test_description():
initialize_webots_test()
# If ROS_DISTRO is rolling or humble, skip the test as some required packages are missing (cf. ci_after_init.bash)
if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'foxy' and os.environ['ROS_DISTRO'] != 'galactic':
if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'foxy':
pytest.skip('ROS_DISTRO is rolling or humble, skipping this test')

tiago_webots = IncludeLaunchDescription(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def generate_test_description():
pytest.skip('RViz might crash in CI, skipping this test')

# If ROS_DISTRO is rolling or humble, skip the test as some required packages are missing (cf. ci_after_init.bash)
if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'foxy' and os.environ['ROS_DISTRO'] != 'galactic':
if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'foxy':
pytest.skip('ROS_DISTRO is rolling or humble, skipping this test')

# Webots
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def generate_test_description():
pytest.skip('RViz might crash in CI, skipping this test')

# If ROS_DISTRO is rolling or humble, skip the test as some required packages are missing (cf. ci_after_init.bash)
if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'foxy' and os.environ['ROS_DISTRO'] != 'galactic':
if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'foxy':
pytest.skip('ROS_DISTRO is rolling or humble, skipping this test')

# Webots
Expand Down

0 comments on commit 8787e22

Please sign in to comment.