{"id":28284909,"url":"https://github.com/lin775533/ros_car_simulte","last_synced_at":"2026-01-25T22:31:14.883Z","repository":{"id":290706847,"uuid":"975296685","full_name":"Lin775533/ROS_Car_Simulte","owner":"Lin775533","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-30T05:25:19.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T18:49:46.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lin775533.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-30T05:05:39.000Z","updated_at":"2025-04-30T05:25:23.000Z","dependencies_parsed_at":"2025-04-30T06:29:37.746Z","dependency_job_id":"bc4b6b33-723b-4910-8d8e-206c52616374","html_url":"https://github.com/Lin775533/ROS_Car_Simulte","commit_stats":null,"previous_names":["lin775533/ros_car_simulte"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lin775533/ROS_Car_Simulte","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lin775533%2FROS_Car_Simulte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lin775533%2FROS_Car_Simulte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lin775533%2FROS_Car_Simulte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lin775533%2FROS_Car_Simulte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lin775533","download_url":"https://codeload.github.com/Lin775533/ROS_Car_Simulte/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lin775533%2FROS_Car_Simulte/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28760646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T20:56:06.009Z","status":"ssl_error","status_checked_at":"2026-01-25T20:54:48.203Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-21T18:16:05.689Z","updated_at":"2026-01-25T22:31:14.877Z","avatar_url":"https://github.com/Lin775533.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 ROS Motion Planning \u0026 Control\n\n\u003cdiv align=\"center\"\u003e\n\n![ROS Noetic](https://img.shields.io/badge/ROS-Noetic-blue?style=for-the-badge\u0026logo=ros)\n![Gazebo](https://img.shields.io/badge/Gazebo-11-orange?style=for-the-badge)\n![Python](https://img.shields.io/badge/Python-3.8+-green?style=for-the-badge\u0026logo=python)\n![TurtleBot3](https://img.shields.io/badge/TurtleBot3-Waffle_Pi-red?style=for-the-badge)\n\n\u003c/div\u003e\n\n## 📋 Overview\n\nThis repository contains implementation of motion planning and control algorithms for a TurtleBot3 robot using ROS and Gazebo simulation environment. The project focuses on:\n\n- PID controller implementation for precise robot navigation\n- Multiple control modes for robot movement\n- Trajectory planning and execution\n- Real-time pose monitoring and feedback\n\n## 🗂️ Repository Structure\n\n```\nLab3_YuChun_Lin_ws/\n├── build/                  # Build directory\n├── devel/                  # Development space\n├── src/                    # Source code\n│   ├── pid_controller/     # Main ROS package\n│   │   ├── src/\n│   │   │   ├── pid_controller.py     # PID implementation\n│   │   │   └── motion_planner.py     # Reference pose generator\n│   │   ├── CMakeLists.txt\n│   │   └── package.xml\n└── catkin_workspace        # Workspace configuration\n```\n\n## ⚙️ Implementation Details\n\n### PID Controller (`pid_controller.py`)\n\nThe PID controller implements two separate control loops:\n\n1. **Angular Velocity Controller**:\n   - Controls the robot's orientation\n   - Tunes robot turning to face target direction\n   - Parameters: Kp_angular, Ki_angular, Kd_angular\n\n2. **Linear Velocity Controller**:\n   - Controls the robot's forward movement\n   - Manages acceleration and deceleration\n   - Parameters: Kp_linear, Ki_linear, Kd_linear\n\n### Motion Planner (`motion_planner.py`)\n\nThe motion planner:\n- Takes user input for desired position (x, y, θ)\n- Publishes reference poses\n- Monitors robot progress\n- Supports two operation modes:\n  - **Mode 0**: Sequential control (rotate → move → rotate)\n  - **Mode 1**: Simultaneous position and orientation control\n\n## 🚀 Control Modes\n\n### Mode 0: Sequential Control\n\n\n\nControl sequence:\n1. First rotation to face target\n2. Linear movement to target position\n3. Final rotation to achieve target orientation\n\n### Mode 1: Simultaneous Control\n\n- Simultaneously controls both linear and angular velocities\n- Robot moves in curved trajectories\n- More efficient but potentially more complex control\n\n## 💻 How to Run\n\n1. **Start ROS master**:\n   ```bash\n   roscore\n   ```\n\n2. **Launch Gazebo simulation environment**:\n   ```bash\n   roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch\n   ```\n\n3. **Run PID controller node**:\n   ```bash\n   rosrun pid_controller pid_controller.py\n   ```\n\n4. **Run motion planner node**:\n   ```bash\n   rosrun pid_controller motion_planner.py\n   ```\n\n5. **Enter target coordinates when prompted**:\n   ```\n   Enter x goal: 2.0\n   Enter y goal: 3.0\n   Enter theta goal (radians): 1.57\n   Enter mode (0 or 1): 1\n   ```\n\n## 📊 Performance Metrics\n\nThe system achieves high precision in target acquisition:\n\n| Metric | Requirement | Achieved |\n|--------|-------------|----------|\n| Position Error | ≤ 0.1 meters | ✅ 0.05 meters |\n| Orientation Error | ≤ 0.1 radians | ✅ 0.07 radians |\n\n## 🔍 PID Tuning\n\nFor optimal performance, the PID parameters were tuned using the following approach:\n\n1. Set Ki and Kd to zero\n2. Increase Kp until system oscillates\n3. Add Kd for dampening\n4. Fine-tune Ki to eliminate steady-state error\n\nFinal parameters:\n\n```python\n# Angular Controller\nKp_angular = 1.5\nKi_angular = 0.01\nKd_angular = 0.5\n\n# Linear Controller\nKp_linear = 0.8\nKi_linear = 0.01\nKd_linear = 0.2\n```\n\n## 📌 Author\n\n**Yu-Chun Lin**  \nUniversity of California, Irvine  \nMaster of Embedded \u0026 Cyber-Physical Systems\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flin775533%2Fros_car_simulte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flin775533%2Fros_car_simulte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flin775533%2Fros_car_simulte/lists"}