Skip to content

Commit

Permalink
🌈 style: Rename project from rmul24_gazebo_simulator to `rmu_gazebo…
Browse files Browse the repository at this point in the history
…_simulator`
  • Loading branch information
LihanChen2004 committed Jan 12, 2025
1 parent c775b36 commit d7358ae
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 27 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(rmul24_gazebo_simulator)
project(rmu_gazebo_simulator)

find_package(ament_cmake REQUIRED)

Expand All @@ -16,7 +16,7 @@ install(PROGRAMS
scripts/referee_system/simple_competition_1v1.py
DESTINATION lib/${PROJECT_NAME})

#environment
# environment
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/gazebo.dsv.in")

ament_package()
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# rmul24_gazebo_simulator

> **仍在开发中,更新频率较快且不稳定,不考虑向前兼容。请谨慎使用**
# rmu_gazebo_simulator

## 简介

rmul24_gazebo_simulator 是基于 Gazebo (Ignition 字母版本) 的仿真环境,为 RoboMaster University League 中的机器人算法开发提供仿真环境,方便测试 AI 算法,加快开发效率。
rmu_gazebo_simulator 是基于 Gazebo (Ignition 字母版本) 的仿真环境,为 RoboMaster University 中的机器人算法开发提供仿真环境,方便测试 AI 算法,加快开发效率。

目前 rmul24_gazebo_simulator 提供以下功能:
目前 rmu_gazebo_simulator 提供以下功能:

- RMUL2024、RMUC2024 仿真世界模型
- rmul_2024、rmuc_2024、rmuc_2025 仿真世界模型

- 网页端局域网联机对战

Expand All @@ -34,7 +32,7 @@ git clone https://github.com/SMBU-PolarBear-Robotics-Team/rmoss_interfaces.git
git clone https://github.com/SMBU-PolarBear-Robotics-Team/rmoss_core.git
git clone https://github.com/SMBU-PolarBear-Robotics-Team/rmoss_gazebo.git
git clone https://github.com/SMBU-PolarBear-Robotics-Team/rmoss_gz_resources.git --depth=1
git clone https://github.com/SMBU-PolarBear-Robotics-Team/rmul24_gazebo_simulator.git
git clone https://github.com/SMBU-PolarBear-Robotics-Team/rmu_gazebo_simulator.git
git clone https://github.com/SMBU-PolarBear-Robotics-Team/pb2025_robot_description.git

pip install xmacro
Expand All @@ -50,7 +48,7 @@ colcon build --symlink-install
- 启动仿真环境

```sh
ros2 launch rmul24_gazebo_simulator bringup_sim.launch.py
ros2 launch rmu_gazebo_simulator bringup_sim.launch.py
```

**注意:需要点击 Gazebo 左下角橙红色的 `启动` 按钮**
Expand Down Expand Up @@ -87,15 +85,15 @@ colcon build --symlink-install
<http://localhost:5000/>

```sh
python3 src/rmul24_gazebo_simulator/scripts/player_web/main_no_vision.py
python3 src/rmu_gazebo_simulator/scripts/player_web/main_no_vision.py
```

- 裁判系统端

<http://localhost:2350/>

```sh
python3 src/rmul24_gazebo_simulator/scripts/referee_web/main.py
python3 src/rmu_gazebo_simulator/scripts/referee_web/main.py
```

### 1.3 切换仿真世界
Expand All @@ -114,4 +112,4 @@ colcon build --symlink-install

Maintainer: Lihan Chen, <[email protected]>

rmul24_gazebo_simulator is provided under Apache License 2.0.
rmu_gazebo_simulator is provided under Apache License 2.0.
3 changes: 2 additions & 1 deletion launch/bringup_sim.launch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

import yaml
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
Expand All @@ -7,7 +8,7 @@


def generate_launch_description():
pkg_simulator = get_package_share_directory("rmul24_gazebo_simulator")
pkg_simulator = get_package_share_directory("rmu_gazebo_simulator")

gz_world_path = os.path.join(pkg_simulator, "config", "gz_world.yaml")
with open(gz_world_path, "r") as file:
Expand Down
5 changes: 3 additions & 2 deletions launch/gazebo.launch.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import (
AppendEnvironmentVariable,
DeclareLaunchArgument,
IncludeLaunchDescription,
AppendEnvironmentVariable,
)
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration, TextSubstitution
from launch_ros.actions import Node


def generate_launch_description():
pkg_simulator = get_package_share_directory("rmul24_gazebo_simulator")
pkg_simulator = get_package_share_directory("rmu_gazebo_simulator")

world_sdf_path = LaunchConfiguration("world_sdf_path")
ign_config_path = LaunchConfiguration("ign_config_path")
Expand Down
4 changes: 2 additions & 2 deletions launch/referee_system.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def generate_launch_description():
pkg_simulator = get_package_share_directory("rmul24_gazebo_simulator")
pkg_simulator = get_package_share_directory("rmu_gazebo_simulator")

referee_config_path = os.path.join(
pkg_simulator, "config", "referee_system_1v1.yaml"
Expand Down Expand Up @@ -35,7 +35,7 @@ def generate_launch_description():
)

referee_system = Node(
package="rmul24_gazebo_simulator",
package="rmu_gazebo_simulator",
executable="simple_competition_1v1.py",
namespace="referee_system",
parameters=[referee_config_path],
Expand Down
2 changes: 1 addition & 1 deletion launch/rviz.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def generate_launch_description():
arguments=[
"-d",
os.path.join(
get_package_share_directory("rmul24_gazebo_simulator"),
get_package_share_directory("rmu_gazebo_simulator"),
"rviz",
"visualize.rviz",
),
Expand Down
6 changes: 4 additions & 2 deletions launch/spawn_robots.launch.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os

import yaml
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import ExecuteProcess
from launch_ros.actions import Node
from nav2_common.launch import ReplaceString
from xmacro.xmacro4sdf import XMLMacro4sdf

from sdformat_tools.urdf_generator import UrdfGenerator


Expand All @@ -18,7 +20,7 @@ def generate_launch_description():
# https://github.com/ros2/launch_ros/issues/56
remappings = [("/tf", "tf"), ("/tf_static", "tf_static")]

pkg_simulator = get_package_share_directory("rmul24_gazebo_simulator")
pkg_simulator = get_package_share_directory("rmu_gazebo_simulator")
pkg_pb2025_robot_description = get_package_share_directory(
"pb2025_robot_description"
)
Expand Down
6 changes: 3 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<package format="2">
<name>rmul24_gazebo_simulator</name>
<name>rmu_gazebo_simulator</name>
<version>1.0.0</version>
<description>rmul24_gazebo_simulator</description>
<description>rmu_gazebo_simulator</description>

<maintainer email="[email protected]">Lihan Chen</maintainer>
<license>MIT</license>
<license>Apache-2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>

Expand Down
2 changes: 1 addition & 1 deletion sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Start ign simulation
source install/setup.sh

ros2 launch rmul24_gazebo_simulator bringup_sim.launch.py
ros2 launch rmu_gazebo_simulator bringup_sim.launch.py
2 changes: 1 addition & 1 deletion web_player.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Start player_web
source install/setup.sh

python3 src/rmul24_gazebo_simulator/scripts/player_web/main_no_vision.py
python3 src/rmu_gazebo_simulator/scripts/player_web/main_no_vision.py
2 changes: 1 addition & 1 deletion web_referee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Start referee_web
source install/setup.sh

python3 src/rmul24_gazebo_simulator/scripts/referee_web/main.py
python3 src/rmu_gazebo_simulator/scripts/referee_web/main.py

0 comments on commit d7358ae

Please sign in to comment.