{"id":22511308,"url":"https://github.com/alvgaona/turtlesim-nav","last_synced_at":"2025-03-28T00:41:26.927Z","repository":{"id":242444591,"uuid":"809504426","full_name":"alvgaona/turtlesim-nav","owner":"alvgaona","description":"Navigation with TurtleSim :turtle:","archived":false,"fork":false,"pushed_at":"2024-11-30T23:12:58.000Z","size":898,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T02:29:03.376Z","etag":null,"topics":["cpp","navigation","ros2","ros2-humble","trajectory-generation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvgaona.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-06-02T21:45:54.000Z","updated_at":"2024-11-30T23:13:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0a2d6e1-9131-410a-89d3-049b1148bb4d","html_url":"https://github.com/alvgaona/turtlesim-nav","commit_stats":null,"previous_names":["alvgaona/turtlesim-follow-path","alvgaona/turtlesim-path-follower","alvgaona/turtle-nav","alvgaona/turtlesim-nav"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fturtlesim-nav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fturtlesim-nav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fturtlesim-nav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fturtlesim-nav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvgaona","download_url":"https://codeload.github.com/alvgaona/turtlesim-nav/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245949555,"owners_count":20698917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cpp","navigation","ros2","ros2-humble","trajectory-generation"],"created_at":"2024-12-07T02:11:01.241Z","updated_at":"2025-03-28T00:41:26.894Z","avatar_url":"https://github.com/alvgaona.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TurtleSim Nav\n\nhttps://github.com/user-attachments/assets/4f7f2ef3-c4e4-4324-9834-b4eed234d826\n\nThis project implements two robotic motion controllers using ROS2 and the `turtlesim` package.\nThe first controller enables point-to-point navigation, allowing the turtle to reach a desired target\nposition without following a predefined trajectory. It achieves this by continuously minimizing the\nerror between the current state and target position. This functionality is exposed through a ROS2\nservice named `/goto`, which accepts both the target goal coordinates and desired average speed\n(speed control pending implementation).\nThe second controller focuses on path tracking and is accessible via the `/follow_path` ROS2 service.\n\n## Model Predictive Control\n\nThe project utilizes a Nonlinear Model Predictive Control (NMPC) approach.\nWhile both controllers share a standard NMPC implementation as their foundation,\nthey differ in several key aspects of their operation and configuration.\n\nThe controller implementation relies on a mathematical unicycle model, which can be readily adapted\nto function as a differential-drive system.\n\nThe foundation for this implementation comes from a previous simulation that focused on mathematical\nmodel interactions specifically to compute the control input and to apply said input.\nFor more details, see this [post](https://alvgaona.com/posts/casadi-mpc-controller-0x4a3b/).\n\n## Visualization\n\nThe visualization in this project is powered by [Rerun](https://rerun.io/), which must be installed before running\nthe simulation. Once installed, the node utilizes Rerun to log and display data throughout\nthe simulation process.\n\n\u003e [!IMPORTANT]\n\u003e Please note that the 2D visualization's coordinate system is inverted compared\n\u003e to the turtlesim GUI coordinate system.\n\u003e Keep this in mind when interpreting the visual output.\n\n## Usage\n\nThe very first thing you'll need is [Pixi](https://pixi.sh/latest/).\nGo to their site and download it, of course, then install it.\n\nOnce installed, execute this in your command line while on the project's folder.\n\n```text\npixi install\n```\n\nThis will have all the dependencies installed on your machine but just locally.\nIt won't affect your system-level libraries or programs.\n\nNow build it.\n\n```text\npixi run build\n```\n\nYou're good to go now. Let's run it.\nOn one shell start up the nodes.\n\n```text\npixi run ros2 launch run.launch.py\n```\n\nAnd on another shell\n\n```text\npixi run ros2 service call \\\n  /turtle_nav/follow_path 'turtle_nav/srv/FollowPath' \\\n  \"{x: [5.544445, 9.0, 9.0], y: [5.544445, 7.0, 1.0], speed: 0.0}\"\n```\n\nYou can also choose to use the `/goto` service.\n\n```text\npixi run ros2 service call /turtle_nav/goto \\\n  'turtle_nav/srv/GoTo' \"{x: 1.0, y: 9.0, speed: 0.0}\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvgaona%2Fturtlesim-nav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvgaona%2Fturtlesim-nav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvgaona%2Fturtlesim-nav/lists"}