Skip to content

ROS 2 Jazzy対応 #80

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

Merged
merged 23 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 21 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}}
73 changes: 39 additions & 34 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,77 +2,80 @@

# 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
$ cd ~/ros2_ws/src
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コピペしやすいように、コマンドの先頭の$マークはなくて大丈夫です。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

各所での$記号を削除しました。

$ git clone -b ros2 https://github.com/rt-net/raspimouse_sim.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ブランチはros2よりjazzyのほうがよさそうなので修正をお願いしたいです(ros2ブランチが次のディストリビューションへ以降した際に修正が必要になってしまうので)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しました。

```

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
rosdep install -r -y -i --from-paths raspimouse*
$ 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
$ rosdep install -r -y -i --from-paths raspimouse*
```

Build this package using `colcon`.

```sh
cd ~/ros2_ws
colcon build --symlink-install
source ~/ros2_ws/install/setup.bash
$ cd ~/ros2_ws
$ colcon build --symlink-install
$ source ~/ros2_ws/install/setup.bash
```

## QuickStart

After building this package, run the following commands.

```sh
ros2 launch raspimouse_gazebo raspimouse_with_emptyworld.launch.py
$ 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:

```sh
ros2 launch raspimouse_gazebo raspimouse_with_emptyworld.launch.py
$ ros2 launch raspimouse_gazebo raspimouse_with_emptyworld.launch.py
```

Terminal 2:

```sh
ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js0" joyconfig:=f710 mouse:=false
$ ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js0" joyconfig:=f710 mouse:=false
```

![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_joystick.gif)
Expand All @@ -82,40 +85,40 @@ ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js
Terminal 1:

```sh
ros2 launch raspimouse_gazebo raspimouse_with_color_objects.launch.py use_rgb_camera:=true
$ ros2 launch raspimouse_gazebo raspimouse_with_color_objects.launch.py use_rgb_camera:=true
```

Terminal 2:

```sh
ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_camera_node:=false
$ ros2 launch raspimouse_ros2_examples object_tracking.launch.py mouse:=false use_camera_node:=false
```

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

### camera_line_follower
### camera_line_follower

Terminal 1:

```sh
ros2 launch raspimouse_gazebo raspimouse_with_line_follower_field.launch.py use_rgb_camera:=true camera_downward:=true
$ ros2 launch raspimouse_gazebo raspimouse_with_line_follower_field.launch.py use_rgb_camera:=true camera_downward:=true
```

Terminal 2:

```sh
ros2 launch raspimouse_ros2_examples camera_line_follower.launch.py mouse:=false use_camera_node:=false
$ ros2 launch raspimouse_ros2_examples camera_line_follower.launch.py mouse:=false use_camera_node:=false
```

Terminal 3: Start

```sh
ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: false, switch1: false, switch2: true}"
$ ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: false, switch1: false, switch2: true}"
```

Terminal 3: Stop
```sh
ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: true, switch1: false, switch2: false}"
$ ros2 topic pub --once /switches raspimouse_msgs/msg/Switches "{switch0: true, switch1: false, switch2: false}"
```

For information on parameters in camera line follower, click [here](https://github.com/rt-net/raspimouse_ros2_examples/blob/master/README.en.md#parameters).
Expand All @@ -124,29 +127,31 @@ 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:
```sh
ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg
$ ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg
```
The lidar option supports `urg`, `lds`, and `rplidar`.

Terminal 2:
```sh
ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js0" joyconfig:=f710 mouse:=false
$ ros2 launch raspimouse_ros2_examples teleop_joy.launch.py joydev:="/dev/input/js0" joyconfig:=f710 mouse:=false
```

Terminal 3:
```sh
ros2 launch raspimouse_slam pc_slam.launch.py
$ ros2 launch raspimouse_slam pc_slam.launch.py
```

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

Terminal 4:
```sh
ros2 run nav2_map_server map_saver_cli -f ~/MAP_NAME
$ ros2 run nav2_map_server map_saver_cli -f ~/MAP_NAME
```

![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_slam_short.gif)
Expand All @@ -155,13 +160,13 @@ ros2 run nav2_map_server map_saver_cli -f ~/MAP_NAME

Terminal 1:
```sh
ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg
$ ros2 launch raspimouse_gazebo raspimouse_with_lakehouse.launch.py lidar:=urg
```
The lidar option supports `urg`, `lds`, and `rplidar`.

Terminal 2:
```sh
ros2 launch raspimouse_navigation pc_navigation.launch.py map:=$HOME/MAP_NAME.yaml
$ ros2 launch raspimouse_navigation pc_navigation.launch.py map:=$HOME/MAP_NAME.yaml
```

![](https://rt-net.github.io/images/raspberry-pi-mouse/raspimouse_sim_navigation_short.gif)
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
Loading