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

ROS 2 Jazzy対応 #80

Merged
merged 23 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7c4eb98
update 1 launch file to migrate from Ignition to Gazebo
KuraZuzu Sep 19, 2024
ac094ab
update APIs in "empty_world.sdf" to migrate from Ignition to Gazebo
KuraZuzu Sep 19, 2024
225bdb5
update APIs in "color_objects_world.sdf" to migrate from Ignition to …
KuraZuzu Sep 19, 2024
32a10c4
fix: missed updates in "color_objects_world.sdf" for migration from I…
KuraZuzu Sep 19, 2024
265b280
update APIs in "line_follower_field1.sdf" to migrate from Ignition to…
KuraZuzu Sep 19, 2024
e15da91
update "ROS_DISTRO" in "industrial_ci.yml" to migrate from Humble to …
KuraZuzu Sep 19, 2024
a53a4c6
update APIs in "lakehouse.sdf" to migrate from Ignition to Gazebo
KuraZuzu Sep 19, 2024
b6abb7c
replace "ignition-gui" to "gz-gui" in "gui.config" to from Ignition t…
KuraZuzu Sep 19, 2024
df3e416
Update README files for Jazzy
KuraZuzu Oct 23, 2024
e343ec3
Add Author
KuraZuzu Nov 20, 2024
005803b
Change CI syntax
KuraZuzu Nov 21, 2024
ae73fb6
Add CI settings with rosinstall
KuraZuzu Nov 21, 2024
ab6499e
Add supplements
KuraZuzu Nov 21, 2024
13de910
Add "$" for commands
KuraZuzu Nov 21, 2024
e45a668
Add note for other distoributions
KuraZuzu Nov 21, 2024
f58e8e4
Add notes for samples
KuraZuzu Nov 21, 2024
70c9f27
Fix link
KuraZuzu Nov 21, 2024
150b666
Adapted Jazzy code style
KuraZuzu Nov 21, 2024
0033cc8
Updated Copyright years
KuraZuzu Nov 21, 2024
afb1510
Add Author
KuraZuzu Nov 21, 2024
48e5324
Fix Indent and replace .h with .hpp for visibility_control
KuraZuzu Nov 22, 2024
a0f8f9a
Removed the '$' symbol at the beginning of the command.
KuraZuzu Nov 25, 2024
d2303ff
Replaced the branch name in the command from 'ros2' to 'jazzy'
KuraZuzu Nov 25, 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
4 changes: 4 additions & 0 deletions .github/workflows/.ci.rosinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- git:
uri: https://github.com/rt-net/raspimouse_description.git
local-name: raspimouse_description
version: jazzy
15 changes: 11 additions & 4 deletions .github/workflows/industrial_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@ on:
- 'docs/**'
- '**.md'
schedule:
- cron: "0 1 * * 2" # Weekly on Tuesdays at 01:00(GMT)
- cron: "0 2 * * 0" # Weekly on Sundays at 02:00

env:
UPSTREAM_WORKSPACE: .github/workflows/.ci.rosinstall

jobs:
industrial_ci:
strategy:
fail-fast: false
matrix:
env:
- { ROS_DISTRO: humble, ROS_REPO: ros }
ROS_DISTRO: [jazzy]
ROS_REPO: [main]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "ros-industrial/industrial_ci@master"
env: ${{ matrix.env }}
env:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}
ROS_REPO: ${{matrix.ROS_REPO}}
29 changes: 17 additions & 12 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,45 @@

# raspimouse_sim

[![industrial_ci](https://github.com/rt-net/raspimouse_sim/actions/workflows/industrial_ci.yml/badge.svg?branch=ros2)](https://github.com/rt-net/raspimouse_sim/actions/workflows/industrial_ci.yml)

ROS 2 package suite for Raspberry Pi Mouse Simulator runs on Gazebo

![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_color_objects_world.png)

## ROS 2 Package Status
**This branch is intended for ROS 2 Jazzy. For other distributions, please refer to the corresponding branches listed below.**

- ROS 2 Humble ([humble](https://github.com/rt-net/raspimouse_sim/tree/humble))

| main develop<br>(ros2)|Humble + Ubuntu Jammy<br>(humble-devel)|
|:---:|:---:|
|[![industrial_ci](https://github.com/rt-net/raspimouse_sim/workflows/industrial_ci/badge.svg?branch=ros2)](https://github.com/rt-net/raspimouse_sim/actions?query=branch%3Aros2+workflow%3Aindustrial_ci)|[![industrial_ci](https://github.com/rt-net/raspimouse_sim/workflows/industrial_ci/badge.svg?branch=humble-devel)](https://github.com/rt-net/raspimouse_sim/actions?query=branch%3Ahumble-devel+workflow%3Aindustrial_ci)|

## Requirements

requires the following to run:

* Ubuntu
* Ubuntu Jammy Jellyfish 22.04.*
* Ubuntu 24.04 Noble Numbat
* ROS 2
* ROS Humble Hawksbill
* ROS 2 Jazzy Jalisco
* Gazebo
* Ignition Gazebo 6.x
* Gazebo Sim 8.x
* ROS 2 Package
* ros-humble-desktop-full
* ros-jazzy-desktop-full

## Installation

Download this ROS 2 package.

```sh
cd ~/ros2_ws/src
git clone -b ros2 https://github.com/rt-net/raspimouse_sim.git
git clone -b jazzy https://github.com/rt-net/raspimouse_sim.git
```

Download the dependent ROS 2 packages.

```sh
cd ~/ros2_ws/src
git clone https://github.com/rt-net/raspimouse_ros2_examples.git
git clone -b ros2 https://github.com/rt-net/raspimouse_description.git
git clone -b jazzy https://github.com/rt-net/raspimouse_description.git
rosdep install -r -y -i --from-paths raspimouse*
```

Expand All @@ -61,6 +62,8 @@ ros2 launch raspimouse_gazebo raspimouse_with_emptyworld.launch.py

## Examples

These exsamples require [raspimouse_ros2_examples](https://github.com/rt-net/raspimouse_ros2_examples) to operate.

### Joystick Controll

Terminal 1:
Expand Down Expand Up @@ -93,7 +96,7 @@ ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_

![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_object_tracking.gif)

### camera_line_follower
### camera_line_follower

Terminal 1:

Expand Down Expand Up @@ -124,6 +127,8 @@ For information on parameters in camera line follower, click [here](https://gith

### SLAM & Navigation

This exsample requires [raspimouse_slam_navigation_ros2](https://github.com/rt-net/raspimouse_slam_navigation_ros2) to operate.

#### SLAM

Terminal 1:
Expand Down Expand Up @@ -191,7 +196,7 @@ The dae file is edited in Blender 4.0.

## License

This repository is licensed under the MIT license, see [LICENSE]( ./LICENSE ).
This repository is licensed under the MIT license, see [LICENSE]( ./LICENSE ).
Unless attributed otherwise, everything in this repository is under the MIT license.

### Acknowledgements
Expand Down
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
[English](README.en.md) | [日本語](README.md)

# raspimouse_sim
# raspimouse_sim

[![industrial_ci](https://github.com/rt-net/raspimouse_sim/actions/workflows/industrial_ci.yml/badge.svg?branch=ros2)](https://github.com/rt-net/raspimouse_sim/actions/workflows/industrial_ci.yml)

Gazebo上でシミュレートできるRaspberry Pi MouseのROS 2パッケージです。

![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_color_objects_world.png)

## ROS 2 Package Status
**本ブランチはROS 2 Jazzy向けです。他のディストリビューションについては、以下にリストされた対応するブランチを参照してください。**

| main develop<br>(ros2)|Humble + Ubuntu Jammy<br>(humble-devel)|
|:---:|:---:|
|[![industrial_ci](https://github.com/rt-net/raspimouse_sim/workflows/industrial_ci/badge.svg?branch=ros2)](https://github.com/rt-net/raspimouse_sim/actions?query=branch%3Aros2+workflow%3Aindustrial_ci)|[![industrial_ci](https://github.com/rt-net/raspimouse_sim/workflows/industrial_ci/badge.svg?branch=humble-devel)](https://github.com/rt-net/raspimouse_sim/actions?query=branch%3Ahumble-devel+workflow%3Aindustrial_ci)|
- ROS 2 Humble ([humble](https://github.com/rt-net/raspimouse_sim/tree/humble))

## 動作環境

以下の環境を前提として動作確認しています。

* Ubuntu
* Ubuntu Jammy Jellyfish 22.04.*
* Ubuntu 24.04 Noble Numbat
* ROS 2
* ROS Humble Hawksbill
* ROS 2 Jazzy Jalisco
* Gazebo
* Ignition Gazebo 6.x
* Gazebo Sim 8.x
* ROS 2 Package
* ros-humble-desktop-full
* ros-jazzy-desktop-full

## インストール方法

このROS 2パッケージをダウンロードします。

```sh
cd ~/ros2_ws/src
git clone -b ros2 https://github.com/rt-net/raspimouse_sim.git
git clone -b jazzy https://github.com/rt-net/raspimouse_sim.git
```

依存しているROS 2パッケージをインストールします。
Expand All @@ -40,7 +40,7 @@ git clone -b ros2 https://github.com/rt-net/raspimouse_sim.git
cd ~/ros2_ws/src
git clone https://github.com/rt-net/raspimouse_ros2_examples.git
git clone https://github.com/rt-net/raspimouse_slam_navigation_ros2.git
git clone -b ros2 https://github.com/rt-net/raspimouse_description.git
git clone -b jazzy https://github.com/rt-net/raspimouse_description.git
rosdep install -r -y -i --from-paths raspimouse*
```

Expand All @@ -62,6 +62,8 @@ ros2 launch raspimouse_gazebo raspimouse_with_emptyworld.launch.py

## サンプル動作例

各サンプルの動作には、[raspimouse_ros2_examples](https://github.com/rt-net/raspimouse_ros2_examples)が必要です。

### ジョイスティックコントローラによる操縦サンプル

端末1で次のコマンドを実行すると、Gazeboシミュレータが起動します。
Expand Down Expand Up @@ -122,6 +124,8 @@ ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: true, sw

### LiDARを用いたSLAMとNavigationのサンプル

本サンプルの動作には、[raspimouse_slam_navigation_ros2](https://github.com/rt-net/raspimouse_slam_navigation_ros2) が必要です。

#### SLAM

端末1で次のコマンドを実行すると、`Lake House`のモデルが配置されたワールドが表示されます。
Expand Down Expand Up @@ -193,10 +197,10 @@ daeファイルはBlender 4.0で編集しています。

## ライセンス

このリポジトリはMITライセンスに基づいて公開されています。
このリポジトリはMITライセンスに基づいて公開されています。
MITライセンスについては[LICENSE]( ./LICENSE )を確認してください。

※このソフトウェアは基本的にオープンソースソフトウェアとして「AS IS」(現状有姿のまま)で提供しています。本ソフトウェアに関する無償サポートはありません。
※このソフトウェアは基本的にオープンソースソフトウェアとして「AS IS」(現状有姿のまま)で提供しています。本ソフトウェアに関する無償サポートはありません。
バグの修正や誤字脱字の修正に関するリクエストは常に受け付けていますが、それ以外の機能追加等のリクエストについては社内のガイドラインを優先します。

### 謝辞
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright 2023 RT Corporation <support@rt-net.jp>
// Copyright 2023-2024 RT Corporation <support@rt-net.jp>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,12 +19,12 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


#ifndef RASPIMOUSE_FAKE__FAKE_RASPIMOUSE_COMPONENT_HPP_
#define RASPIMOUSE_FAKE__FAKE_RASPIMOUSE_COMPONENT_HPP_

#include <memory>
#include "raspimouse_fake/visibility_control.h"

#include "raspimouse_fake/visibility_control.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "rclcpp_lifecycle/lifecycle_publisher.hpp"
Expand All @@ -42,16 +42,16 @@ class Raspimouse : public rclcpp_lifecycle::LifecycleNode
private:
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr motor_power_service_;

rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
on_configure(const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
on_activate(const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
on_deactivate(const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
on_cleanup(const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
on_shutdown(const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_configure(
const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_activate(
const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_deactivate(
const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_cleanup(
const rclcpp_lifecycle::State &);
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_shutdown(
const rclcpp_lifecycle::State &);

void handle_motor_power(
const std::shared_ptr<rmw_request_id_t> request_header,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright 2023 RT Corporation <support@rt-net.jp>
// Copyright 2023-2024 RT Corporation <support@rt-net.jp>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,9 +19,8 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


#ifndef RASPIMOUSE_FAKE__VISIBILITY_CONTROL_H_
#define RASPIMOUSE_FAKE__VISIBILITY_CONTROL_H_
#ifndef RASPIMOUSE_FAKE__VISIBILITY_CONTROL_HPP_
#define RASPIMOUSE_FAKE__VISIBILITY_CONTROL_HPP_

#ifdef __cplusplus
extern "C"
Expand Down Expand Up @@ -63,4 +62,4 @@ extern "C"
}
#endif

#endif // RASPIMOUSE_FAKE__VISIBILITY_CONTROL_H_
#endif // RASPIMOUSE_FAKE__VISIBILITY_CONTROL_HPP_
5 changes: 2 additions & 3 deletions raspimouse_fake/src/fake_raspimouse_component.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright 2023 RT Corporation <support@rt-net.jp>
// Copyright 2023-2024 RT Corporation <support@rt-net.jp>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,11 +19,10 @@
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


#include "raspimouse_fake/fake_raspimouse_component.hpp"

#include "rclcpp/rclcpp.hpp"
#include "lifecycle_msgs/srv/change_state.hpp"
#include "rclcpp/rclcpp.hpp"
#include "std_srvs/srv/set_bool.hpp"

using namespace std::chrono_literals;
Expand Down
Loading