From 254df06c2501c1c795dbfed311873fd0521a057c Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Sat, 22 Nov 2025 15:44:16 +0000 Subject: [PATCH] Add README.md --- README.en.md | 43 +++++++++++++++++++++++++++++++++++++++++++ README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 README.en.md create mode 100644 README.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..a5fb03f --- /dev/null +++ b/README.en.md @@ -0,0 +1,43 @@ +# Turtle Move Sample Project + +This project demonstrates a Turtle simulation control program based on ROS 2, including two example nodes: +- Random movement and chasing behavior +- Square trajectory motion + +## Features + +### Turtle Random Movement (turtle_run) +- Implements random movement control for Turtle 1 +- Includes automatic obstacle avoidance +- Simultaneously controls a second turtle for chasing +- Utilizes C++11 random number generators +- Incorporates timers and multithreaded control + +### Turtle Square Motion (turtle_square) +- Controls the turtle to trace a square path +- Precise time control +- State machine design (forward/turn) +- Fixed motion parameter configuration +- Simple timer-based control mechanism + +## Project Structure +- CMakeLists.txt: Build configuration file +- package.xml: ROS 2 package description file +- src/ + - turtle_run.cpp: Main program for random movement and chasing control + - turtle_square.cpp: Main program for square trajectory control + +## Dependencies +- ROS 2 (rclcpp) +- geometry_msgs +- turtlesim + +## Build and Run +1. Clone the project into your workspace +2. Execute `colcon build` +3. Run the examples: + - Random movement: `ros2 run turtle_package turtle_run` + - Square motion: `ros2 run turtle_package turtle_square` + +## License +This project is licensed under the Apache-2.0 License. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d54412 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Turtle Move 示例项目 + +本项目展示了基于ROS 2的海龟仿真控制程序,包含两个示例节点: +- 随机移动与追逐行为 +- 正方形轨迹运动 + +## 功能特性 + +### 海龟随机移动 (turtle_run) +- 实现海龟1的随机移动控制 +- 具备自动避障功能 +- 同时控制第二个海龟进行追逐 +- 使用C++11随机数生成器 +- 包含定时器和多线程控制 + +### 海龟正方形运动 (turtle_square) +- 控制海龟画出正方形轨迹 +- 精确的时间控制 +- 状态机设计(前进/转向) +- 固定运动参数配置 +- 简洁的定时控制机制 + +## 项目结构 +- CMakeLists.txt:构建配置文件 +- package.xml:ROS 2包描述文件 +- src/ + - turtle_run.cpp:随机移动与追逐控制主程序 + - turtle_square.cpp:正方形轨迹控制主程序 + +## 依赖要求 +- ROS 2 (rclcpp) +- geometry_msgs +- turtlesim + +## 构建与运行 +1. 在工作空间中克隆项目 +2. 执行 `colcon build` +3. 运行示例: + - 随机移动:`ros2 run turtle_package turtle_run` + - 正方形运动:`ros2 run turtle_package turtle_square` + +## 许可证 +本项目采用Apache-2.0 License。 \ No newline at end of file -- Gitee