{"id":28822134,"url":"https://github.com/saxijing/zeus","last_synced_at":"2026-04-24T20:34:39.807Z","repository":{"id":293219222,"uuid":"903340594","full_name":"saxijing/zeus","owner":"saxijing","description":"autonomous vehicle control with LQR and PID controller","archived":false,"fork":false,"pushed_at":"2025-05-22T02:20:45.000Z","size":48855,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T23:02:24.471Z","etag":null,"topics":["carla","cpp","frenet-cartesian","lqr-controller","opendrive","openscenario","pid-controller","ros"],"latest_commit_sha":null,"homepage":"","language":"C++","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/saxijing.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":"2024-12-14T11:00:00.000Z","updated_at":"2025-06-06T14:29:22.000Z","dependencies_parsed_at":"2025-06-18T23:02:16.607Z","dependency_job_id":"a0c680de-f262-4ec6-a0a3-ab14d8ed8d58","html_url":"https://github.com/saxijing/zeus","commit_stats":null,"previous_names":["saxijing/zeus"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saxijing/zeus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saxijing%2Fzeus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saxijing%2Fzeus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saxijing%2Fzeus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saxijing%2Fzeus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saxijing","download_url":"https://codeload.github.com/saxijing/zeus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saxijing%2Fzeus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32239936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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":["carla","cpp","frenet-cartesian","lqr-controller","opendrive","openscenario","pid-controller","ros"],"created_at":"2025-06-18T23:02:01.739Z","updated_at":"2026-04-24T20:34:39.802Z","avatar_url":"https://github.com/saxijing.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zeus READ ME\n# 0 Results\n\nCarla simulation results of Zeus controller as following:\n\n\u003cdiv align=center\u003e \u003cimg src=\"https://github.com/saxijing/zeus/blob/main/zeus_controller/data/display_materials/lqr_control_carla_sim.gif\" width=700\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eFig.1 Zeus Controller's Carla simulation results\u003c/p\u003e\n\n\u003cdiv align=center\u003e \u003cimg src=\"https://github.com/saxijing/zeus/blob/main/zeus_controller/data/display_materials/lqr_control_trajectory.png\" width=900\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eFig.2 Comparison diagram of ego vehicle trajectory and reference trajectory\u003c/p\u003e\n\nCombining Fig.1 and Fig.2, the ego vehicle controlled by the **Zeus controller** basically drives along the target trajectory. There is only a significant error in the section where the curvature of the target trajectory changes greatly, but it is still within the allowable range. The following are the specific error values.\n\n\u003cdiv align=center\u003e \u003cimg src=\"https://github.com/saxijing/zeus/blob/main/zeus_controller/data/display_materials/lqr_control_error_a%3D1.62.png\" width=1500\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eFig.3 Zeus controller error\u003c/p\u003e\n\n\u003cdiv align=center\u003e \u003cimg src=\"https://github.com/saxijing/zeus/blob/main/zeus_controller/data/display_materials/lqr_control_road_curv.png\" width=600\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eFig.4 Reference trajectory curvature\u003c/p\u003e\n\nCombining Fig.3 and Fig.4, simulation conclusions are as following:\n\n(1) On road segments with **a curvature of less than $0.1 m^{-1}$**, the **lateral distance errors are within centimeters**, and the **yaw angle errors are within $0.1 ^ {\\circ}$**;\n\n(2) On road segments with **a curvature greater than $0.1 m^{-1}$ or where the curvature changes abruptly**, the **lateral distance errors range from $-1 \\sim 1.5m$**, and the **yaw angle errors are within $\\pm2 ^{\\circ}$**.\n\n**Tab.1 Average Errors of Coordinate Transformation**\n\n|distance error(m) |yaw_angle error($^。$) |curvature error($m^{-1}$) |velocity error(m/s) |acceleration error(%) |\n|:------:|:------:|:------:|:------:|:------:|\n|0.2|7.4|0|$9 \\times 10 ^{-4}$|58.3|\n\nAbove Table 1 presents the average errors (across 12 test cases) of the Cartesian coordinate values $(x, y, yaw, curv, v, a)$ after a two -step **Cartesian -\u003e Frenet -\u003e Cartesian** transformation comapred to the original values.\nThe results show that the **distance error, yaw error, curvature error, and velocity error all remain within acceptable tolerances**. However, **acceleration transformation is significantly affected by road curvature**, leading to unacceptably large errors at a part of sampling points where the **raidus of curvature is below 60m**. Consequently, the accuracy rate of acceleration transformation is **58.3%**.\n\n# 1 Local Path of Repository\nInstall carla ROS Bridge in Ubuntu environment, and then clone the repository to the \"carla-ros-bridge/catkin_ws/src/ros-bridge\" directory.\n\n# 2 Introduction to Zeus Project\n\n## 2.1 Introduction to each ROS package\n\n* __carla_sensor_result:__ Python ROS node, used to obtain information in the Carla simulator, including ego vehicle's state, obstacle information, etc.\n* __zeus_common:__ C++ ROS package, implemented some class and function definitions shared by planner and controller modules, including the representation of ego vehicle and object, coordinate system transformation, etc.\n* __zeus_library:__  C++ static library, which is the functions' implementation of zeus_common.\n* __zeus_config:__ It stores some configuration files to facilitate the reading of ROS nodes, which can avoid multiple compilations during debugging and test.\n* __zeus_launch:__ launch files for each module.\n* __zeus_display:__ C++ ROS node, used to receive and publish relevant information to display in rviz.\n* __zeus_calibration:__ C++ ROS node, used to calibrate velocity and acceleration in different threshold and brake, make threshold-brake table for longitudinal control. The calibration results are stored in this directory \"zeus/zeus_controller/data/pid_control\".\n* __zeus_controller:__ C++ ROS node, including LQR controller based on vehicle dynamics for lateral control, and PID controller based on segmented control strategy for longitudinal control\n* __scenario_files:__ .xosc files, scenario files  used in simulation.\n\n## 2.2 Project Architecture\n\nIn order to be closer to real-world vehicle operating environment, this project employs C++ code programming and utilizes ROS for inter process communication, relying on Carla simulator to complete verification. The overall architecture and data flow diagram of the project are illustrated in Fig.5.The Carla simulator operates the scenario file to provide simulation environment, while the library named carla-ros-bridge connects the Carla simulation environment with ROS nodes.\n\nThe **carla_sensor_result node** simulates sensor acquisition of the ego vehicle state and surrounding environment information, publishing these as ROS messages. The **zeus_controller node**, serving as the core module of this project, subscribes ego vehicle state, processes it through the **LQR Controller** and **PID Controller**, and publishes control signals including throttle, brake, and steer. Upon subscribing these control signals, the carla-ros-bridge updates the ego vehicle pose within Carla, thereby completing the control loop.\n\nTo enhance the zeus_controller's responsiveness, certain computations -- such as the LQR feedback matrix K and throttle-brake calibration table -- are precomputed offline. During real-time operation, these values are retrived via table lookups. Additionally, commonly used functions shared between controller and planner -- such as coordinate transformations between Frenet and Cartesian -- are implemented as static libraries in **zeus_library** directory to enable multi-module accessibility. Please refer to Fig.5 for more details.\n\n\u003cdiv align=center\u003e \u003cimg src=\"https://github.com/saxijing/zeus/blob/main/zeus_controller/data/display_materials/zeus_architecture.png\" width=800\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eFig.5 Zeus Project Architecture\u003c/p\u003e\n\n# 3 Others\n\n## 3.1 Command line to be executed\n\nroslaunch carla_ros_bridge carla_ros_bridge.launch\n\npython scenario_runner.py --openscenario /home/saxijing/carla-ros-bridge/catkin_ws/data/reference_point/zeus_calibration_06.xosc\n\nroslaunch carla_sensor_result carla_sensor_result.launch\n\nrosrun zeus_calibration calibrater\u003ecalibration.txt\n\nroslaunch zeus_launch controller.launch\u003elaunch_out.txt\n\ncatkin_make -DCATKIN_WHITELIST_PACKAGES=\"zeus_controller\"\n\nrivz(optional):\n\nrosrun zeus_display displayLane\n\nrosrun tf static_transform_publisher 0 0 0 0 0 0 map world 10\n\n## 3.2 Scene file description\n\nLQR test scenario: zeus_control_test07flat.xosc\n\nThreshold -brake calibration/PID test scenario: zeus_calibration_06.xosc\n\nOveroll test and display: zeus_control_test01.xosc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaxijing%2Fzeus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaxijing%2Fzeus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaxijing%2Fzeus/lists"}