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

Migrate to Jazzy #35

Merged
merged 28 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
41aaf93
Explicitly include catch2 from rmf_utils
luca-della-vedova Oct 10, 2024
6b87e54
ign -> gz and move to vendor packages
luca-della-vedova Oct 10, 2024
bf7cdb6
Fix yaml-cpp targets and use vendor package
luca-della-vedova Oct 10, 2024
d0cd333
Moveit2 migration
luca-della-vedova Oct 10, 2024
b4cf946
Lifecycle nodes migration
luca-della-vedova Oct 10, 2024
c6043e2
Address deprecated QoS warnings
luca-della-vedova Oct 10, 2024
e6ad64c
Bump zenoh to 1.0.0
luca-della-vedova Oct 10, 2024
d129d5f
Workaround for timer issue
luca-della-vedova Oct 17, 2024
dffcdd0
Search and replace iron / jazzy
luca-della-vedova Oct 18, 2024
0edd780
Comment failing test and add note
luca-della-vedova Oct 18, 2024
af0277a
Fix nexus_gazebo dependencies
luca-della-vedova Oct 18, 2024
663a298
Pin to rust version shipped in Ubuntu 24.04
luca-della-vedova Oct 18, 2024
e5bec62
Remove uncrustify from CI
luca-della-vedova Nov 19, 2024
9cd19f6
Migrate workcell editor action to Jazzy
luca-della-vedova Nov 19, 2024
8cc0eb1
Fix missing joint limits for motion planner test
luca-della-vedova Oct 10, 2024
be0865d
Fix including of moveit parameters
luca-della-vedova Oct 10, 2024
822ea75
Migrate to UR robots
luca-della-vedova Oct 17, 2024
f398956
Revert "Migrate to UR robots"
luca-della-vedova Nov 19, 2024
a40be9a
Jazzy branch for abb_ros2
luca-della-vedova Nov 19, 2024
ff23973
Readd abb.repos
luca-della-vedova Nov 19, 2024
b89f839
Remove custom OMPL config
luca-della-vedova Nov 19, 2024
ad609b7
Revert "Remove custom OMPL config"
luca-della-vedova Nov 19, 2024
6cc59f3
Install cargo via rosdep
luca-della-vedova Nov 20, 2024
90775ad
Use latest patch version of zenoh bridge
luca-della-vedova Nov 20, 2024
3d1a51d
Back to main for abb_ros2
luca-della-vedova Nov 20, 2024
817f5f1
Fix warnings in mocks
Yadunund Nov 20, 2024
195a57a
Update README
Yadunund Nov 21, 2024
ca6ef25
Change rmf_utils to build_depend
luca-della-vedova Nov 21, 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
6 changes: 1 addition & 5 deletions .github/workflows/nexus_integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
docker_image: ['ros:iron-ros-base']
docker_image: ['ros:jazzy-ros-base']
container:
image: ${{ matrix.docker_image }}
timeout-minutes: 60
steps:
- name: Install deps for Rust
run: |
apt update && apt install -y git curl libclang-dev
- name: Setup Rust for nexus_zenoh_bridge
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/nexus_workcell_editor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
docker_image: ['ros:iron-ros-base']
docker_image: ['ros:jazzy-ros-base']
container:
image: ${{ matrix.docker_image }}
timeout-minutes: 30
Expand All @@ -26,13 +26,17 @@ jobs:
- name: Install colcon cargo
run: |
cargo install --debug cargo-ament-build # --debug is faster to install
pip install git+https://github.com/colcon/colcon-cargo.git
pip install git+https://github.com/colcon/colcon-ros-cargo.git
pip install colcon-cargo --break-system-packages
pip install colcon-ros-cargo --break-system-packages
- uses: actions/checkout@v2
- name: vcs
# TODO(luca) Go back to cloning a tag when a new version is released with jazzy repos file
run: |
git clone https://github.com/ros2-rust/ros2_rust.git -b 0.4.0
vcs import . < ros2_rust/ros2_rust_iron.repos
git clone https://github.com/ros2-rust/ros2_rust.git
cd ros2_rust
git checkout f45a66f47dc727e3ccb13037a6c57923af1446c7
Yadunund marked this conversation as resolved.
Show resolved Hide resolved
cd ..
vcs import . < ros2_rust/ros2_rust_jazzy.repos
- name: rosdep
run: |
rosdep update
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
docker_image: ['ros:iron-ros-base']
docker_image: ['ros:jazzy-ros-base']
container:
image: ${{ matrix.docker_image }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: uncrustify
run: |
sudo apt update && sudo apt install -y ros-iron-rmf-utils
/ros_entrypoint.sh ament_uncrustify -c /opt/ros/iron/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp
# TODO(luca) reintroduce after formatting
#- name: uncrustify
# run: |
# sudo apt update && sudo apt install -y ros-jazzy-rmf-utils
# /ros_entrypoint.sh ament_uncrustify -c /opt/ros/jazzy/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp
- name: pycodestyle
run: |
sudo apt update && sudo apt install -y pycodestyle curl
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A ROS 2 framework which enables configuration and orchestration of process workf
For details on architecture and concepts [see](./docs/concepts.md).

## Requirements
* [ROS 2 Iron](https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html) on `Ubuntu 22.04`
* [ROS 2 Jazzy](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debians.html) on `Ubuntu 24.04`

## Setup

Expand All @@ -34,12 +34,12 @@ cd ~/ws_nexus/src/
git clone [email protected]:osrf/nexus
vcs import . < nexus/abb.repos
cd ~/ws_nexus
rosdep install --from-paths src --ignore-src --rosdistro iron -y -r
rosdep install --from-paths src --ignore-src --rosdistro jazzy -y -r
```

### Build the NEXUS workspace
```bash
source /opt/ros/iron/setup.bash
source /opt/ros/jazzy/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
```

Expand Down Expand Up @@ -103,10 +103,10 @@ The linter of choice is `uncrustify` and the configuration used may be reference
Instead of invoking `uncrustify` directly, use `ament_uncrustify` instead which is a wrapper around a specific version of `uncrustify`.
You may locally run the linter as follows
```bash
sudo apt update && sudo apt install -y ros-iron-rmf-utils # This is a one-time step
source /opt/ros/iron/setup.bash
sudo apt update && sudo apt install -y ros-jazzy-rmf-utils # This is a one-time step
source /opt/ros/jazzy/setup.bash
cd ~/ws_nexus/src/nexus
ament_uncrustify -c /opt/ros/iron/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp
ament_uncrustify -c /opt/ros/jazzy/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp
```
To automatically reformat the code, append `--reformat` to the `ament_uncrustify` line above.
It is highly recommended to audit the changes by the linter before committing.
Expand Down
13 changes: 7 additions & 6 deletions nexus_capabilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ if(BUILD_TESTING)
NAMES "rmf_code_style.cfg"
PATHS "${rmf_utils_DIR}/../../../../share/rmf_utils/")

ament_uncrustify(
ARGN include src
CONFIG_FILE ${uncrustify_config_file}
MAX_LINE_LENGTH 80
LANGUAGE CPP
)
# TODO(luca) Add uncrustify back after formatting
#ament_uncrustify(
# ARGN include src
# CONFIG_FILE ${uncrustify_config_file}
# MAX_LINE_LENGTH 80
# LANGUAGE CPP
#)
endif()

include(GNUInstallDirs)
Expand Down
13 changes: 7 additions & 6 deletions nexus_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ if(BUILD_TESTING)
NAMES "rmf_code_style.cfg"
PATHS "${rmf_utils_DIR}/../../../../share/rmf_utils/")

ament_uncrustify(
ARGN include src
CONFIG_FILE ${uncrustify_config_file}
MAX_LINE_LENGTH 80
LANGUAGE CPP
)
# TODO(luca) Add uncrustify back after formatting
#ament_uncrustify(
# ARGN include src
# CONFIG_FILE ${uncrustify_config_file}
# MAX_LINE_LENGTH 80
# LANGUAGE CPP
#)

# Adds a ament catch2 test with some common libraries.
# Usage: nexus_add_test(<target> <source>...)
Expand Down
2 changes: 1 addition & 1 deletion nexus_common/include/nexus_common/sync_service_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public: template<typename NodePtrT>
_cb_group(node->create_callback_group(rclcpp::CallbackGroupType::
MutuallyExclusive, false)),
_client(node->template create_client<ServiceT>(
service_name, rmw_qos_profile_services_default, this->_cb_group))
service_name, rclcpp::ServicesQoS(), this->_cb_group))
{
this->_executor.add_callback_group(this->_cb_group,
node->get_node_base_interface());
Expand Down
2 changes: 1 addition & 1 deletion nexus_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<depend>yaml-cpp</depend>

<build_depend>nexus_cmake</build_depend>
<build_depend>rmf_utils</build_depend>

<buildtool_depend>ament_cmake</buildtool_depend>

<test_depend>rmf_utils</test_depend>
<test_depend>ament_cmake_catch2</test_depend>
<test_depend>ament_cmake_uncrustify</test_depend>
<test_depend>example_interfaces</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion nexus_common/src/action_client_bt_node_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>
luca-della-vedova marked this conversation as resolved.
Show resolved Hide resolved

#include "nexus_common/action_client_bt_node.hpp"
#include "nexus_common_test/test_utils.hpp"
Expand Down
2 changes: 1 addition & 1 deletion nexus_common/src/batch_service_call_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>

#include "batch_service_call.hpp"
#include "nexus_common_test/test_utils.hpp"
Expand Down
2 changes: 1 addition & 1 deletion nexus_common/src/logging_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>

#include "logging.hpp"
#include "test_utils.hpp"
Expand Down
2 changes: 1 addition & 1 deletion nexus_common/src/main_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
*/

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>
2 changes: 1 addition & 1 deletion nexus_common/src/models/work_order_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>

#include "models/work_order.hpp"

Expand Down
2 changes: 1 addition & 1 deletion nexus_common/src/pausable_sequence_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>

#include "pausable_sequence.hpp"

Expand Down
2 changes: 1 addition & 1 deletion nexus_common/src/service_client_bt_node_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>

#include "nexus_common/service_client_bt_node.hpp"
#include "nexus_common_test/test_utils.hpp"
Expand Down
2 changes: 1 addition & 1 deletion nexus_common/src/sync_ros_client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <rmf_utils/catch.hpp>

#include "sync_service_client.hpp"
#include "test_utils.hpp"
Expand Down
7 changes: 4 additions & 3 deletions nexus_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

find_package(ament_cmake REQUIRED)
find_package(ignition-gazebo6 REQUIRED)
find_package(gz_sim_vendor REQUIRED)
find_package(gz-sim REQUIRED)
find_package(VRPN REQUIRED)

#===============================================================================
Expand All @@ -16,7 +17,7 @@ add_library(${PROJECT_NAME} SHARED
)

target_link_libraries(${PROJECT_NAME}
ignition-gazebo6::core
gz-sim::core
${VRPN_LIBRARIES}
)

Expand All @@ -27,7 +28,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
)

ament_target_dependencies(${PROJECT_NAME}
ignition-gazebo6
gz-sim
VRPN)


Expand Down
14 changes: 7 additions & 7 deletions nexus_gazebo/include/nexus_gazebo/Components.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
#define NEXUS_GAZEBO__COMPONENTS_HH_

#include <string>
#include <ignition/gazebo/components/Component.hh>
#include <ignition/gazebo/components/Factory.hh>
#include <ignition/gazebo/components/Serialization.hh>
#include <ignition/gazebo/config.hh>
#include <gz/sim/components/Component.hh>
#include <gz/sim/components/Factory.hh>
#include <gz/sim/components/Serialization.hh>
#include <gz/sim/config.hh>

namespace nexus_gazebo::components {
using MotionCaptureRigidBody = ignition::gazebo::components::Component<
using MotionCaptureRigidBody = gz::sim::components::Component<
std::string,
class MotionCaptureRigidBodyTag,
ignition::gazebo::serializers::StringSerializer>;
gz::sim::serializers::StringSerializer>;

IGN_GAZEBO_REGISTER_COMPONENT(
GZ_SIM_REGISTER_COMPONENT(
"nexus_gazebo.components.MotionCaptureRigidBody",
MotionCaptureRigidBody)

Expand Down
14 changes: 7 additions & 7 deletions nexus_gazebo/include/nexus_gazebo/MotionCaptureRigidBody.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
#include <memory>
#include <string>

#include <ignition/gazebo/config.hh>
#include <ignition/gazebo/System.hh>
#include <gz/sim/config.hh>
#include <gz/sim/System.hh>

namespace nexus_gazebo {

using Entity = ignition::gazebo::Entity;
using EntityComponentManager = ignition::gazebo::EntityComponentManager;
using EventManager = ignition::gazebo::EventManager;
using ISystemConfigure = ignition::gazebo::ISystemConfigure;
using System = ignition::gazebo::System;
using Entity = gz::sim::Entity;
using EntityComponentManager = gz::sim::EntityComponentManager;
using EventManager = gz::sim::EventManager;
using ISystemConfigure = gz::sim::ISystemConfigure;
using System = gz::sim::System;

/// \class MotionCaptureRigidBody
class MotionCaptureRigidBody :
Expand Down
20 changes: 10 additions & 10 deletions nexus_gazebo/include/nexus_gazebo/MotionCaptureSystem.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@
#include <unordered_map>
#include <vector>

#include <ignition/gazebo/config.hh>
#include <ignition/gazebo/System.hh>
#include <gz/sim/config.hh>
#include <gz/sim/System.hh>

#include "vrpn_Connection.h"
#include "vrpn_ConnectionPtr.h"
#include "vrpn_Tracker.h"

namespace nexus_gazebo {

using Entity = ignition::gazebo::Entity;
using EntityComponentManager = ignition::gazebo::EntityComponentManager;
using EventManager = ignition::gazebo::EventManager;
using ISystemConfigure = ignition::gazebo::ISystemConfigure;
using ISystemPostUpdate = ignition::gazebo::ISystemPostUpdate;
using Pose3d = ignition::math::Pose3d;
using System = ignition::gazebo::System;
using UpdateInfo = ignition::gazebo::UpdateInfo;
using Entity = gz::sim::Entity;
using EntityComponentManager = gz::sim::EntityComponentManager;
using EventManager = gz::sim::EventManager;
using ISystemConfigure = gz::sim::ISystemConfigure;
using ISystemPostUpdate = gz::sim::ISystemPostUpdate;
using Pose3d = gz::math::Pose3d;
using System = gz::sim::System;
using UpdateInfo = gz::sim::UpdateInfo;

class RigidBodyTracker : public vrpn_Tracker
{
Expand Down
4 changes: 2 additions & 2 deletions nexus_gazebo/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<depend>rclcpp</depend>
<depend>vrpn</depend>

<depend condition="$GZ_VERSION == '' and $IGNITION_VERSION == ''">ignition-gazebo6</depend>
<depend condition="$GZ_VERSION == '' and $IGNITION_VERSION == ''">ignition-math6</depend>
<depend>gz_sim_vendor</depend>
<depend>gz_math_vendor</depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
10 changes: 5 additions & 5 deletions nexus_gazebo/src/MotionCaptureRigidBody.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include "nexus_gazebo/MotionCaptureRigidBody.hh"
#include "nexus_gazebo/Components.hh"

#include <ignition/plugin/RegisterMore.hh>
#include <ignition/gazebo/components/Name.hh>
#include <ignition/gazebo/components/ParentEntity.hh>
#include <gz/plugin/RegisterMore.hh>
#include <gz/sim/components/Name.hh>
#include <gz/sim/components/ParentEntity.hh>

constexpr const char* kRigidBodyLabel = "rigid_body_label";

Expand All @@ -41,15 +41,15 @@ void MotionCaptureRigidBody::Configure(
// In the case that the user hasn't overridden the label, then use
// the name of the entity we are attached to.
this->rigid_body_label =
_ecm.Component<ignition::gazebo::components::Name>(_entity)->Data();
_ecm.Component<gz::sim::components::Name>(_entity)->Data();
}

_ecm.CreateComponent<components::MotionCaptureRigidBody>(_entity,
components::MotionCaptureRigidBody(this->rigid_body_label));
}
} // namespace nexus_gazebo

IGNITION_ADD_PLUGIN(
GZ_ADD_PLUGIN(
nexus_gazebo::MotionCaptureRigidBody,
nexus_gazebo::System,
nexus_gazebo::MotionCaptureRigidBody::ISystemConfigure);
Loading
Loading