{"id":23639092,"url":"https://github.com/alepuglisi/bicycle-feedback-linearization-ros","last_synced_at":"2025-11-09T17:30:14.842Z","repository":{"id":265425826,"uuid":"895977092","full_name":"AlePuglisi/bicycle-feedback-linearization-ros","owner":"AlePuglisi","description":"Odeint Simulation and Feedback linearization Control, for Trajectory tracking of a bicycle kinematic/dynamic model, in ROS Noetic","archived":false,"fork":false,"pushed_at":"2024-12-17T17:47:05.000Z","size":22564,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T08:12:15.275Z","etag":null,"topics":["feedback-controller","modeling","odeint","ros-noetic","simulation","trajectory-tracking"],"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/AlePuglisi.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}},"created_at":"2024-11-29T09:51:34.000Z","updated_at":"2024-12-17T17:47:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"20dbd0ad-a234-442b-93ad-087da349a2f7","html_url":"https://github.com/AlePuglisi/bicycle-feedback-linearization-ros","commit_stats":null,"previous_names":["alepuglisi/bicycle-feedbacklinearization-ros"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlePuglisi%2Fbicycle-feedback-linearization-ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlePuglisi%2Fbicycle-feedback-linearization-ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlePuglisi%2Fbicycle-feedback-linearization-ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlePuglisi%2Fbicycle-feedback-linearization-ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlePuglisi","download_url":"https://codeload.github.com/AlePuglisi/bicycle-feedback-linearization-ros/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239576801,"owners_count":19662112,"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":["feedback-controller","modeling","odeint","ros-noetic","simulation","trajectory-tracking"],"created_at":"2024-12-28T08:12:18.909Z","updated_at":"2025-11-09T17:30:14.046Z","avatar_url":"https://github.com/AlePuglisi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bicycle-feedback-linearization-ros\nROS Noetic | Odeint simulation | Control of mobile Robot | Trajectory Tracking | Feedback Linearization| Modeling \u003cbr/\u003e\n\nThis repository contains both the code and the report of the  final assignment of a course on [control of mobile robots](https://www11.ceda.polimi.it/schedaincarico/schedaincarico/controller/scheda_pubblica/SchedaPublic.do?\u0026evn_default=evento\u0026c_classe=837146\u0026lang=IT\u0026__pj0=0\u0026__pj1=8379d6c35eccfe1c998db9b2de7c0e1c).\n\n## Introduction \nIn this project, I developed a trajectory-tracking controller for a car-like robot, modeled with the bicycle model.\u003cbr/\u003e\n\n\u003cimage width=200 height=200 src=https://github.com/user-attachments/assets/24161273-1794-4659-938e-fbd22894d791\u003e\n\u003cimage width=500 height=200 src=https://github.com/user-attachments/assets/235a15a2-6b35-4652-baa5-c94485eeee07\u003e\n\nBoth kinematic and dynamic (linear and fiala tyre) models are analyzed. \u003cbr/\u003e\nThe control scheme is based on an inner feedback linearization (based on the kinematic model), transforming the system model to the canonical unicycle.\u003c/br\u003e \nThen an outer x and y PI independent velocity controllers regulate the system position, to track the reference trajectory. \n\n\u003cimage width=700 height=300 src=https://github.com/user-attachments/assets/1b9c50da-7dd6-49b0-9fb3-81b9586a44d3\u003e\n\nFor further details on the model equations and parameters, on the reference trajectory and on the control scheme, refer to my [report](https://github.com/AlePuglisi/bicycle-feedback-linearization-ros/blob/main/Trajectory_Tracking_Report.pdf)\n\n## Objective\nDefine bicycle model kinematic and dynamic equations, and implement a ROS-based simulation and control software. \u003cbr/\u003e\nUse it to tune the PI trajectory tracking controllers (for x,y position control) and analyze the performance. \u003cbr/\u003e\n(Notice that the feedback linearization law is based on the kinematic model, for the dynamic model, a perfect linearization is not possible in this way, and performances are not the best)\n\nIn this course, we focus on control and modeling, so instead of using classical simulators like Gazebo, we use C++ library [odeint](https://headmyshoulder.github.io/odeint-v2/) for explicit differential equation resolution. \n\n\nLook at the [assignment](https://github.com/AlePuglisi/bicycle-feedback-linearization-ros/blob/main/assignment.pdf) for more details.\n\n## Packages description\n\n\u003cimage width=700 height=200 src=https://github.com/user-attachments/assets/6ad6011d-76cf-4787-b158-0272aa942465\u003e\n\u003cbr/\u003e\n\nThe packages of this project are: \n\n- ``car_simulator``:\u003cbr/\u003e\nResponsible for kin/dyn model simulation.\n- ``car_traj_control``:\u003cbr/\u003e\nProvide the control feedback linearization + PI control law. \n\n\u003e[!NOTE]\n\u003e For a clean code, the executables are organized as follows:\u003cbr/\u003e\n\u003e Executables of ``car_simulator`` are:\n\u003e - \"simulator\", with the ROS node functions implementation\n\u003e - \"simulator\"_ode, with the modeling and odeint related functions\n\u003e - \"simulator\"_node, just initialize and run the node\u003cbr/\u003e\n\u003e\n\u003e Executables of ``car_traj_control`` are:\u003cbr/\u003e\n\u003e - car_fblin, implement feedback linearization\n\u003e - car_traj_control, ROS node functions implementation and control law computation\n\u003e - car_traj_control_node, just initialize and run the node\n\n\n## Run the Code\nFirst, clone this repo in your ros workspace \n```\ngit clone https://github.com/AlePuglisi/bicycle-feedback-linearization-ros.git\n```\nBuild and source your workspace, and you are ready to use it!\n\n```\n# Terminal 0, always remember roscore!\nroscore\n```\n\n- Simulation test:\u003cbr/\u003e\nTo test if the odeint simulator is working, car_test publishes some test commands to see if the system behaves as expected.\n   - **Kinematic** model: \n      ```\n      # Terminal 1\n      roslaunch car_simulator car_simulator_kin.launch\n      ```\n   - **Dynamic** model: \n      ```\n      # Terminal 1\n      roslaunch car_simulator car_simulator_dyn.launch\n      ```\n\n- Control:\n   - **Kinematic** model: \n      ```\n      # Terminal 1\n      roslaunch car_traj_control car_traj_control_kin.launch\n      ```\n   - **Dynamic Linear Tyre** model: \n      ```\n      # Terminal 1\n      roslaunch car_traj_control car_traj_control_dynlin.launch\n      ```\n   - **Dynamic Fiala Tyre** model: \n      ```\n      # Terminal 1\n      roslaunch car_traj_control car_traj_control_dynfiala.launch\n      ```\n\n- Performance analysis and plot:\u003cbr/\u003e\n\n   The Python [script](https://github.com/AlePuglisi/bicycle-feedback-linearization-ros/blob/main/car_traj_control/script/plot_result.py) to visualize robot xy-plane trajectory and useful insight signals over time, is based on       \n   ``rosbag`` readings, and ``matplotlib``.\n   \n   This script is executed by (being on the script folder): \n   ```\n   python3 plot_result.py \u003cbag_name\u003e\n   ```\n   \n   The argument \"bag_name\" refers to the name of a recorded bag over the whole simulation lifetime.\u003cbr/\u003e \n   This bag is saved in the same folder as this Python script. \n   (Some bags are already present there, and are the ones used for the report results)\n\n## Conclusion\n\nThis project provides ROS-based software for the simulation and trajectory control of a car-like robot through a bicycle model.\u003cbr/\u003e\nExperimenting with the PI control gains [here](https://github.com/AlePuglisi/bicycle-feedback-linearization-ros/tree/main/car_traj_control/config), can help to understand the effect of PI control law on a trajectory tracking controller.\u003cbr/\u003e\nAlso, this simulation approach is very different from the classical one but provides a white-box simulation approach for simple systems, that ensures its behavior.\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falepuglisi%2Fbicycle-feedback-linearization-ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falepuglisi%2Fbicycle-feedback-linearization-ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falepuglisi%2Fbicycle-feedback-linearization-ros/lists"}