diff --git a/.github/workflows/.ci.rosinstall b/.github/workflows/.ci.rosinstall
new file mode 100644
index 0000000..62d26e6
--- /dev/null
+++ b/.github/workflows/.ci.rosinstall
@@ -0,0 +1,4 @@
+- git:
+ uri: https://github.com/rt-net/raspimouse_description.git
+ local-name: raspimouse_description
+ version: jazzy
diff --git a/.github/workflows/industrial_ci.yml b/.github/workflows/industrial_ci.yml
index 6a82f49..159c61a 100644
--- a/.github/workflows/industrial_ci.yml
+++ b/.github/workflows/industrial_ci.yml
@@ -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}}
\ No newline at end of file
diff --git a/README.en.md b/README.en.md
index 8cedc37..06c25c0 100644
--- a/README.en.md
+++ b/README.en.md
@@ -2,28 +2,29 @@
# 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
(ros2)|Humble + Ubuntu Jammy
(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
@@ -31,7 +32,7 @@ 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.
@@ -39,7 +40,7 @@ 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*
```
@@ -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:
@@ -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:
@@ -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:
@@ -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
diff --git a/README.md b/README.md
index eb8bec5..e8b4593 100644
--- a/README.md
+++ b/README.md
@@ -1,29 +1,29 @@
[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
(ros2)|Humble + Ubuntu Jammy
(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
## インストール方法
@@ -31,7 +31,7 @@ Gazebo上でシミュレートできるRaspberry Pi Mouseの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パッケージをインストールします。
@@ -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*
```
@@ -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シミュレータが起動します。
@@ -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`のモデルが配置されたワールドが表示されます。
@@ -193,10 +197,10 @@ daeファイルはBlender 4.0で編集しています。
## ライセンス
-このリポジトリはMITライセンスに基づいて公開されています。
+このリポジトリはMITライセンスに基づいて公開されています。
MITライセンスについては[LICENSE]( ./LICENSE )を確認してください。
-※このソフトウェアは基本的にオープンソースソフトウェアとして「AS IS」(現状有姿のまま)で提供しています。本ソフトウェアに関する無償サポートはありません。
+※このソフトウェアは基本的にオープンソースソフトウェアとして「AS IS」(現状有姿のまま)で提供しています。本ソフトウェアに関する無償サポートはありません。
バグの修正や誤字脱字の修正に関するリクエストは常に受け付けていますが、それ以外の機能追加等のリクエストについては社内のガイドラインを優先します。
### 謝辞
diff --git a/raspimouse_fake/include/raspimouse_fake/fake_raspimouse_component.hpp b/raspimouse_fake/include/raspimouse_fake/fake_raspimouse_component.hpp
index b440c57..98b25ef 100644
--- a/raspimouse_fake/include/raspimouse_fake/fake_raspimouse_component.hpp
+++ b/raspimouse_fake/include/raspimouse_fake/fake_raspimouse_component.hpp
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright 2023 RT Corporation
+// Copyright 2023-2024 RT Corporation
//
// 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
@@ -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
-#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"
@@ -42,16 +42,16 @@ class Raspimouse : public rclcpp_lifecycle::LifecycleNode
private:
rclcpp::Service::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 request_header,
diff --git a/raspimouse_fake/include/raspimouse_fake/visibility_control.h b/raspimouse_fake/include/raspimouse_fake/visibility_control.hpp
similarity index 91%
rename from raspimouse_fake/include/raspimouse_fake/visibility_control.h
rename to raspimouse_fake/include/raspimouse_fake/visibility_control.hpp
index 3ebe164..6468634 100644
--- a/raspimouse_fake/include/raspimouse_fake/visibility_control.h
+++ b/raspimouse_fake/include/raspimouse_fake/visibility_control.hpp
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright 2023 RT Corporation
+// Copyright 2023-2024 RT Corporation
//
// 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
@@ -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"
@@ -63,4 +62,4 @@ extern "C"
}
#endif
-#endif // RASPIMOUSE_FAKE__VISIBILITY_CONTROL_H_
+#endif // RASPIMOUSE_FAKE__VISIBILITY_CONTROL_HPP_
diff --git a/raspimouse_fake/src/fake_raspimouse_component.cpp b/raspimouse_fake/src/fake_raspimouse_component.cpp
index e4dd05f..911657e 100644
--- a/raspimouse_fake/src/fake_raspimouse_component.cpp
+++ b/raspimouse_fake/src/fake_raspimouse_component.cpp
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
-// Copyright 2023 RT Corporation
+// Copyright 2023-2024 RT Corporation
//
// 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
@@ -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;
diff --git a/raspimouse_gazebo/gui/gui.config b/raspimouse_gazebo/gui/gui.config
index 0d9558d..b971916 100644
--- a/raspimouse_gazebo/gui/gui.config
+++ b/raspimouse_gazebo/gui/gui.config
@@ -28,11 +28,11 @@
-
+
3D View
false
docked
-
+
ogre2
scene
@@ -43,82 +43,82 @@
-
+
floating
5
5
false
-
+
-
+
false
5
5
floating
false
-
+
-
+
false
5
5
floating
false
-
+
-
+
false
5
5
floating
false
-
+
-
+
false
5
5
floating
false
-
+
-
+
false
5
5
floating
false
-
+
-
+
false
5
5
floating
false
-
+
-
+
false
5
5
floating
false
-
+
-
+
World control
false
false
@@ -131,7 +131,7 @@
-
+
true
true
@@ -142,7 +142,7 @@
-
+
World stats
false
false
@@ -155,7 +155,7 @@
-
+
true
true
@@ -165,7 +165,7 @@
-
+
false
0
0
@@ -174,12 +174,12 @@
floating
false
#666666
-
+
-
+
false
250
0
@@ -188,12 +188,12 @@
floating
false
#666666
-
+
-
+
false
0
50
@@ -202,7 +202,7 @@
floating
false
#777777
-
+
false
@@ -210,7 +210,7 @@
-
+
false
250
50
@@ -219,12 +219,12 @@
floating
false
#777777
-
+
-
+
false
300
50
@@ -233,21 +233,21 @@
floating
false
#777777
-
+
-
+
false
docked
-
+
-
+
false
docked
-
+
diff --git a/raspimouse_gazebo/launch/raspimouse_with_color_objects.launch.py b/raspimouse_gazebo/launch/raspimouse_with_color_objects.launch.py
index 7336a13..f492282 100644
--- a/raspimouse_gazebo/launch/raspimouse_with_color_objects.launch.py
+++ b/raspimouse_gazebo/launch/raspimouse_with_color_objects.launch.py
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
-# Copyright 2023 RT Corporation
+# Copyright 2023-2024 RT Corporation
#
# 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
@@ -24,25 +24,26 @@
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
-from launch_ros.actions import SetParameter
from launch.launch_description_sources import PythonLaunchDescriptionSource
+from launch_ros.actions import SetParameter
def generate_launch_description():
world_file = os.path.join(
get_package_share_directory('raspimouse_gazebo'),
'worlds',
- 'color_objects_world.sdf')
+ 'color_objects_world.sdf',
+ )
world_launch = IncludeLaunchDescription(
- PythonLaunchDescriptionSource([
- get_package_share_directory('raspimouse_gazebo'),
- '/launch/raspimouse_with_emptyworld.launch.py']),
- launch_arguments={
- 'world_name': world_file
- }.items()
+ PythonLaunchDescriptionSource(
+ [
+ get_package_share_directory('raspimouse_gazebo'),
+ '/launch/raspimouse_with_emptyworld.launch.py',
+ ]
+ ),
+ launch_arguments={'world_name': world_file}.items(),
)
- return LaunchDescription([
- SetParameter(name='use_sim_time', value=True),
- world_launch
- ])
+ return LaunchDescription(
+ [SetParameter(name='use_sim_time', value=True), world_launch]
+ )
diff --git a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py
index fae5f85..6006882 100644
--- a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py
+++ b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
-# Copyright 2023 RT Corporation
+# Copyright 2023-2024 RT Corporation
#
# 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
@@ -22,75 +22,95 @@
import os
from ament_index_python.packages import get_package_share_directory
-from raspimouse_description.robot_description_loader import RobotDescriptionLoader
from launch import LaunchDescription
-from launch.actions import ExecuteProcess
from launch.actions import DeclareLaunchArgument
-from launch_ros.actions import SetParameter
-from launch_ros.actions import Node
+from launch.actions import ExecuteProcess
from launch.substitutions import LaunchConfiguration
+
from launch_ros.actions import ComposableNodeContainer
+from launch_ros.actions import Node
+from launch_ros.actions import SetParameter
from launch_ros.descriptions import ComposableNode
+from raspimouse_description.robot_description_loader import RobotDescriptionLoader
+
def generate_launch_description():
declare_arg_lidar = DeclareLaunchArgument(
'lidar',
default_value='none',
- description='Set "none", "urg", "lds", or "rplidar".')
+ description='Set "none", "urg", "lds", or "rplidar".',
+ )
declare_arg_lidar_frame = DeclareLaunchArgument(
- 'lidar_frame',
- default_value='laser',
- description='Set lidar link name.')
+ 'lidar_frame', default_value='laser', description='Set lidar link name.'
+ )
declare_arg_use_rgb_camera = DeclareLaunchArgument(
'use_rgb_camera',
default_value='false',
- description='Set "true" to mount rgb camera.')
+ description='Set "true" to mount rgb camera.',
+ )
declare_arg_camera_downward = DeclareLaunchArgument(
'camera_downward',
default_value='false',
- description='Set "true" to point the camera downwards.')
+ description='Set "true" to point the camera downwards.',
+ )
declare_arg_world_name = DeclareLaunchArgument(
'world_name',
- default_value=get_package_share_directory('raspimouse_gazebo')+'/worlds/empty_world.sdf',
- description='Set world name.')
+ default_value=get_package_share_directory('raspimouse_gazebo')
+ + '/worlds/empty_world.sdf',
+ description='Set world name.',
+ )
declare_arg_spawn_x = DeclareLaunchArgument(
- 'spawn_x',
- default_value='0.0',
- description='Set initial position x.')
+ 'spawn_x', default_value='0.0', description='Set initial position x.'
+ )
declare_arg_spawn_y = DeclareLaunchArgument(
- 'spawn_y',
- default_value='0.0',
- description='Set initial position y.')
+ 'spawn_y', default_value='0.0', description='Set initial position y.'
+ )
declare_arg_spawn_z = DeclareLaunchArgument(
- 'spawn_z',
- default_value='0.02',
- description='Set initial position z.')
-
- env = {'IGN_GAZEBO_SYSTEM_PLUGIN_PATH': os.environ['LD_LIBRARY_PATH'],
- 'IGN_GAZEBO_RESOURCE_PATH': os.path.dirname(
- get_package_share_directory('raspimouse_description')) + ':' +
- os.path.join(get_package_share_directory('raspimouse_gazebo'), 'models'),
- }
- gui_config = os.path.join(
- get_package_share_directory('raspimouse_gazebo'), 'gui', 'gui.config')
- ign_gazebo = ExecuteProcess(
- cmd=['ign gazebo -r', LaunchConfiguration('world_name'), '--gui-config', gui_config],
- output='screen',
- additional_env=env,
- shell=True
+ 'spawn_z', default_value='0.02', description='Set initial position z.'
+ )
+
+ env = {
+ 'GZ_SIM_SYSTEM_PLUGIN_PATH': os.environ['LD_LIBRARY_PATH'],
+ 'GZ_SIM_RESOURCE_PATH': os.path.dirname(
+ get_package_share_directory('raspimouse_description')
)
+ + ':'
+ + os.path.join(get_package_share_directory('raspimouse_gazebo'), 'models'),
+ }
+ gui_config = os.path.join(
+ get_package_share_directory('raspimouse_gazebo'), 'gui', 'gui.config'
+ )
+ gz_sim = ExecuteProcess(
+ cmd=[
+ 'gz sim -r',
+ LaunchConfiguration('world_name'),
+ '--gui-config',
+ gui_config,
+ ],
+ output='screen',
+ additional_env=env,
+ shell=True,
+ )
- ignition_spawn_entity = Node(
+ gz_spawn_entity = Node(
package='ros_gz_sim',
executable='create',
output='screen',
- arguments=['-topic', '/robot_description',
- '-name', 'raspimouse',
- '-x', LaunchConfiguration('spawn_x'),
- '-y', LaunchConfiguration('spawn_y'),
- '-z', LaunchConfiguration('spawn_z'),
- '-allow_renaming', 'true'],
+ arguments=[
+ '-topic',
+ '/robot_description',
+ '-name',
+ 'raspimouse',
+ '-x',
+ LaunchConfiguration('spawn_x'),
+ '-y',
+ LaunchConfiguration('spawn_y'),
+ '-z',
+ LaunchConfiguration('spawn_z'),
+ '-allow_renaming',
+ 'true',
+ ],
)
description_loader = RobotDescriptionLoader()
@@ -100,77 +120,85 @@ def generate_launch_description():
description_loader.use_rgb_camera = LaunchConfiguration('use_rgb_camera')
description_loader.camera_downward = LaunchConfiguration('camera_downward')
description_loader.gz_control_config_package = 'raspimouse_gazebo'
- description_loader.gz_control_config_file_path = 'config/raspimouse_controllers.yaml'
+ description_loader.gz_control_config_file_path = (
+ 'config/raspimouse_controllers.yaml'
+ )
robot_state_publisher = Node(
package='robot_state_publisher',
executable='robot_state_publisher',
output='screen',
- parameters=[{'robot_description': description_loader.load()}]
+ parameters=[{'robot_description': description_loader.load()}],
)
spawn_joint_state_broadcaster = ExecuteProcess(
- cmd=['ros2 run controller_manager spawner joint_state_broadcaster'],
- shell=True,
- output='screen',
- )
+ cmd=['ros2 run controller_manager spawner joint_state_broadcaster'],
+ shell=True,
+ output='screen',
+ )
spawn_diff_drive_controller = ExecuteProcess(
- cmd=['ros2 run controller_manager spawner diff_drive_controller'],
- shell=True,
- output='screen',
- )
+ cmd=['ros2 run controller_manager spawner diff_drive_controller'],
+ shell=True,
+ output='screen',
+ )
- rviz_config_file = get_package_share_directory(
- 'raspimouse_gazebo') + '/config/config.rviz'
+ rviz_config_file = (
+ get_package_share_directory('raspimouse_gazebo') + '/config/config.rviz'
+ )
rviz = Node(
- package="rviz2",
- executable="rviz2",
- name="rviz2",
- output="screen",
- arguments=["-d", rviz_config_file],
+ package='rviz2',
+ executable='rviz2',
+ name='rviz2',
+ output='screen',
+ arguments=['-d', rviz_config_file],
)
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
- arguments=['/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock',
- '/scan@sensor_msgs/msg/LaserScan@ignition.msgs.LaserScan',
- '/camera/color/image_raw@sensor_msgs/msg/Image@gz.msgs.Image',
- '/camera_info@sensor_msgs/msg/CameraInfo@gz.msgs.CameraInfo'],
- output='screen'
+ arguments=[
+ '/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock',
+ '/scan@sensor_msgs/msg/LaserScan@gz.msgs.LaserScan',
+ '/camera/color/image_raw@sensor_msgs/msg/Image@gz.msgs.Image',
+ '/camera_info@sensor_msgs/msg/CameraInfo@gz.msgs.CameraInfo',
+ ],
+ output='screen',
)
container = ComposableNodeContainer(
- name='fake_raspimouse_container',
- namespace='',
- package='rclcpp_components',
- executable='component_container_mt',
- composable_node_descriptions=[
- ComposableNode(
- package='raspimouse_fake',
- plugin='fake_raspimouse::Raspimouse',
- name='raspimouse'),
- ],
- output='screen',
- )
-
- return LaunchDescription([
- SetParameter(name='use_sim_time', value=True),
- declare_arg_lidar,
- declare_arg_lidar_frame,
- declare_arg_use_rgb_camera,
- declare_arg_camera_downward,
- declare_arg_world_name,
- declare_arg_spawn_x,
- declare_arg_spawn_y,
- declare_arg_spawn_z,
- ign_gazebo,
- ignition_spawn_entity,
- robot_state_publisher,
- spawn_joint_state_broadcaster,
- spawn_diff_drive_controller,
- rviz,
- bridge,
- container
- ])
+ name='fake_raspimouse_container',
+ namespace='',
+ package='rclcpp_components',
+ executable='component_container_mt',
+ composable_node_descriptions=[
+ ComposableNode(
+ package='raspimouse_fake',
+ plugin='fake_raspimouse::Raspimouse',
+ name='raspimouse',
+ ),
+ ],
+ output='screen',
+ )
+
+ return LaunchDescription(
+ [
+ SetParameter(name='use_sim_time', value=True),
+ declare_arg_lidar,
+ declare_arg_lidar_frame,
+ declare_arg_use_rgb_camera,
+ declare_arg_camera_downward,
+ declare_arg_world_name,
+ declare_arg_spawn_x,
+ declare_arg_spawn_y,
+ declare_arg_spawn_z,
+ gz_sim,
+ gz_spawn_entity,
+ robot_state_publisher,
+ spawn_joint_state_broadcaster,
+ spawn_diff_drive_controller,
+ rviz,
+ bridge,
+ container,
+ ]
+ )
diff --git a/raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py b/raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py
index 5952d12..b32bdab 100644
--- a/raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py
+++ b/raspimouse_gazebo/launch/raspimouse_with_lakehouse.launch.py
@@ -24,25 +24,24 @@
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
-from launch_ros.actions import SetParameter
from launch.launch_description_sources import PythonLaunchDescriptionSource
+from launch_ros.actions import SetParameter
def generate_launch_description():
world_file = os.path.join(
- get_package_share_directory('raspimouse_gazebo'),
- 'worlds',
- 'lakehouse.sdf')
+ get_package_share_directory('raspimouse_gazebo'), 'worlds', 'lakehouse.sdf'
+ )
world_launch = IncludeLaunchDescription(
- PythonLaunchDescriptionSource([
- get_package_share_directory('raspimouse_gazebo'),
- '/launch/raspimouse_with_emptyworld.launch.py']),
- launch_arguments={
- 'world_name': world_file
- }.items()
+ PythonLaunchDescriptionSource(
+ [
+ get_package_share_directory('raspimouse_gazebo'),
+ '/launch/raspimouse_with_emptyworld.launch.py',
+ ]
+ ),
+ launch_arguments={'world_name': world_file}.items(),
)
- return LaunchDescription([
- SetParameter(name='use_sim_time', value=True),
- world_launch
- ])
+ return LaunchDescription(
+ [SetParameter(name='use_sim_time', value=True), world_launch]
+ )
diff --git a/raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py b/raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py
index dae194a..36670d6 100644
--- a/raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py
+++ b/raspimouse_gazebo/launch/raspimouse_with_line_follower_field.launch.py
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
-# Copyright 2023 RT Corporation
+# Copyright 2023-2024 RT Corporation
#
# 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
@@ -24,28 +24,31 @@
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
-from launch_ros.actions import SetParameter
from launch.launch_description_sources import PythonLaunchDescriptionSource
+from launch_ros.actions import SetParameter
def generate_launch_description():
world_file = os.path.join(
get_package_share_directory('raspimouse_gazebo'),
'worlds',
- 'line_follower_field1.sdf')
+ 'line_follower_field1.sdf',
+ )
world_launch = IncludeLaunchDescription(
- PythonLaunchDescriptionSource([
- get_package_share_directory('raspimouse_gazebo'),
- '/launch/raspimouse_with_emptyworld.launch.py']),
+ PythonLaunchDescriptionSource(
+ [
+ get_package_share_directory('raspimouse_gazebo'),
+ '/launch/raspimouse_with_emptyworld.launch.py',
+ ]
+ ),
launch_arguments={
'world_name': world_file,
'spawn_x': '0.0',
'spawn_y': '0.0',
- 'spawn_z': '0.02'
- }.items()
+ 'spawn_z': '0.02',
+ }.items(),
)
- return LaunchDescription([
- SetParameter(name='use_sim_time', value=True),
- world_launch
- ])
+ return LaunchDescription(
+ [SetParameter(name='use_sim_time', value=True), world_launch]
+ )
diff --git a/raspimouse_gazebo/package.xml b/raspimouse_gazebo/package.xml
index ea94cdb..25ca559 100644
--- a/raspimouse_gazebo/package.xml
+++ b/raspimouse_gazebo/package.xml
@@ -9,6 +9,7 @@
Daisuke Sato
Yusuke Kato
+ Kazushi Kurasawa
ament_cmake
diff --git a/raspimouse_gazebo/worlds/color_objects_world.sdf b/raspimouse_gazebo/worlds/color_objects_world.sdf
index 91ca386..c7f8a9f 100644
--- a/raspimouse_gazebo/worlds/color_objects_world.sdf
+++ b/raspimouse_gazebo/worlds/color_objects_world.sdf
@@ -6,16 +6,16 @@
1.0
+ filename="gz-sim-physics-system"
+ name="gz::sim::systems::Physics">
+ filename="gz-sim-user-commands-system"
+ name="gz::sim::systems::UserCommands">
+ filename="gz-sim-scene-broadcaster-system"
+ name="gz::sim::systems::SceneBroadcaster">
diff --git a/raspimouse_gazebo/worlds/empty_world.sdf b/raspimouse_gazebo/worlds/empty_world.sdf
index 82f4da7..7548cc7 100644
--- a/raspimouse_gazebo/worlds/empty_world.sdf
+++ b/raspimouse_gazebo/worlds/empty_world.sdf
@@ -6,16 +6,16 @@
1.0
+ filename="gz-sim-physics-system"
+ name="gz::sim::systems::Physics">
+ filename="gz-sim-user-commands-system"
+ name="gz::sim::systems::UserCommands">
+ filename="gz-sim-scene-broadcaster-system"
+ name="gz::sim::systems::SceneBroadcaster">
diff --git a/raspimouse_gazebo/worlds/lakehouse.sdf b/raspimouse_gazebo/worlds/lakehouse.sdf
index b29eb53..dde7809 100644
--- a/raspimouse_gazebo/worlds/lakehouse.sdf
+++ b/raspimouse_gazebo/worlds/lakehouse.sdf
@@ -6,21 +6,21 @@
1.0
+ filename="gz-sim-physics-system"
+ name="gz::sim::systems::Physics">
+ filename="gz-sim-sensors-system"
+ name="gz::sim::systems::Sensors">
ogre2
+ filename="gz-sim-user-commands-system"
+ name="gz::sim::systems::UserCommands">
+ filename="gz-sim-scene-broadcaster-system"
+ name="gz::sim::systems::SceneBroadcaster">
diff --git a/raspimouse_gazebo/worlds/line_follower_field1.sdf b/raspimouse_gazebo/worlds/line_follower_field1.sdf
index 275ef4f..91f3a3e 100644
--- a/raspimouse_gazebo/worlds/line_follower_field1.sdf
+++ b/raspimouse_gazebo/worlds/line_follower_field1.sdf
@@ -6,16 +6,16 @@
1.0
+ filename="gz-sim-physics-system"
+ name="gz::sim::systems::Physics">
+ filename="gz-sim-user-commands-system"
+ name="gz::sim::systems::UserCommands">
+ filename="gz-sim-scene-broadcaster-system"
+ name="gz::sim::systems::SceneBroadcaster">
diff --git a/raspimouse_sim/package.xml b/raspimouse_sim/package.xml
index cfe26ce..457b4ea 100644
--- a/raspimouse_sim/package.xml
+++ b/raspimouse_sim/package.xml
@@ -10,6 +10,7 @@
Daisuke Sato
Yuki Watanabe
Yusuke Kato
+ Kazushi Kurasawa
ament_cmake