Skip to content

Commit

Permalink
Merge branch 'master' into update/admittance-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
bmagyar authored Jan 8, 2025
2 parents 64d61ec + 7ddaf83 commit 893510f
Show file tree
Hide file tree
Showing 83 changed files with 176 additions and 1,556 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jazzy-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
ros_distro: jazzy
ros_repo: testing
upstream_workspace: ros2_controllers.jazzy.repos
ref_for_scheduled_build: jazzy
ref_for_scheduled_build: master
additional_debs: clang
c_compiler: clang
cxx_compiler: clang++
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rolling-semi-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
ros_distro: rolling
ros_repo: testing
upstream_workspace: ros2_controllers.rolling.repos
ref_for_scheduled_build: rolling
ref_for_scheduled_build: master
additional_debs: clang
c_compiler: clang
cxx_compiler: clang++
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:

# Python hooks
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand All @@ -63,7 +63,7 @@ repos:

# CPP hooks
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
rev: v19.1.5
hooks:
- id: clang-format
args: ['-fallback-style=none', '-i']
Expand Down
10 changes: 5 additions & 5 deletions ackermann_steering_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
cmake_minimum_required(VERSION 3.16)
project(ackermann_steering_controller LANGUAGES CXX)
project(ackermann_steering_controller)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
-Werror=missing-braces)
endif()

# using this instead of visibility macros
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# find dependencies
set(THIS_PACKAGE_INCLUDE_DEPENDS
controller_interface
Expand Down Expand Up @@ -45,10 +49,6 @@ target_link_libraries(ackermann_steering_controller PUBLIC
ackermann_steering_controller_parameters)
ament_target_dependencies(ackermann_steering_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(ackermann_steering_controller PRIVATE "ACKERMANN_STEERING_CONTROLLER__VISIBILITY_BUILDING_DLL")

pluginlib_export_plugin_description_file(
controller_interface ackermann_steering_controller.xml)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <memory>

#include "ackermann_steering_controller/visibility_control.h"
#include "ackermann_steering_controller_parameters.hpp"
#include "steering_controllers_library/steering_controllers_library.hpp"

Expand All @@ -47,14 +46,11 @@ class AckermannSteeringController : public steering_controllers_library::Steerin
public:
AckermannSteeringController();

ACKERMANN_STEERING_CONTROLLER__VISIBILITY_PUBLIC controller_interface::CallbackReturn
configure_odometry() override;
controller_interface::CallbackReturn configure_odometry() override;

ACKERMANN_STEERING_CONTROLLER__VISIBILITY_PUBLIC bool update_odometry(
const rclcpp::Duration & period) override;
bool update_odometry(const rclcpp::Duration & period) override;

ACKERMANN_STEERING_CONTROLLER__VISIBILITY_PUBLIC void
initialize_implementation_parameter_listener() override;
void initialize_implementation_parameter_listener() override;

protected:
std::shared_ptr<ackermann_steering_controller::ParamListener> ackermann_param_listener_;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ controller_interface::CallbackReturn AckermannSteeringController::configure_odom

set_interface_numbers(NR_STATE_ITFS, NR_CMD_ITFS, NR_REF_ITFS);

RCLCPP_INFO(get_node()->get_logger(), "ackermann odom configure successful");
RCLCPP_INFO(get_node()->get_logger(), "Ackermann odom configure successful");
return controller_interface::CallbackReturn::SUCCESS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"

using ControllerStateMsg =
steering_controllers_library::SteeringControllersLibrary::AckermanControllerState;
steering_controllers_library::SteeringControllersLibrary::AckermannControllerState;
using ControllerReferenceMsg =
steering_controllers_library::SteeringControllersLibrary::ControllerTwistReferenceMsg;

Expand Down
10 changes: 5 additions & 5 deletions admittance_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
cmake_minimum_required(VERSION 3.16)
project(admittance_controller LANGUAGES CXX)
project(admittance_controller)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
-Werror=missing-braces)
endif()

# using this instead of visibility macros
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

set(THIS_PACKAGE_INCLUDE_DEPENDS
angles
control_msgs
Expand Down Expand Up @@ -53,10 +57,6 @@ target_link_libraries(admittance_controller PUBLIC
)
ament_target_dependencies(admittance_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(admittance_controller PRIVATE "ADMITTANCE_CONTROLLER_BUILDING_DLL")

pluginlib_export_plugin_description_file(controller_interface admittance_controller.xml)

if(BUILD_TESTING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "admittance_controller_parameters.hpp"

#include "admittance_controller/admittance_rule.hpp"
#include "admittance_controller/visibility_control.h"
#include "control_msgs/msg/admittance_controller_state.hpp"
#include "controller_interface/chainable_controller_interface.hpp"
#include "hardware_interface/types/hardware_interface_type_values.hpp"
Expand All @@ -43,46 +42,37 @@ using ControllerStateMsg = control_msgs::msg::AdmittanceControllerState;
class AdmittanceController : public controller_interface::ChainableControllerInterface
{
public:
ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_init() override;

/// Export configuration of required state interfaces.
/**
* Allowed types of state interfaces are \ref hardware_interface::POSITION,
* \ref hardware_interface::VELOCITY, \ref hardware_interface::ACCELERATION.
*/
ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::InterfaceConfiguration command_interface_configuration() const override;

/// Export configuration of required state interfaces.
/**
* Allowed types of state interfaces are \ref hardware_interface::POSITION,
* \ref hardware_interface::VELOCITY, \ref hardware_interface::ACCELERATION.
*/
ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::InterfaceConfiguration state_interface_configuration() const override;

ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_configure(
const rclcpp_lifecycle::State & previous_state) override;

ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_activate(
const rclcpp_lifecycle::State & previous_state) override;

ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_deactivate(
const rclcpp_lifecycle::State & previous_state) override;

ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_cleanup(
const rclcpp_lifecycle::State & previous_state) override;

ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::CallbackReturn on_error(
const rclcpp_lifecycle::State & previous_state) override;

ADMITTANCE_CONTROLLER_PUBLIC
controller_interface::return_type update_and_write_commands(
const rclcpp::Time & time, const rclcpp::Duration & period) override;

Expand Down

This file was deleted.

10 changes: 5 additions & 5 deletions bicycle_steering_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
cmake_minimum_required(VERSION 3.16)
project(bicycle_steering_controller LANGUAGES CXX)
project(bicycle_steering_controller)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
-Werror=missing-braces)
endif()

# using this instead of visibility macros
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# find dependencies
set(THIS_PACKAGE_INCLUDE_DEPENDS
controller_interface
Expand Down Expand Up @@ -45,10 +49,6 @@ target_link_libraries(bicycle_steering_controller PUBLIC
bicycle_steering_controller_parameters)
ament_target_dependencies(bicycle_steering_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(bicycle_steering_controller PRIVATE "BICYCLE_STEERING_CONTROLLER__VISIBILITY_BUILDING_DLL")

pluginlib_export_plugin_description_file(
controller_interface bicycle_steering_controller.xml)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <memory>

#include "bicycle_steering_controller/visibility_control.h"
#include "bicycle_steering_controller_parameters.hpp"
#include "steering_controllers_library/steering_controllers_library.hpp"

Expand All @@ -43,14 +42,11 @@ class BicycleSteeringController : public steering_controllers_library::SteeringC
public:
BicycleSteeringController();

BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC controller_interface::CallbackReturn
configure_odometry() override;
controller_interface::CallbackReturn configure_odometry() override;

BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC bool update_odometry(
const rclcpp::Duration & period) override;
bool update_odometry(const rclcpp::Duration & period) override;

BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC void initialize_implementation_parameter_listener()
override;
void initialize_implementation_parameter_listener() override;

protected:
std::shared_ptr<bicycle_steering_controller::ParamListener> bicycle_param_listener_;
Expand Down
Loading

0 comments on commit 893510f

Please sign in to comment.