Skip to content

Commit

Permalink
ROS 2 Jazzy対応 (#494)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
HansRobo and pre-commit-ci[bot] authored Dec 1, 2024
1 parent e7ad9f9 commit d1d6c82
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 195 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
|| fromJSON('[ "ubuntu-latest" ]')
}}
timeout-minutes: 30
container: ghcr.io/ibis-ssl/crane:base
container: ros:${{ matrix.rosdistro }}
env:
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
matrix:
rosdistro: [humble]
rosdistro: [humble, jazzy]
steps:
- name: suppress warnings
run: |
Expand Down Expand Up @@ -52,6 +52,11 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install wget
run: |
sudo apt-get update
sudo apt-get install -y wget libcpprest-dev
- name: Clone dependency packages
run: |
mkdir -p dependency_ws
Expand All @@ -76,7 +81,6 @@ jobs:
run: |
. /opt/ros/${{ matrix.rosdistro }}/setup.sh
colcon build --event-handlers console_cohesion+ \
--packages-above-and-dependencies ${{ steps.get-modified-packages.outputs.modified-packages }} \
--cmake-args -DCMAKE_BUILD_TYPE=Release \
--mixin coverage-gcc coverage-pytest compile-commands
shell: bash
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/custom_dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"robocupssl",
"teleop",
"inplay",
"liborocos",
"matplotlibcpp",
"DPPS",
"consai",
Expand Down
Empty file added crane_gui/AMENT_IGNORE
Empty file.
7 changes: 5 additions & 2 deletions crane_local_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ find_package(rclcpp_components REQUIRED)
find_package(backward_ros REQUIRED)
ament_auto_find_build_dependencies()

ament_auto_add_library(${PROJECT_NAME}_component SHARED DIRECTORY src)
ament_auto_add_library(${PROJECT_NAME}_component SHARED
src/rvo2_planner.cpp
src/crane_local_planner.cpp
)

target_precompile_headers(${PROJECT_NAME}_component
PUBLIC
Expand All @@ -37,7 +40,7 @@ ament_auto_add_executable(${PROJECT_NAME}_node
src/${PROJECT_NAME}_node.cpp
)

include(/opt/ros/humble/share/backward_ros/cmake/BackwardConfig.cmake)
include(/opt/ros/$ENV{ROS_DISTRO}/share/backward_ros/cmake/BackwardConfig.cmake)
add_backward(${PROJECT_NAME}_node)

if(BUILD_TESTING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#include <crane_msgs/msg/robot_commands.hpp>
#include <crane_msgs/msg/world_model.hpp>
#include <functional>
#include <grid_map_ros/grid_map_ros.hpp>
// #include <grid_map_ros/grid_map_ros.hpp>
#include <memory>
#include <rclcpp/rclcpp.hpp>
#include <std_msgs/msg/float32.hpp>

#include "gridmap_planner.hpp"
// #include "gridmap_planner.hpp"
#include "rvo2_planner.hpp"
#include "simple_planner.hpp"
#include "visibility_control.h"
Expand All @@ -37,15 +37,16 @@ class LocalPlannerComponent : public rclcpp::Node
explicit LocalPlannerComponent(const rclcpp::NodeOptions & options)
: rclcpp::Node("local_planner", options)
{
declare_parameter("planner", "gridmap");
declare_parameter("planner", "rvo2");
auto planner_str = get_parameter("planner").as_string();

crane::ConsaiVisualizerBuffer::activate(*this);

process_time_pub = create_publisher<std_msgs::msg::Float32>("process_time", 10);
if (planner_str == "gridmap") {
planner = std::make_shared<GridMapPlanner>(*this);
} else if (planner_str == "simple") {
// if (planner_str == "gridmap") {
// planner = std::make_shared<GridMapPlanner>(*this);
// }
if (planner_str == "simple") {
planner = std::make_shared<SimplePlanner>(*this);
} else if (planner_str == "rvo2") {
planner = std::make_shared<RVO2Planner>(*this);
Expand Down
4 changes: 2 additions & 2 deletions crane_local_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<depend>consai_visualizer_msgs</depend>
<depend>crane_msg_wrappers</depend>
<depend>crane_msgs</depend>
<depend>grid_map_core</depend>
<depend>grid_map_ros</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>rvo2_vendor</depend>
<depend>std_msgs</depend>
<!-- <depend>grid_map_core</depend> -->
<!-- <depend>grid_map_ros</depend> -->

<test_depend>ament_lint_auto</test_depend>
<test_depend>crane_lint_common</test_depend>
Expand Down
16 changes: 0 additions & 16 deletions dependency_jazzy.repos
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,3 @@ repositories:
type: git
url: https://github.com/HansRobo/speak_ros_voicevox_plugin.git
version: main
grid_map:
type: git
url: https://github.com/ANYbotics/grid_map.git
version: humble
navigation2:
type: git
url: https://github.com/open-navigation/navigation2.git
version: main
gazebo_ros_pkgs:
type: git
url: https://github.com/ros-simulation/gazebo_ros_pkgs.git
version: ros2
slam_toolbox:
type: git
url: https://github.com/SteveMacenski/slam_toolbox.git
version: ros2
6 changes: 1 addition & 5 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ WORKDIR $ROS_OVERLAY/src
COPY . crane

RUN apt-get update && \
apt-get install -y wget ccache python3-pip ffmpeg&& \
wget https://launchpad.net/ubuntu/+archive/primary/+files/liborocos-bfl0.8_0.8.0-6_amd64.deb && \
wget https://launchpad.net/ubuntu/+archive/primary/+files/liborocos-bfl-dev_0.8.0-6_amd64.deb && \
apt-get install -y ./liborocos-bfl0.8_0.8.0-6_amd64.deb && \
apt-get install -y ./liborocos-bfl-dev_0.8.0-6_amd64.deb
apt-get install -y wget ccache python3-pip ffmpeg

RUN wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion utility/crane_lint_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>ament_cmake_clang_format</exec_depend>
<!-- <exec_depend>ament_cmake_clang_format</exec_depend>-->
<exec_depend>ament_cmake_copyright</exec_depend>
<exec_depend>ament_cmake_xmllint</exec_depend>
<!-- <exec_depend>ament_cmake_flake8</exec_depend>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#ifndef CRANE_MSG_WRAPPERS__GEOMETRY_WRAPPER_HPP_
#define CRANE_MSG_WRAPPERS__GEOMETRY_WRAPPER_HPP_

#include <bfl/filter/extendedkalmanfilter.h>

#include <geometry_msgs/msg/accel.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/pose2_d.hpp>
Expand All @@ -34,7 +32,6 @@ class Pose
explicit Pose(geometry_msgs::msg::Pose pose);
explicit Pose(geometry_msgs::msg::Pose2D pose);

MatrixWrapper::ColumnVector toColumnVector();
geometry_msgs::msg::Pose toROSPose();
geometry_msgs::msg::Pose2D toROSPose2D();
geometry2d::Pose transpose(geometry2d::Pose pose);
Expand Down Expand Up @@ -66,8 +63,6 @@ class Accel
Accel();
Accel(float x, float y, float theta);
explicit Accel(geometry_msgs::msg::Accel accel);

MatrixWrapper::ColumnVector toColumnVector();
};

class Point
Expand Down
2 changes: 0 additions & 2 deletions utility/crane_msg_wrappers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<depend>crane_msgs</depend>
<depend>eigen</depend>
<depend>geometry_msgs</depend>
<depend>liborocos-bfl</depend>
<depend>liborocos-bfl-dev</depend>
<depend>nav_msgs</depend>
<depend>range-v3</depend>
<depend>rclcpp</depend>
Expand Down
22 changes: 0 additions & 22 deletions utility/crane_msg_wrappers/src/geometry_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,6 @@ Pose::Pose(geometry_msgs::msg::Pose2D pose)
this->theta = pi2pi(this->theta);
}

MatrixWrapper::ColumnVector Pose::toColumnVector()
{
MatrixWrapper::ColumnVector column_vector(3);

column_vector(1) = this->x;
column_vector(2) = this->y;
column_vector(3) = this->theta;

return column_vector;
}

geometry_msgs::msg::Pose Pose::toROSPose()
{
geometry_msgs::msg::Pose msg;
Expand Down Expand Up @@ -165,17 +154,6 @@ Accel::Accel(geometry_msgs::msg::Accel accel)
this->theta = accel.angular.z;
}

MatrixWrapper::ColumnVector Accel::toColumnVector()
{
MatrixWrapper::ColumnVector column_vector(3);

column_vector(1) = this->x;
column_vector(2) = this->y;
column_vector(3) = this->theta;

return column_vector;
}

Odometry::Odometry() {}

Odometry::Odometry(Pose pose, Velocity velocity)
Expand Down
17 changes: 0 additions & 17 deletions utility/gridmap_to_image/.clang-format

This file was deleted.

24 changes: 0 additions & 24 deletions utility/gridmap_to_image/CMakeLists.txt

This file was deleted.

24 changes: 0 additions & 24 deletions utility/gridmap_to_image/package.xml

This file was deleted.

65 changes: 0 additions & 65 deletions utility/gridmap_to_image/src/gridmap_to_image_node.cpp

This file was deleted.

0 comments on commit d1d6c82

Please sign in to comment.