New Crowdin translations - zh-CN (#26553)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
PX4 Build Bot
2026-03-05 14:00:49 +11:00
committed by GitHub
co-authored by Crowdin Bot
parent 102b64f604
commit 62d0620eff
471 changed files with 4073 additions and 5684 deletions
+3 -3
View File
@@ -36,9 +36,9 @@ ROS 2 也可以使用 [MAVROS](https://github.com/mavlink/mavros/tree/ros2/mavro
- [ROS 2 用户指南](../ros2/user_guide.md): PX4 视角下的 ROS 2,包括安装、设置和如何构建与 PX4 通信的 ROS 2 应用。
- [ROS 2 离板控制实例](../ros2/offboard_control.md):一个 C++ 教程示例显示如何在 [离板模式] (../flight_modes/offboard.md) 中使用 ROS 2 节点进行位置控制。
- [ROS 2 多载具模拟](../ros2/multi_vehicle.md):通过单独的ROS2 代理商连接到多极PX4 模拟的说明。
- [PX4 ROS2 接口库](../ros2/px4_ros2_interface_lib.md):一个C++ 库,它与ROS2的 PX4 交互。
可以使用 ROS 2 创建和注册飞行模式,并从 ROS2 应用程序如VIO 系统发送位置估计数。
- [ROS 2 消息翻译节点](../ros2/px4_ros2_msg_translation_node.md):一个 ROS 2 消息翻译节点,它允许在 PX4 和 ROS 2 应用程序之间共享,这些应用程序被编译成不同的消息版本。
- [PX4 ROS 2 Interface Library](../ros2/px4_ros2_interface_lib.md): A C++ library that simplifies interacting with PX4 from ROS 2.
Can be used to create and register flight modes written using ROS2 and send position estimates from ROS2 applications such as a VIO system.
- [ROS 2 Message Translation Node](../ros2/px4_ros2_msg_translation_node.md): A ROS 2 message translation node that enables communication between PX4 and ROS 2 applications that were compiled with different sets of messages versions.
## 更多信息
+1 -1
View File
@@ -143,7 +143,7 @@ OffboardControlMode消息会持续发送,以便 PX4 切换到离板模式后
publish_offboard_control_mode() 和 publish_trajectory_setpoint() 这两个方法的实现代码如下所示。
这些方法会分别发布到 PX4 的 [OffboardControlMode](../msg_docs/OffboardControlMode.md和 [TrajectorySetpoint](../msg_docs/TrajectorySetpoint.md) 消息。
OffboardControlMode(离板控制模式)消息是必需的,其作用是告知 PX4 当前所使用的离板控制类型。
The `OffboardControlMode` is required in order to inform PX4 of the _type_ of offboard control being used.
此处我们仅使用位置控制,因此将 `position` 字段设为`true`,而所有其他字段均设为 `false`。
```cpp
+4
View File
@@ -7,6 +7,10 @@ Experimental
在撰写本文时,PX4 ROS 2 接口库的部分内容仍处于试验阶段,因此可能会发生变动。
:::
:::info
When using `rmw_zenoh`, the PX4 ROS 2 Interface Library requires ROS 2 Jazzy or later, and is not compatible with ROS 2 Humble or earlier.
:::
The [PX4 ROS 2 Interface Library](https://github.com/Auterion/px4-ros2-interface-lib) is a C++ library (with Python bindings) that simplifies controlling and interacting with PX4 from ROS 2.
该库为开发者提供了两个高级接口。
+12 -12
View File
@@ -100,14 +100,14 @@
:::tab C++
```c++
#include <0>
#include <1>
#include <2>
#include <3>
#include <string>
#include <rclcpp/rclcpp.hpp>
#include <px4_msgs/msg/vehicle_command.hpp>
#include <px4_msgs/msg/vehicle_attitude.hpp>
// Template function to get the message version suffix
// The correct message version is directly inferred from the message defintion
template <4>
// The correct message version is directly inferred from the message definition
template <typename T>
std::string getMessageNameVersion() {
if (T::MESSAGE_VERSION == 0) return "";
return "_v" + std::to_string(T::MESSAGE_VERSION);
@@ -117,13 +117,13 @@ class MinimalPubSub : public rclcpp::Node {
public:
MinimalPubSub() : Node("minimal_pub_sub") {
// Use template function to define the correct topics automatically
const std::string sub_topic = "/fmu/out/vehicle_attitude" + getMessageNameVersion<5>();
const std::string pub_topic = "/fmu/in/vehicle_command" + getMessageNameVersion<6>();
const std::string sub_topic = "/fmu/out/vehicle_attitude" + getMessageNameVersion<px4_msgs::msg::VehicleAttitude>();
const std::string pub_topic = "/fmu/in/vehicle_command" + getMessageNameVersion<px4_msgs::msg::VehicleCommand>();
_subscription = this->create_subscription<5>(
_subscription = this->create_subscription<px4_msgs::msg::VehicleAttitude>(
sub_topic, 10,
std::bind(&MinimalPubSub::attitude_callback, this, std::placeholders::_1));
_publisher = this->create_publisher<6>(pub_topic, 10);
_publisher = this->create_publisher<px4_msgs::msg::VehicleCommand>(pub_topic, 10);
}
private:
@@ -131,8 +131,8 @@ class MinimalPubSub : public rclcpp::Node {
RCLCPP_INFO(this->get_logger(), "Received attitude message.");
}
rclcpp::Publisher<6>::SharedPtr _publisher;
rclcpp::Subscription<5>::SharedPtr _subscription;
rclcpp::Publisher<px4_msgs::msg::VehicleCommand>::SharedPtr _publisher;
rclcpp::Subscription<px4_msgs::msg::VehicleAttitude>::SharedPtr _subscription;
};
```
@@ -104,7 +104,7 @@ Experimental
要发送位置测量数据,你需要用所测量的值填充位置结构体。
然后以此结构调用接口的更新功能作为参数。
关于如何使用此接口的基本示例,请在“Auterion/px4-ros2-interface-lib”仓库中查看 [examples](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/navigation) 例如[示例/cpp/navigation/local_navigation](https://github.com/Auterion/px4-ros2-interface-lib/blob/main/examples/cpp/navigation/local_navigation/include/local_navigation.hpp)或[示例/cpp/navigation/global_navigation](https://github.com/Auterion/px4-ros2-interface-lib/blob/main/examples/cpp/navigation/local_navigation/include/global_navigation.hpp)。
For a basic example of how to use this interface, check out the [examples](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/navigation) in the `Auterion/px4-ros2-interface-lib` repository, such as [examples/cpp/navigation/local_navigation](https://github.com/Auterion/px4-ros2-interface-lib/blob/main/examples/cpp/navigation/local_navigation/include/local_navigation.hpp) or [examples/cpp/navigation/global_navigation](https://github.com/Auterion/px4-ros2-interface-lib/blob/main/examples/cpp/navigation/global_navigation/include/global_navigation.hpp).
### 局部位置更新
@@ -223,7 +223,7 @@ private:
### 全局位置更新
首先确保正确配置 PX4 参数[`EKF2_EV_CTRL`](../advanced_config/parameter_reference.md#EKF2_AGP_CTRL)通过将相应的位设置为true,可以正确配置(系统)以融合外部全部测量数据:
First ensure that the PX4 [`EKF2_AGP_CTRLn`](../advanced_config/parameter_reference.md#EKF2_AGP0_CTRL) parameters are properly configured to fuse external global measurements, by setting the appropriate bits to `true`:
- `0`: 水平位置数据
- `1`:垂直位置数据
+2 -2
View File
@@ -9,7 +9,7 @@ ROS 2-PX4 架构在ROS 2和PX4之间进行了深度整合。 允许 ROS 2 订阅
[migration guide](../middleware/uxrce_dds.md#fast-rtps-to-uxrce-dds-migration-guidelines) 解释您需要做什么来将ROS2 应用程序从 PX4 v1.13 迁移到 PX4 v1.14。
如果您仍然在 PX4 v1.13 上工作,请按照[PX4 v1.13 Docs](https://docs.px4.io/v1.13/en/ros/ros2_comm.html)中的说明操作。
If you're still working on PX4 v1.13, please follow the instructions in the [PX4 v1.13 Docs](https://docs.px4.io/v1.13/en/ros/ros2_comm).
<!-- remove this when there are PX4 v1.14 docs for some months -->
@@ -137,7 +137,7 @@ make px4_sitl
2. 一些Python 依赖关系也必须安装 (使用 **`pip`** 或 **`apt`**):
```sh
pip install --user -U empy==3.3.4 pyros-genmsg setuptools
pip install --user -U empty==3.3.4 pyros-genmsg setuptools
```
### 配置微型 XRCE-DDS 代理与客户端