Repository navigation
完成ros封装 - #4338
Closed
explorer1009 wants to merge 4 commits into
Closed
完成ros封装#4338explorer1009 wants to merge 4 commits into
explorer1009 wants to merge 4 commits into
Conversation
donghaiwang
reviewed
Dec 22, 2025
donghaiwang
reviewed
Dec 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
把基于airsim运行的代码放在一个文件夹下面,ros封装的是在另一个文件夹

主要改动概述:
通信核心替换:将底层通信库从
airsimAPI 替换为了rclpy,通过 ROS 2 节点与仿真环境交互。观测空间简化:移除了深度相机(图像)输入和复杂的
MultiInputPolicy,改为仅使用 1D 雷达数据的MlpPolicy以提高训练效率。动作执行方式:将 AirSim 的 API 函数调用(如
moveByVelocity...)改为了向/mavros/setpoint_velocity/cmd_vel_unstamped话题发布Twist速度指令。数据获取模式:从主动调用 API 获取数据(Polling)改为了订阅
/scan(雷达)和/mavros/local_position/pose(位置)话题的回调模式。重置逻辑重构:废弃了 AirSim 的一键重置接口,改为通过 ROS 服务(Service)调用来实现无人机的自动解锁(Arm)和模式切换(Offboard)。
坐标系适配:移除了 Unreal Engine 到 AirSim 的坐标转换计算,直接适配 Gazebo 的局部坐标系。