Still in develop, shit code
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 检测。仍在开发中,尚未与裁判系统对接
-
ROS2 版本要求:
Humble
-
Gazebo 仿真器版本要求:
Fortress
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
-
启动仿真环境
ros2 launch rmul24_gazebo_simulator develop.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 #根据提示进行输入
-
运行裁判系统
ros2 run rmul24_gazebo_simulator simple_competition_1v1.py
弹丸伤害为 10,每个机器人HP为 500 ,直到 HP 为 0 时,裁判系统输出胜利者,程序退出。(可重新运行开始)
通过解析并处理攻击信息
/referee_system/attack_info
(包括射击者信息以及击中目标信息)实现裁判功能
-
mid360 改名为 livox_mid360
-
TF Tree 都加上命名空间
-
launch 中分离世界生成和机器人生成
本仿真包可以与 navigation2 结合使用,实现多机器人的导航功能。
Maintainer: Lihan Chen, lihanchen2004@163.com
rmul24_gazebo_simulator is provided under Apache License 2.0.