From dacfb4e7ec450807d310971fb030864ba2be3500 Mon Sep 17 00:00:00 2001 From: JanNiklasFeld Date: Sun, 24 Nov 2024 16:07:32 +0100 Subject: [PATCH] Changes according to make format and changed ros distro to jazzy --- .github/workflows/ci.yml | 4 ++-- .pre-commit-config.yaml | 2 +- README.md | 2 +- .../include/bitbots_ros_control/utils.hpp | 6 +++--- .../dynamixel_servo_hardware_interface.cpp | 6 +++--- .../src/servo_bus_interface.cpp | 2 +- .../bitbots_ros_control/src/utils.cpp | 2 +- .../src/wolfgang_hardware_interface.cpp | 2 +- .../src/basler_camera.cpp | 6 +++--- .../docs/manual/testing/testing.rst | 2 +- .../tutorials/cl_simulation_testing_setup.rst | 2 +- .../tutorials/install_software_ros2.rst | 14 ++++++------- .../docs/manual/tutorials/vscode-ros2.rst | 4 ++-- .../src/bitbots_tf_buffer.cpp | 3 ++- bitbots_misc/bitbots_utils/src/utils.cpp | 2 +- .../include/bitbots_dynamic_kick/kick_ik.hpp | 2 +- .../bitbots_dynamic_kick/src/kick_engine.cpp | 3 +-- .../bitbots_dynamic_kick/src/kick_ik.cpp | 2 +- .../bitbots_dynamic_kick/src/kick_node.cpp | 2 +- .../bitbots_dynamic_kick/src/stabilizer.cpp | 2 +- .../bitbots_dynamic_kick/src/visualizer.cpp | 3 +-- .../include/bitbots_dynup/dynup_engine.hpp | 2 +- .../include/bitbots_dynup/dynup_ik.hpp | 2 +- .../include/bitbots_dynup/dynup_node.hpp | 15 +++++++------ .../include/bitbots_dynup/dynup_pywrapper.hpp | 5 ++--- .../bitbots_dynup/dynup_stabilizer.hpp | 2 +- .../include/bitbots_dynup/visualizer.hpp | 3 +-- .../bitbots_dynup/src/dynup_engine.cpp | 3 +-- .../bitbots_dynup/src/dynup_node.cpp | 2 +- .../bitbots_dynup/src/dynup_pywrapper.cpp | 2 +- .../bitbots_dynup/src/dynup_stabilizer.cpp | 2 +- .../bitbots_dynup/src/dynup_utils.cpp | 2 +- .../bitbots_dynup/src/visualizer.cpp | 3 +-- bitbots_motion/bitbots_hcm/src/hcm.cpp | 19 ++++++++--------- .../bitbots_head_mover/src/move_head.cpp | 5 ++--- .../src/bitbots_moveit_bindings.cpp | 9 ++++---- .../bitbots_quintic_walk/walk_engine.hpp | 11 +++++----- .../include/bitbots_quintic_walk/walk_ik.hpp | 7 +++---- .../bitbots_quintic_walk/walk_node.hpp | 21 +++++++++---------- .../bitbots_quintic_walk/walk_pywrapper.hpp | 5 ++--- .../bitbots_quintic_walk/walk_stabilizer.hpp | 4 +--- .../bitbots_quintic_walk/walk_visualizer.hpp | 9 ++++---- .../bitbots_quintic_walk/src/walk_engine.cpp | 2 +- .../bitbots_quintic_walk/src/walk_ik.cpp | 2 +- .../bitbots_quintic_walk/src/walk_node.cpp | 3 +-- .../src/walk_pywrapper.cpp | 2 +- .../src/walk_stabilizer.cpp | 2 +- .../src/walk_visualizer.cpp | 2 +- .../include/bitbots_splines/pose_spline.hpp | 3 +-- .../bitbots_splines/src/Spline/polynom.cpp | 5 ++--- .../src/Spline/pose_spline.cpp | 2 +- .../src/Spline/position_spline.cpp | 2 +- .../src/Spline/smooth_spline.cpp | 5 ++--- .../bitbots_splines/src/Spline/spline.cpp | 3 +-- .../bitbots_splines/src/Utils/combination.cpp | 3 +-- .../src/Utils/newton_binomial.cpp | 3 +-- .../bitbots_localization/ObservationModel.hpp | 3 +-- .../bitbots_localization/Resampling.hpp | 8 +++---- .../bitbots_localization/localization.hpp | 3 +-- .../bitbots_localization/src/localization.cpp | 3 +-- .../bitbots_localization/src/map.cpp | 3 +-- .../bitbots_odometry/motion_odometry.hpp | 3 +-- scripts/deploy/tasks/build.py | 2 +- scripts/robot_compile.py | 4 ++-- scripts/ros.plugin.sh | 2 +- scripts/setup.sh | 2 +- 66 files changed, 125 insertions(+), 153 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 377ce3f22..a8533d17a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,14 +39,14 @@ jobs: - name: Build packages run: | - . /opt/ros/iron/setup.sh + . /opt/ros/jazzy/setup.sh colcon build --symlink-install working-directory: /colcon_ws - name: Test packages run: | # Source workspace - . /opt/ros/iron/setup.sh + . /opt/ros/jazzy/setup.sh . install/setup.sh # Run tests for all packages colcon test --event-handlers console_direct+ --return-code-on-test-failure --parallel-workers 1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c0c5e37a..06f738c8b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: cppcheck args: - "--inline-suppr" - - "--suppress=missingInclude" + - "--suppress=missingIncludeSystem" - "--suppress=unmatchedSuppression" - "--suppress=unusedFunction" - "--suppress=unusedStructMember" diff --git a/README.md b/README.md index c04f8132d..067943c5b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build & Test](https://github.com/bit-bots/bitbots_main/actions/workflows/ci.yml/badge.svg)](https://github.com/bit-bots/bitbots_main/actions/workflows/ci.yml) [![Code style checks](https://github.com/bit-bots/bitbots_main/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/bit-bots/bitbots_main/actions/workflows/pre-commit.yml) -[![ROS Version Iron](https://img.shields.io/badge/ROS%20Version-Iron-ab8c71)](https://docs.ros.org/en/iron/index.html) +[![ROS Version Jazzy](https://img.shields.io/badge/ROS%20Version-Jazzy-00b8ff)](https://docs.ros.org/en/jazzy/index.html) This git repository contains all RoboCup-related code and documentation from the Hamburg Bit-Bots team. All code is written as individual ROS 2 packages targeting Ubuntu. diff --git a/bitbots_lowlevel/bitbots_ros_control/include/bitbots_ros_control/utils.hpp b/bitbots_lowlevel/bitbots_ros_control/include/bitbots_ros_control/utils.hpp index 68e480cd2..eab409395 100644 --- a/bitbots_lowlevel/bitbots_ros_control/include/bitbots_ros_control/utils.hpp +++ b/bitbots_lowlevel/bitbots_ros_control/include/bitbots_ros_control/utils.hpp @@ -1,8 +1,8 @@ #ifndef BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_UTILS_H_ #define BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_UTILS_H_ -#include "bitbots_msgs/msg/audio.hpp" -#include "rclcpp/rclcpp.hpp" +#include +#include namespace bitbots_ros_control { @@ -13,7 +13,7 @@ void speakError(rclcpp::Publisher::SharedPtr speak_pub uint16_t dxlMakeword(uint64_t a, uint64_t b); uint32_t dxlMakedword(uint64_t a, uint64_t b); -float dxlMakeFloat(uint8_t* data); +float dxlMakeFloat(const uint8_t* data); std::string gyroRangeToString(uint8_t range); std::string accelRangeToString(uint8_t range); diff --git a/bitbots_lowlevel/bitbots_ros_control/src/dynamixel_servo_hardware_interface.cpp b/bitbots_lowlevel/bitbots_ros_control/src/dynamixel_servo_hardware_interface.cpp index 34f24cb5d..57c1cf389 100644 --- a/bitbots_lowlevel/bitbots_ros_control/src/dynamixel_servo_hardware_interface.cpp +++ b/bitbots_lowlevel/bitbots_ros_control/src/dynamixel_servo_hardware_interface.cpp @@ -148,7 +148,7 @@ void DynamixelServoHardwareInterface::individualTorqueCb(bitbots_msgs::msg::Join RCLCPP_WARN(nh_->get_logger(), "Couldn't set torque for servo %s ", msg.joint_names[i].c_str()); } } - for (auto &bus : bus_interfaces_) { + for (const auto &bus : bus_interfaces_) { bus->switch_individual_torque_ = true; } } @@ -157,7 +157,7 @@ void DynamixelServoHardwareInterface::setTorqueCb(std_msgs::msg::Bool::SharedPtr /** * This saves the given required value, so that it can be written to the servos in the write method */ - for (auto &bus : bus_interfaces_) { + for (const auto &bus : bus_interfaces_) { bus->goal_torque_ = enabled->data; } for (size_t j = 0; j < joint_names_.size(); j++) { @@ -196,7 +196,7 @@ void DynamixelServoHardwareInterface::write(const rclcpp::Time &t, const rclcpp: // set all values from controller to the buses // todo improve performance int i = 0; - for (auto &bus : bus_interfaces_) { + for (const auto &bus : bus_interfaces_) { for (int j = 0; j < bus->joint_count_; j++) { bus->goal_position_[j] = goal_position_[i]; bus->goal_velocity_[j] = goal_velocity_[i]; diff --git a/bitbots_lowlevel/bitbots_ros_control/src/servo_bus_interface.cpp b/bitbots_lowlevel/bitbots_ros_control/src/servo_bus_interface.cpp index b034a2f98..06c82fff5 100644 --- a/bitbots_lowlevel/bitbots_ros_control/src/servo_bus_interface.cpp +++ b/bitbots_lowlevel/bitbots_ros_control/src/servo_bus_interface.cpp @@ -202,7 +202,7 @@ bool ServoBusInterface::writeROMRAM(bool first_time) { // Allocate memory for the values in the driver std::vector values(joint_names_.size()); // Iterate over parameter names - for (auto register_name : parameter_names) { + for (const auto ®ister_name : parameter_names) { // Get the value for each joint for (size_t num = 0; num < joint_names_.size(); num++) { // Get the value from the cache diff --git a/bitbots_lowlevel/bitbots_ros_control/src/utils.cpp b/bitbots_lowlevel/bitbots_ros_control/src/utils.cpp index a9e0745ba..9286eba43 100644 --- a/bitbots_lowlevel/bitbots_ros_control/src/utils.cpp +++ b/bitbots_lowlevel/bitbots_ros_control/src/utils.cpp @@ -40,7 +40,7 @@ uint32_t dxlMakedword(uint64_t a, uint64_t b) { return uint32_t(uint16_t(a & 0xffff) | uint32_t(uint16_t(b & 0xffff) << 16)); } -float dxlMakeFloat(uint8_t* data) { +float dxlMakeFloat(const uint8_t* data) { float f; uint32_t b = dxlMakedword(dxlMakeword(data[0], data[1]), dxlMakeword(data[2], data[3])); memcpy(&f, &b, sizeof(f)); diff --git a/bitbots_lowlevel/bitbots_ros_control/src/wolfgang_hardware_interface.cpp b/bitbots_lowlevel/bitbots_ros_control/src/wolfgang_hardware_interface.cpp index 929812d83..96097debd 100644 --- a/bitbots_lowlevel/bitbots_ros_control/src/wolfgang_hardware_interface.cpp +++ b/bitbots_lowlevel/bitbots_ros_control/src/wolfgang_hardware_interface.cpp @@ -307,7 +307,7 @@ void WolfgangHardwareInterface::write(const rclcpp::Time &t, const rclcpp::Durat } if (!bus_start_time_ || t > bus_start_time_.value()) { if (bus_first_write_) { - for (std::vector> &port_interfaces : interfaces_) { + for (std::vector> const &port_interfaces : interfaces_) { for (std::shared_ptr interface : port_interfaces) { interface->restoreAfterPowerCycle(); } diff --git a/bitbots_misc/bitbots_basler_camera/src/basler_camera.cpp b/bitbots_misc/bitbots_basler_camera/src/basler_camera.cpp index c1f6b2e92..b1587a0a2 100644 --- a/bitbots_misc/bitbots_basler_camera/src/basler_camera.cpp +++ b/bitbots_misc/bitbots_basler_camera/src/basler_camera.cpp @@ -12,14 +12,13 @@ #include #include #include +#include #include #include #include #include #include -#include "pylon_camera_parameters.hpp" - using std::placeholders::_1, std::placeholders::_2; using namespace Pylon; @@ -271,7 +270,8 @@ class BaslerCamera { } // Convert to cv::Mat - cv::Mat image(ptrGrabResult->GetHeight(), ptrGrabResult->GetWidth(), CV_8UC1, (uint8_t*)ptrGrabResult->GetBuffer()); + cv::Mat image(ptrGrabResult->GetHeight(), ptrGrabResult->GetWidth(), CV_8UC1, + static_cast(ptrGrabResult->GetBuffer())); // Create cv::Mat for color image cv::Mat color(image.size(), CV_MAKETYPE(CV_8U, 3)); diff --git a/bitbots_misc/bitbots_docs/docs/manual/testing/testing.rst b/bitbots_misc/bitbots_docs/docs/manual/testing/testing.rst index e3990f5f3..4f0ce8dd0 100644 --- a/bitbots_misc/bitbots_docs/docs/manual/testing/testing.rst +++ b/bitbots_misc/bitbots_docs/docs/manual/testing/testing.rst @@ -49,7 +49,7 @@ Compile (compiles) ------------------ The first step is to test if the package compiles. -Obviously this should preferably be tested on the same system that is used on the robot (Ubuntu 22.04 with the iron distribution). +Obviously this should preferably be tested on the same system that is used on the robot (Ubuntu 24.04 with the jazzy distribution). A part of this is to check if all dependencies are correct in the package.xml. This is important so they can be installed with rosdep. diff --git a/bitbots_misc/bitbots_docs/docs/manual/tutorials/cl_simulation_testing_setup.rst b/bitbots_misc/bitbots_docs/docs/manual/tutorials/cl_simulation_testing_setup.rst index 7ce7b2331..2942f71a2 100644 --- a/bitbots_misc/bitbots_docs/docs/manual/tutorials/cl_simulation_testing_setup.rst +++ b/bitbots_misc/bitbots_docs/docs/manual/tutorials/cl_simulation_testing_setup.rst @@ -35,7 +35,7 @@ For compilation of the whole meta repository run ``cba``, which is an alias for: ``cd $COLCON_WS; colcon build --symlink-install --continue-on-error`` After a successful run, before we are able to use any ros commands we now need to source colcon built sources with ``sa``, which is an alias for: -``source "/opt/ros/iron/setup.$SHELL" && source "$COLCON_WS/install/setup.$SHELL"`` +``source "/opt/ros/jazzy/setup.$SHELL" && source "$COLCON_WS/install/setup.$SHELL"`` **3. Run Webots Simulation** diff --git a/bitbots_misc/bitbots_docs/docs/manual/tutorials/install_software_ros2.rst b/bitbots_misc/bitbots_docs/docs/manual/tutorials/install_software_ros2.rst index caf93aab6..26b7fb244 100644 --- a/bitbots_misc/bitbots_docs/docs/manual/tutorials/install_software_ros2.rst +++ b/bitbots_misc/bitbots_docs/docs/manual/tutorials/install_software_ros2.rst @@ -1,13 +1,13 @@ Software installation with ROS2 =============================== -In this tutorial, we will learn how to install ROS2 Iron Irwini on Ubuntu 22.04 and build our software stack. +In this tutorial, we will learn how to install ROS2 Jazzy Jalisco on Ubuntu 24.04 and build our software stack. **TLDR**: single command setup ------------------------------ **Prerequirements** -- You have a running Ubuntu 22.04 environment +- You have a running Ubuntu 24.04 environment - You have an existing Github account and added a SSH key to your account - You have root access to your system (sudo) @@ -23,17 +23,17 @@ If you have not previously set up any of our software stack, you can use the fol Manual steps with in depth explanation -------------------------------------- -**0. Use Ubuntu 22.04** +**0. Use Ubuntu 24.04** As ROS works best on Ubuntu, we are using this distribution. -Currently, ROS2 Iron runs on Ubuntu 22.04. +Currently, ROS2 Jazzy runs on Ubuntu 24.04. -If you are not already using Ubuntu 22.04, consider installing it on your system (perhaps as a dual boot?). +If you are not already using Ubuntu 24.04, consider installing it on your system (perhaps as a dual boot?). Alternatively you can use a devcontainer :doc:`vscode-dev-container`, with a preconfigured environment and follow those instructions, as these docs do not apply to the devcontainer. **1. Setup and Install ROS 2** -- Follow this guide and when it comes to the section **Install ROS 2 packages**, install the recommended ``ros-iron-desktop-full``: https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html +- Follow this guide and when it comes to the section **Install ROS 2 packages**, install the recommended ``ros-jazzy-desktop-full``: https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html - Install additional dependencies: .. code-block:: bash @@ -88,7 +88,7 @@ If you want to install it, you can do so by running ``make webots`` in the bitbo **4. Setup colcon workspace** -`Colcon `_ is the tool provided by ROS 2 to build and install our ROS packages, so that they can be launched later. +`Colcon `_ is the tool provided by ROS 2 to build and install our ROS packages, so that they can be launched later. The colcon workspace is where your source code gets build and where we use colcon. - Create colcon workspace directory (typically ``~/colcon_ws/``) diff --git a/bitbots_misc/bitbots_docs/docs/manual/tutorials/vscode-ros2.rst b/bitbots_misc/bitbots_docs/docs/manual/tutorials/vscode-ros2.rst index 75d17ec0a..23030b7cf 100644 --- a/bitbots_misc/bitbots_docs/docs/manual/tutorials/vscode-ros2.rst +++ b/bitbots_misc/bitbots_docs/docs/manual/tutorials/vscode-ros2.rst @@ -9,14 +9,14 @@ Navigate to your colcon workspace. Source ros -`source /opt/ros/iron/setup.zsh` +`source /opt/ros/jazzy/setup.zsh` Open VSCode `code .` Install the ROS extension (from Microsoft). -You should see a `ROS2.iron` in the lower left corner. +You should see a `ROS2.jazzy` in the lower left corner. Now you should be able to build the code with `Ctrl+Shift+B` diff --git a/bitbots_misc/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp b/bitbots_misc/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp index 1096bf9a8..ade8337c0 100644 --- a/bitbots_misc/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp +++ b/bitbots_misc/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp @@ -39,7 +39,8 @@ class Buffer { py_tf2_ros.attr("TimeoutException")); // get node name from python node object - rcl_node_t *node_handle = (rcl_node_t *)node.attr("handle").attr("pointer").cast(); + rcl_node_t *node_handle = + static_cast(reinterpret_cast(node.attr("handle").attr("pointer").cast())); const char *node_name = rcl_node_get_name(node_handle); // create node with name _tf node_ = std::make_shared((std::string(node_name) + "_tf").c_str()); diff --git a/bitbots_misc/bitbots_utils/src/utils.cpp b/bitbots_misc/bitbots_utils/src/utils.cpp index a0aea990a..2131dec2e 100644 --- a/bitbots_misc/bitbots_utils/src/utils.cpp +++ b/bitbots_misc/bitbots_utils/src/utils.cpp @@ -1,4 +1,4 @@ -#include "bitbots_utils/utils.hpp" +#include namespace bitbots_utils { diff --git a/bitbots_motion/bitbots_dynamic_kick/include/bitbots_dynamic_kick/kick_ik.hpp b/bitbots_motion/bitbots_dynamic_kick/include/bitbots_dynamic_kick/kick_ik.hpp index 894a05bd9..1b999222c 100644 --- a/bitbots_motion/bitbots_dynamic_kick/include/bitbots_dynamic_kick/kick_ik.hpp +++ b/bitbots_motion/bitbots_dynamic_kick/include/bitbots_dynamic_kick/kick_ik.hpp @@ -12,7 +12,7 @@ namespace bitbots_dynamic_kick { class KickIK : public bitbots_splines::AbstractIK { public: - KickIK() = default; + KickIK() : legs_joints_group_(), left_leg_joints_group_(), right_leg_joints_group_(){}; void init(moveit::core::RobotModelPtr kinematic_model) override; bitbots_splines::JointGoals calculate(const KickPositions &positions) override; void reset() override; diff --git a/bitbots_motion/bitbots_dynamic_kick/src/kick_engine.cpp b/bitbots_motion/bitbots_dynamic_kick/src/kick_engine.cpp index b09847137..679d79739 100644 --- a/bitbots_motion/bitbots_dynamic_kick/src/kick_engine.cpp +++ b/bitbots_motion/bitbots_dynamic_kick/src/kick_engine.cpp @@ -1,5 +1,4 @@ -#include "bitbots_dynamic_kick/kick_engine.hpp" - +#include #include namespace bitbots_dynamic_kick { diff --git a/bitbots_motion/bitbots_dynamic_kick/src/kick_ik.cpp b/bitbots_motion/bitbots_dynamic_kick/src/kick_ik.cpp index a562c2da6..a44013df1 100644 --- a/bitbots_motion/bitbots_dynamic_kick/src/kick_ik.cpp +++ b/bitbots_motion/bitbots_dynamic_kick/src/kick_ik.cpp @@ -1,4 +1,4 @@ -#include "bitbots_dynamic_kick/kick_ik.hpp" +#include namespace bitbots_dynamic_kick { diff --git a/bitbots_motion/bitbots_dynamic_kick/src/kick_node.cpp b/bitbots_motion/bitbots_dynamic_kick/src/kick_node.cpp index 89d85824f..9b47bd922 100644 --- a/bitbots_motion/bitbots_dynamic_kick/src/kick_node.cpp +++ b/bitbots_motion/bitbots_dynamic_kick/src/kick_node.cpp @@ -1,4 +1,4 @@ -#include "bitbots_dynamic_kick/kick_node.hpp" +#include namespace bitbots_dynamic_kick { using namespace std::chrono_literals; diff --git a/bitbots_motion/bitbots_dynamic_kick/src/stabilizer.cpp b/bitbots_motion/bitbots_dynamic_kick/src/stabilizer.cpp index e78689de6..84320bfaf 100644 --- a/bitbots_motion/bitbots_dynamic_kick/src/stabilizer.cpp +++ b/bitbots_motion/bitbots_dynamic_kick/src/stabilizer.cpp @@ -1,4 +1,4 @@ -#include "bitbots_dynamic_kick/stabilizer.hpp" +#include namespace bitbots_dynamic_kick { diff --git a/bitbots_motion/bitbots_dynamic_kick/src/visualizer.cpp b/bitbots_motion/bitbots_dynamic_kick/src/visualizer.cpp index 266243737..69f3d3103 100644 --- a/bitbots_motion/bitbots_dynamic_kick/src/visualizer.cpp +++ b/bitbots_motion/bitbots_dynamic_kick/src/visualizer.cpp @@ -1,5 +1,4 @@ -#include "bitbots_dynamic_kick/visualizer.hpp" - +#include #include namespace bitbots_dynamic_kick { diff --git a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_engine.hpp b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_engine.hpp index 9710d6138..a2f05f9b3 100644 --- a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_engine.hpp +++ b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_engine.hpp @@ -9,13 +9,13 @@ #include #include #include +#include #include #include #include #include #include -#include "dynup_parameters.hpp" #include "dynup_stabilizer.hpp" namespace bitbots_dynup { diff --git a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_ik.hpp b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_ik.hpp index 50a8a6b3b..31774ebc8 100644 --- a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_ik.hpp +++ b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_ik.hpp @@ -7,10 +7,10 @@ #include #include +#include #include #include -#include "dynup_parameters.hpp" #include "dynup_utils.hpp" namespace bitbots_dynup { diff --git a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_node.hpp b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_node.hpp index bb563e7f9..2ea86bdcf 100644 --- a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_node.hpp +++ b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_node.hpp @@ -11,30 +11,29 @@ #include #include +#include +#include +#include #include +#include +#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include #include #include -#include "bitbots_dynup/dynup_engine.hpp" -#include "bitbots_dynup/dynup_ik.hpp" -#include "bitbots_dynup/dynup_stabilizer.hpp" -#include "bitbots_dynup/visualizer.hpp" -#include "bitbots_msgs/action/dynup.hpp" -#include "dynup_parameters.hpp" -#include "rclcpp_action/rclcpp_action.hpp" - namespace bitbots_dynup { using DynupGoal = bitbots_msgs::action::Dynup; using DynupGoalHandle = rclcpp_action::ServerGoalHandle; diff --git a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_pywrapper.hpp b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_pywrapper.hpp index 5a3bc0532..82fe8a14e 100644 --- a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_pywrapper.hpp +++ b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_pywrapper.hpp @@ -4,14 +4,13 @@ #include #include +#include +#include #include #include #include #include -#include "bitbots_dynup/dynup_node.hpp" -#include "bitbots_dynup/dynup_utils.hpp" - namespace py = pybind11; using namespace ros2_python_extension; diff --git a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_stabilizer.hpp b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_stabilizer.hpp index 6c461c892..684474572 100644 --- a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_stabilizer.hpp +++ b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/dynup_stabilizer.hpp @@ -6,12 +6,12 @@ #include #include #include +#include #include #include #include #include -#include "dynup_parameters.hpp" #include "dynup_utils.hpp" namespace bitbots_dynup { diff --git a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/visualizer.hpp b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/visualizer.hpp index 12078bb70..621c0a7cb 100644 --- a/bitbots_motion/bitbots_dynup/include/bitbots_dynup/visualizer.hpp +++ b/bitbots_motion/bitbots_dynup/include/bitbots_dynup/visualizer.hpp @@ -11,14 +11,13 @@ #include #include #include +#include #include #include #include #include #include -#include "dynup_parameters.hpp" - namespace bitbots_dynup { class Visualizer : bitbots_splines::AbstractVisualizer { diff --git a/bitbots_motion/bitbots_dynup/src/dynup_engine.cpp b/bitbots_motion/bitbots_dynup/src/dynup_engine.cpp index 02712ef0c..f4805c1e4 100644 --- a/bitbots_motion/bitbots_dynup/src/dynup_engine.cpp +++ b/bitbots_motion/bitbots_dynup/src/dynup_engine.cpp @@ -1,5 +1,4 @@ -#include "bitbots_dynup/dynup_engine.hpp" - +#include #include namespace bitbots_dynup { diff --git a/bitbots_motion/bitbots_dynup/src/dynup_node.cpp b/bitbots_motion/bitbots_dynup/src/dynup_node.cpp index 69ed264c8..3316a348e 100644 --- a/bitbots_motion/bitbots_dynup/src/dynup_node.cpp +++ b/bitbots_motion/bitbots_dynup/src/dynup_node.cpp @@ -1,4 +1,4 @@ -#include "bitbots_dynup/dynup_node.hpp" +#include namespace bitbots_dynup { using namespace std::chrono_literals; diff --git a/bitbots_motion/bitbots_dynup/src/dynup_pywrapper.cpp b/bitbots_motion/bitbots_dynup/src/dynup_pywrapper.cpp index 8062bdb82..0ceb2aa34 100644 --- a/bitbots_motion/bitbots_dynup/src/dynup_pywrapper.cpp +++ b/bitbots_motion/bitbots_dynup/src/dynup_pywrapper.cpp @@ -1,4 +1,4 @@ -#include "bitbots_dynup/dynup_pywrapper.hpp" +#include PyDynupWrapper::PyDynupWrapper(const std::string ns) { // initialize rclcpp if not already done diff --git a/bitbots_motion/bitbots_dynup/src/dynup_stabilizer.cpp b/bitbots_motion/bitbots_dynup/src/dynup_stabilizer.cpp index e1e33c7f5..a44f34d15 100644 --- a/bitbots_motion/bitbots_dynup/src/dynup_stabilizer.cpp +++ b/bitbots_motion/bitbots_dynup/src/dynup_stabilizer.cpp @@ -1,4 +1,4 @@ -#include "bitbots_dynup/dynup_stabilizer.hpp" +#include namespace bitbots_dynup { diff --git a/bitbots_motion/bitbots_dynup/src/dynup_utils.cpp b/bitbots_motion/bitbots_dynup/src/dynup_utils.cpp index 3c218329c..82a85050f 100644 --- a/bitbots_motion/bitbots_dynup/src/dynup_utils.cpp +++ b/bitbots_motion/bitbots_dynup/src/dynup_utils.cpp @@ -1,4 +1,4 @@ -#include "bitbots_dynup/dynup_utils.hpp" +#include namespace bitbots_dynup { diff --git a/bitbots_motion/bitbots_dynup/src/visualizer.cpp b/bitbots_motion/bitbots_dynup/src/visualizer.cpp index 07bbaaf30..5228b28e5 100644 --- a/bitbots_motion/bitbots_dynup/src/visualizer.cpp +++ b/bitbots_motion/bitbots_dynup/src/visualizer.cpp @@ -1,5 +1,4 @@ -#include "bitbots_dynup/visualizer.hpp" - +#include #include namespace bitbots_dynup { diff --git a/bitbots_motion/bitbots_hcm/src/hcm.cpp b/bitbots_motion/bitbots_hcm/src/hcm.cpp index d22a44cee..d82358c0d 100644 --- a/bitbots_motion/bitbots_hcm/src/hcm.cpp +++ b/bitbots_motion/bitbots_hcm/src/hcm.cpp @@ -1,22 +1,21 @@ #include +#include +#include +#include +#include +#include #include +#include #include #include #include #include +#include +#include +#include #include -#include "bitbots_msgs/msg/animation.hpp" -#include "bitbots_msgs/msg/foot_pressure.hpp" -#include "bitbots_msgs/msg/joint_command.hpp" -#include "bitbots_msgs/msg/robot_control_state.hpp" -#include "builtin_interfaces/msg/time.hpp" -#include "geometry_msgs/msg/point_stamped.hpp" -#include "sensor_msgs/msg/imu.hpp" -#include "sensor_msgs/msg/joint_state.hpp" -#include "std_msgs/msg/header.hpp" - using std::placeholders::_1; namespace py = pybind11; namespace bitbots_hcm { diff --git a/bitbots_motion/bitbots_head_mover/src/move_head.cpp b/bitbots_motion/bitbots_head_mover/src/move_head.cpp index 242887a6f..c28bda1f5 100644 --- a/bitbots_motion/bitbots_head_mover/src/move_head.cpp +++ b/bitbots_motion/bitbots_head_mover/src/move_head.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -29,8 +30,6 @@ #include #include -#include "head_parameters.hpp" - using std::placeholders::_1; using namespace std::chrono_literals; @@ -648,7 +647,7 @@ class HeadMover { * @param tilt The current tilt position * @return int The index of the pattern keypoint that is closest to the current head position */ - int get_near_pattern_position(std::vector> pattern, double pan, double tilt) { + int get_near_pattern_position(const std::vector>& pattern, double pan, double tilt) { // Store the index and distance of the closest keypoint std::pair min_distance_point = {10000.0, -1}; // Iterate over all keypoints and calculate the distance to the current head position diff --git a/bitbots_motion/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp b/bitbots_motion/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp index e4b7ebd41..c467a2467 100644 --- a/bitbots_motion/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp +++ b/bitbots_motion/bitbots_moveit_bindings/src/bitbots_moveit_bindings.cpp @@ -13,14 +13,13 @@ #include #include #include +#include #include #include #include #include #include #include - -#include "rcl_interfaces/srv/get_parameters.hpp" namespace py = pybind11; using namespace std::chrono_literals; using std::placeholders::_1; @@ -315,15 +314,15 @@ class BitbotsMoveitBindings { ik_options.goals.emplace_back(new bio_ik::LineGoal(m.link_name, p(m.position), p(m.direction), w(m.weight))); } - for (auto& m : ik_request.avoid_joint_limits_goals) { + for (const auto& m : ik_request.avoid_joint_limits_goals) { ik_options.goals.emplace_back(new bio_ik::AvoidJointLimitsGoal(w(m.weight), !m.primary)); } - for (auto& m : ik_request.minimal_displacement_goals) { + for (const auto& m : ik_request.minimal_displacement_goals) { ik_options.goals.emplace_back(new bio_ik::MinimalDisplacementGoal(w(m.weight), !m.primary)); } - for (auto& m : ik_request.center_joints_goals) { + for (const auto& m : ik_request.center_joints_goals) { ik_options.goals.emplace_back(new bio_ik::CenterJointsGoal(w(m.weight), !m.primary)); } diff --git a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_engine.hpp b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_engine.hpp index a57676d96..064209cde 100644 --- a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_engine.hpp +++ b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_engine.hpp @@ -9,14 +9,13 @@ The original files can be found at: #include #include +#include +#include +#include +#include +#include #include -#include "bitbots_quintic_walk/walk_utils.hpp" -#include "bitbots_quintic_walk_parameters.hpp" -#include "bitbots_splines/abstract_engine.hpp" -#include "bitbots_splines/pose_spline.hpp" -#include "bitbots_splines/smooth_spline.hpp" - namespace bitbots_quintic_walk { /** diff --git a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_ik.hpp b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_ik.hpp index 806943bfd..a64dd3113 100644 --- a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_ik.hpp +++ b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_ik.hpp @@ -2,11 +2,10 @@ #define BITBOTS_QUINTIC_WALK_INCLUDE_BITBOTS_QUINTIC_WALK_WALK_IK_H_ #include +#include +#include +#include #include - -#include "bitbots_quintic_walk/walk_utils.hpp" -#include "bitbots_quintic_walk_parameters.hpp" -#include "bitbots_splines/abstract_ik.hpp" namespace bitbots_quintic_walk { class WalkIK : public bitbots_splines::AbstractIK { diff --git a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.hpp b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.hpp index ad2da928c..62040bb1c 100644 --- a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.hpp +++ b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_node.hpp @@ -17,6 +17,16 @@ The original files can be found at: #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -38,17 +48,6 @@ The original files can be found at: #include #include -#include "biped_interfaces/msg/phase.hpp" -#include "bitbots_msgs/msg/foot_pressure.hpp" -#include "bitbots_msgs/msg/joint_command.hpp" -#include "bitbots_msgs/msg/robot_control_state.hpp" -#include "bitbots_quintic_walk/walk_engine.hpp" -#include "bitbots_quintic_walk/walk_ik.hpp" -#include "bitbots_quintic_walk/walk_stabilizer.hpp" -#include "bitbots_quintic_walk/walk_visualizer.hpp" -#include "bitbots_quintic_walk_parameters.hpp" -#include "bitbots_splines/abstract_ik.hpp" - namespace bitbots_quintic_walk { class WalkNode { diff --git a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_pywrapper.hpp b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_pywrapper.hpp index 258689f77..2436bd40d 100644 --- a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_pywrapper.hpp +++ b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_pywrapper.hpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include #include #include @@ -15,9 +17,6 @@ #include #include -#include "bitbots_quintic_walk/walk_node.hpp" -#include "bitbots_quintic_walk/walk_utils.hpp" - namespace py = pybind11; using namespace ros2_python_extension; diff --git a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_stabilizer.hpp b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_stabilizer.hpp index 9ca5c46e9..7b5387833 100644 --- a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_stabilizer.hpp +++ b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_stabilizer.hpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -11,9 +12,6 @@ #include #include -#include "bitbots_quintic_walk/walk_utils.hpp" -#include "bitbots_splines/abstract_stabilizer.hpp" - namespace bitbots_quintic_walk { class WalkStabilizer : public bitbots_splines::AbstractStabilizer { diff --git a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_visualizer.hpp b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_visualizer.hpp index 31dfa798c..84ca9d409 100644 --- a/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_visualizer.hpp +++ b/bitbots_motion/bitbots_quintic_walk/include/bitbots_quintic_walk/walk_visualizer.hpp @@ -7,18 +7,17 @@ #include #include +#include +#include #include #include +#include +#include #include #include #include #include -#include "bitbots_quintic_walk/msg/walk_debug.hpp" -#include "bitbots_quintic_walk/msg/walk_engine_debug.hpp" -#include "bitbots_splines/abstract_ik.hpp" -#include "bitbots_splines/abstract_visualizer.hpp" - namespace bitbots_quintic_walk { class WalkVisualizer : public bitbots_splines::AbstractVisualizer { public: diff --git a/bitbots_motion/bitbots_quintic_walk/src/walk_engine.cpp b/bitbots_motion/bitbots_quintic_walk/src/walk_engine.cpp index 6cc63a138..4b25314f8 100644 --- a/bitbots_motion/bitbots_quintic_walk/src/walk_engine.cpp +++ b/bitbots_motion/bitbots_quintic_walk/src/walk_engine.cpp @@ -3,7 +3,7 @@ This code is partly based on the original code by Quentin "Leph" Rouxel and Team The original files can be found at: https://github.com/Rhoban/model/ */ -#include "bitbots_quintic_walk/walk_engine.hpp" +#include namespace bitbots_quintic_walk { diff --git a/bitbots_motion/bitbots_quintic_walk/src/walk_ik.cpp b/bitbots_motion/bitbots_quintic_walk/src/walk_ik.cpp index 7ef787e74..14b4d5a0e 100644 --- a/bitbots_motion/bitbots_quintic_walk/src/walk_ik.cpp +++ b/bitbots_motion/bitbots_quintic_walk/src/walk_ik.cpp @@ -1,4 +1,4 @@ -#include "bitbots_quintic_walk/walk_ik.hpp" +#include namespace bitbots_quintic_walk { diff --git a/bitbots_motion/bitbots_quintic_walk/src/walk_node.cpp b/bitbots_motion/bitbots_quintic_walk/src/walk_node.cpp index 8f238f2ff..0f6f4075a 100644 --- a/bitbots_motion/bitbots_quintic_walk/src/walk_node.cpp +++ b/bitbots_motion/bitbots_quintic_walk/src/walk_node.cpp @@ -1,7 +1,6 @@ #define M_TAU M_PI * 2 -#include "bitbots_quintic_walk/walk_node.hpp" - +#include #include #include using std::placeholders::_1; diff --git a/bitbots_motion/bitbots_quintic_walk/src/walk_pywrapper.cpp b/bitbots_motion/bitbots_quintic_walk/src/walk_pywrapper.cpp index 3d83ae465..e0f2ac570 100644 --- a/bitbots_motion/bitbots_quintic_walk/src/walk_pywrapper.cpp +++ b/bitbots_motion/bitbots_quintic_walk/src/walk_pywrapper.cpp @@ -1,4 +1,4 @@ -#include "bitbots_quintic_walk/walk_pywrapper.hpp" +#include void PyWalkWrapper::spin_some() { rclcpp::spin_some(node_); } diff --git a/bitbots_motion/bitbots_quintic_walk/src/walk_stabilizer.cpp b/bitbots_motion/bitbots_quintic_walk/src/walk_stabilizer.cpp index 3e27e6ce3..7a54551a5 100644 --- a/bitbots_motion/bitbots_quintic_walk/src/walk_stabilizer.cpp +++ b/bitbots_motion/bitbots_quintic_walk/src/walk_stabilizer.cpp @@ -1,4 +1,4 @@ -#include "bitbots_quintic_walk/walk_stabilizer.hpp" +#include namespace bitbots_quintic_walk { diff --git a/bitbots_motion/bitbots_quintic_walk/src/walk_visualizer.cpp b/bitbots_motion/bitbots_quintic_walk/src/walk_visualizer.cpp index 273bb9a1a..5f1a1be0d 100644 --- a/bitbots_motion/bitbots_quintic_walk/src/walk_visualizer.cpp +++ b/bitbots_motion/bitbots_quintic_walk/src/walk_visualizer.cpp @@ -1,4 +1,4 @@ -#include "bitbots_quintic_walk/walk_visualizer.hpp" +#include namespace bitbots_quintic_walk { WalkVisualizer::WalkVisualizer(rclcpp::Node::SharedPtr node, walking::Params::Node::Tf tf_config) diff --git a/bitbots_motion/bitbots_splines/include/bitbots_splines/pose_spline.hpp b/bitbots_motion/bitbots_splines/include/bitbots_splines/pose_spline.hpp index 8da987b65..3056d72b5 100644 --- a/bitbots_motion/bitbots_splines/include/bitbots_splines/pose_spline.hpp +++ b/bitbots_motion/bitbots_splines/include/bitbots_splines/pose_spline.hpp @@ -10,8 +10,7 @@ #include #include #include - -#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" +#include namespace bitbots_splines { diff --git a/bitbots_motion/bitbots_splines/src/Spline/polynom.cpp b/bitbots_motion/bitbots_splines/src/Spline/polynom.cpp index 691dbcc7d..546526193 100644 --- a/bitbots_motion/bitbots_splines/src/Spline/polynom.cpp +++ b/bitbots_motion/bitbots_splines/src/Spline/polynom.cpp @@ -3,9 +3,8 @@ This code is largely based on the original code by Quentin "Leph" Rouxel and Tea The original files can be found at: https://github.com/Rhoban/model/ */ -#include "bitbots_splines/polynom.hpp" - -#include "bitbots_splines/newton_binomial.hpp" +#include +#include namespace bitbots_splines { diff --git a/bitbots_motion/bitbots_splines/src/Spline/pose_spline.cpp b/bitbots_motion/bitbots_splines/src/Spline/pose_spline.cpp index 3e8392cb7..55721fbc7 100644 --- a/bitbots_motion/bitbots_splines/src/Spline/pose_spline.cpp +++ b/bitbots_motion/bitbots_splines/src/Spline/pose_spline.cpp @@ -1,4 +1,4 @@ -#include "bitbots_splines/pose_spline.hpp" +#include namespace bitbots_splines { diff --git a/bitbots_motion/bitbots_splines/src/Spline/position_spline.cpp b/bitbots_motion/bitbots_splines/src/Spline/position_spline.cpp index c979e9c6f..e2716e929 100644 --- a/bitbots_motion/bitbots_splines/src/Spline/position_spline.cpp +++ b/bitbots_motion/bitbots_splines/src/Spline/position_spline.cpp @@ -1,4 +1,4 @@ -#include "bitbots_splines/position_spline.hpp" +#include namespace bitbots_splines { diff --git a/bitbots_motion/bitbots_splines/src/Spline/smooth_spline.cpp b/bitbots_motion/bitbots_splines/src/Spline/smooth_spline.cpp index 682eaa761..1a3f2cc86 100644 --- a/bitbots_motion/bitbots_splines/src/Spline/smooth_spline.cpp +++ b/bitbots_motion/bitbots_splines/src/Spline/smooth_spline.cpp @@ -3,11 +3,10 @@ This code is largely based on the original code by Quentin "Leph" Rouxel and Tea The original files can be found at: https://github.com/Rhoban/model/ */ -#include "bitbots_splines/smooth_spline.hpp" - #include #include +#include #include namespace bitbots_splines { @@ -98,7 +97,7 @@ Polynom SmoothSpline::polynomFit(double t, double pos_1, double vel_1, double ac std::string SmoothSpline::getDebugString() { std::string output; int i = 0; - for (auto &p : points_) { + for (const auto &p : points_) { output += "Point:" + std::to_string(i) + "\n"; output += " Time: " + std::to_string(p.time) + "\n"; output += " Pos: " + std::to_string(p.position) + "\n"; diff --git a/bitbots_motion/bitbots_splines/src/Spline/spline.cpp b/bitbots_motion/bitbots_splines/src/Spline/spline.cpp index c43037270..12a83b4a7 100644 --- a/bitbots_motion/bitbots_splines/src/Spline/spline.cpp +++ b/bitbots_motion/bitbots_splines/src/Spline/spline.cpp @@ -3,8 +3,7 @@ This code is largely based on the original code by Quentin "Leph" Rouxel and Tea The original files can be found at: https://github.com/Rhoban/model/ */ -#include "bitbots_splines/spline.hpp" - +#include #include #include diff --git a/bitbots_motion/bitbots_splines/src/Utils/combination.cpp b/bitbots_motion/bitbots_splines/src/Utils/combination.cpp index eb985e418..414aaf6bb 100644 --- a/bitbots_motion/bitbots_splines/src/Utils/combination.cpp +++ b/bitbots_motion/bitbots_splines/src/Utils/combination.cpp @@ -3,8 +3,7 @@ This code is largely based on the original code by Quentin "Leph" Rouxel and Tea The original files can be found at: https://github.com/Rhoban/model/ */ -#include "bitbots_splines/combination.hpp" - +#include #include #include diff --git a/bitbots_motion/bitbots_splines/src/Utils/newton_binomial.cpp b/bitbots_motion/bitbots_splines/src/Utils/newton_binomial.cpp index 5c8dcc641..543c19548 100644 --- a/bitbots_motion/bitbots_splines/src/Utils/newton_binomial.cpp +++ b/bitbots_motion/bitbots_splines/src/Utils/newton_binomial.cpp @@ -3,8 +3,7 @@ This code is largely based on the original code by Quentin "Leph" Rouxel and Tea The original files can be found at: https://github.com/Rhoban/model/ */ -#include "bitbots_splines/newton_binomial.hpp" - +#include #include namespace bitbots_splines { diff --git a/bitbots_navigation/bitbots_localization/include/bitbots_localization/ObservationModel.hpp b/bitbots_navigation/bitbots_localization/include/bitbots_localization/ObservationModel.hpp index 2f50bc044..0819c2e19 100644 --- a/bitbots_navigation/bitbots_localization/include/bitbots_localization/ObservationModel.hpp +++ b/bitbots_navigation/bitbots_localization/include/bitbots_localization/ObservationModel.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -18,8 +19,6 @@ #include #include -#include "localization_parameters.hpp" - namespace sm = sensor_msgs; namespace bl = bitbots_localization; namespace sv3dm = soccer_vision_3d_msgs; diff --git a/bitbots_navigation/bitbots_localization/include/bitbots_localization/Resampling.hpp b/bitbots_navigation/bitbots_localization/include/bitbots_localization/Resampling.hpp index 49c6dea46..b52b03e98 100644 --- a/bitbots_navigation/bitbots_localization/include/bitbots_localization/Resampling.hpp +++ b/bitbots_navigation/bitbots_localization/include/bitbots_localization/Resampling.hpp @@ -5,10 +5,10 @@ #ifndef IMPORTANCERESAMPLINGWE_H #define IMPORTANCERESAMPLINGWE_H -#include +#include +#include -#include "particle_filter/CRandomNumberGenerator.h" -#include "particle_filter/ImportanceResampling.h" +#include namespace bitbots_localization { // ImportanceResampling with explorers @@ -97,5 +97,5 @@ void ImportanceResamplingWE::resample(const ParticleList &sourceList, // template // void ParticleFilter::drawAllFromDistribution(const // std::shared_ptr>& distribution) { -}; // namespace bitbots_localization +}; // namespace bitbots_localization #endif // IMPORTANCERESAMPLINGWE_H diff --git a/bitbots_navigation/bitbots_localization/include/bitbots_localization/localization.hpp b/bitbots_navigation/bitbots_localization/include/bitbots_localization/localization.hpp index ee996992b..819187560 100644 --- a/bitbots_navigation/bitbots_localization/include/bitbots_localization/localization.hpp +++ b/bitbots_navigation/bitbots_localization/include/bitbots_localization/localization.hpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -57,8 +58,6 @@ #include #include -#include "localization_parameters.hpp" - namespace sm = sensor_msgs; namespace gm = geometry_msgs; namespace pf = particle_filter; diff --git a/bitbots_navigation/bitbots_localization/src/localization.cpp b/bitbots_navigation/bitbots_localization/src/localization.cpp index 9a9ac7884..c3cd2f8bd 100644 --- a/bitbots_navigation/bitbots_localization/src/localization.cpp +++ b/bitbots_navigation/bitbots_localization/src/localization.cpp @@ -1,5 +1,4 @@ -#include "bitbots_localization/localization.hpp" - +#include #include #include diff --git a/bitbots_navigation/bitbots_localization/src/map.cpp b/bitbots_navigation/bitbots_localization/src/map.cpp index 2f3c83491..dc63179cb 100644 --- a/bitbots_navigation/bitbots_localization/src/map.cpp +++ b/bitbots_navigation/bitbots_localization/src/map.cpp @@ -2,9 +2,8 @@ // Created by judith on 08.03.19. // -#include "bitbots_localization/map.hpp" - #include +#include #include namespace fs = boost::filesystem; diff --git a/bitbots_navigation/bitbots_odometry/include/bitbots_odometry/motion_odometry.hpp b/bitbots_navigation/bitbots_odometry/include/bitbots_odometry/motion_odometry.hpp index b734adb8b..e0b3fffc5 100644 --- a/bitbots_navigation/bitbots_odometry/include/bitbots_odometry/motion_odometry.hpp +++ b/bitbots_navigation/bitbots_odometry/include/bitbots_odometry/motion_odometry.hpp @@ -7,14 +7,13 @@ #include #include #include +#include #include #include #include #include #include -#include "odometry_parameters.hpp" - using std::placeholders::_1; namespace bitbots_odometry { diff --git a/scripts/deploy/tasks/build.py b/scripts/deploy/tasks/build.py index feb7f68c4..610d413d2 100644 --- a/scripts/deploy/tasks/build.py +++ b/scripts/deploy/tasks/build.py @@ -76,7 +76,7 @@ def _build(self, connections: Group) -> GroupResult: cmd = ( "sync;" f"cd {self._remote_workspace};" - "source /opt/ros/iron/setup.zsh;" + "source /opt/ros/jazzy/setup.zsh;" "ISOLATED_CPUS=\"$(grep -oP 'isolcpus=\\K([\\d-]+)' /proc/cmdline)\";" # type: ignore[reportInvalidStringEscapeSequence] f"chrt -r 1 taskset -c ${{ISOLATED_CPUS:-0-15}} colcon build --symlink-install {package_option} --continue-on-error || exit 1;" "sync;" diff --git a/scripts/robot_compile.py b/scripts/robot_compile.py index f8ade01d5..41321777e 100755 --- a/scripts/robot_compile.py +++ b/scripts/robot_compile.py @@ -374,7 +374,7 @@ def build(target, package="", pre_clean=False): cmd = ( "sync;" "cd {workspace};" - "source /opt/ros/iron/setup.zsh;" + "source /opt/ros/jazzy/setup.zsh;" "source install/setup.zsh;" "{cmd_clean}" "ISOLATED_CPUS=\"$(grep -oP 'isolcpus=\\K([\\d-]+)' /proc/cmdline)\";" @@ -408,7 +408,7 @@ def install_rosdeps(target): target_src_path = os.path.join(target.workspace, "src") extra_flags = "-q" if _should_run_quietly() else "" - cmd = f"rosdep install -y {extra_flags} --rosdistro iron --ignore-src --from-paths {target_src_path}" + cmd = f"rosdep install -y {extra_flags} --rosdistro jazzy --ignore-src --from-paths {target_src_path}" rosdep_result = _execute_on_target(target, cmd) if rosdep_result.returncode == 0: diff --git a/scripts/ros.plugin.sh b/scripts/ros.plugin.sh index 339c208a8..6ba9f121c 100644 --- a/scripts/ros.plugin.sh +++ b/scripts/ros.plugin.sh @@ -18,7 +18,7 @@ update_ros2_argcomplete() { eval "$(register-python-argcomplete ros2)" } -# Source the ROS 2 setup files if iron is installed +# Source the ROS 2 setup files if jazzy is installed if [[ -n "$distro" ]]; then source "/opt/ros/$distro/setup.$shell" &> /dev/null else diff --git a/scripts/setup.sh b/scripts/setup.sh index 4cb63208c..56154692e 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -2,7 +2,7 @@ set -eEuo pipefail # static/global variables -ROS_DISTRO=${ROS_DISTRO:-"iron"} +ROS_DISTRO=${ROS_DISTRO:-"jazzy"} DIR="$(dirname "$(readlink -f "$0")")" COLCON_WS="${COLCON_WS:-"$HOME/colcon_ws"}" REPO_URL="git@github.com:bit-bots/bitbots_main.git"