Skip to content

LihanChen2004/rmul24_gazebo_simulator

Repository files navigation

rmul24_gazebo_simulator

State-of-the-art Shitcode

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

简介

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

目前 rmul24_gazebo_simulator 还不完善,仅提供以下功能:

在 rmua19 标准机器人(rmua19_standard_robot)上增加相关传感器,构建不同机器人模型:

  • rmua19_standard_robot_a:搭载云台相机 industrial_camera 和搭载激光雷达 rplidar_a2,其中相机放置有在 yaw 轴。

  • rmua19_standard_robot_b:搭载云台相机 industrial_camera 和搭载激光雷达 rplidar_a2,其中相机放置有在 pitch 轴。

  • rmul24_sentry_robot:搭载云台相机 industrial_camera 和搭载激光雷达 rplidar_a2 和 Livox mid360,其中相机放置有在 pitch 轴

构建 RoboMaster University League 2024 简易场地 (models/rmul_2024):

  • 在 world 中使用 PerformerDetector 插件实现区域 RFID 检测。仍在开发与裁判系统对接中

构建 RoboMaster University Championship 2024 简易场地 (models/rmuc_2024)

一. 基本使用

1.1 环境配置

cd ~/ros_ws/src

git clone https://github.com/LihanChen2004/rmoss_interfaces.git
git clone https://github.com/LihanChen2004/rmoss_core.git
git clone https://github.com/LihanChen2004/rmoss_gazebo.git
git clone https://github.com/LihanChen2004/rmoss_gz_resources.git --depth=1
git clone https://github.com/gezp/sdformat_tools.git
git clone https://github.com/LihanChen2004/rmul24_gazebo_simulator.git

pip install xmacro
cd ..
colcon build --symlink-install -DCMAKE_BUILD_TYPE=Release

1.2 启动仿真环境

  • 启动仿真环境

    ros2 launch rmul24_gazebo_simulator bringup_sim.launch.py

    注意:需要点击 Gazebo 左下角橙红色的 启动 按钮

  • 控制机器人移动

    ros2 run rmoss_gz_base test_chassis_cmd.py --ros-args -r __ns:=/red_standard_robot1/robot_base -p v:=0.3 -p w:=0.3
    #根据提示进行输入,支持平移与自旋
  • 键盘控制:

    • 机器人云台

      ros2 run rmoss_gz_base test_gimbal_cmd.py --ros-args -r __ns:=/red_standard_robot1/robot_base
      #根据提示进行输入,支持绝对角度控制
    • 机器人射击

      ros2 run rmoss_gz_base test_shoot_cmd.py --ros-args -r __ns:=/red_standard_robot1/robot_base
      #根据提示进行输入
  • 网页端控制

    支持局域网内联机操作,只需要将 localhost 改为主机 ip 即可。

1.3 切换仿真世界

修改 gz_world.yaml 中的 world。当前可选: rmul_2024, rmuc_2024

配套导航仿真仓库

维护者及开源许可证

Maintainer: Lihan Chen, lihanchen2004@163.com

rmul24_gazebo_simulator is provided under Apache License 2.0.

About

Gazebo Simulator for RoboMaster University League 2024

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published