{"id":19235386,"url":"https://github.com/Osestic/Electrical-Vehicle-Control-Interface","last_synced_at":"2026-06-27T08:30:20.014Z","repository":{"id":239418029,"uuid":"799469288","full_name":"Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface","owner":"Osestic","description":"An electrical vehicle control interface","archived":false,"fork":false,"pushed_at":"2024-07-15T09:06:48.000Z","size":955,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-05T01:14:12.103Z","etag":null,"topics":["automotive","can-bus","cpp","electric-vehicles","engineering","mechatronics","xbox"],"latest_commit_sha":null,"homepage":"https://oriekaose.com/projects/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Osestic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-05-12T08:39:26.000Z","updated_at":"2024-07-15T09:06:51.000Z","dependencies_parsed_at":"2024-05-12T10:23:55.775Z","dependency_job_id":"b379120a-8cc9-448b-b748-3ae70fc57ed9","html_url":"https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface","commit_stats":null,"previous_names":["osestic/xbox-woodpecker-electrical-vehicle-interface"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osestic%2FXbox-Woodpecker-Electrical-Vehicle-Interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osestic%2FXbox-Woodpecker-Electrical-Vehicle-Interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osestic%2FXbox-Woodpecker-Electrical-Vehicle-Interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osestic%2FXbox-Woodpecker-Electrical-Vehicle-Interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Osestic","download_url":"https://codeload.github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240317416,"owners_count":19782388,"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":["automotive","can-bus","cpp","electric-vehicles","engineering","mechatronics","xbox"],"created_at":"2024-11-09T16:16:44.636Z","updated_at":"2026-06-27T08:30:17.944Z","avatar_url":"https://github.com/Osestic.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xbox Woodpecker Electrical Vehicle Interface \u003c/h2\u003e\n![Cyberdirector](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/assets/42704298/2618f998-ee56-48d8-8924-cf8c0920eed5)\n\n[Oriekaose Chukwuyem Agholor](https://www.linkedin.com/in/oriekaose-agholor/) and [Andrew Pries](https://www.linkedin.com/in/andrew-pries-08781721b/) presenting this project to Senator Gary Peters (on the far left) and National Cyber Director, Harry Coker, Jr. (on the right), during their visit to the University of Detroit Mercy\n\n![image](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/assets/42704298/af71fddf-a03f-4eec-9f53-9b2c77fc29a9)\n\nThe System Block Diagram\n## Description\nThis project was part of our Hardware and Software Integration course and the VICEROY Scholar research program sponsored by the Department of Defense. It was oriented around using an Xbox controller to control the Woodpecker Electric Vehicle (EV) through a combination of RS232 USB serial communication, ROS2 publisher/subscriber nodes and CAN. \n\nIt pushed our minds and abilities to be able to create our own interfacing and electric vehicle control software that we can go on to improve upon and implement either in our own projects, the company we work for or our own company if we choose to found one. It is also a pathway into electrical vehicle cybersecurity as cars around 3 years back were being hacked through their CAN, compromising them.\n\nThe project involved installing ROS2 on two separate Raspberry Pi’s, creating a publisher C file on one Raspberry Pi, and a subscriber C file on the other.  We then were able to connect the Xbox controller and receive data into the publisher using a format for event-driven architecture. We then manipulated the data in the way we wanted to send it to the subscriber. \n\nNext, we were able to connect the car’s CAN bus to the CAN (Controller Area Network) shield on the subscriber Raspberry Pi. After that, we took the demo CAN send code provided and incorporated it into our ROS2 subscriber code that was receiving data from the topic and used it to send that data to the CAN of the vehicle. \n\nOverall, the Xbox controller can forward steer, reverse steer, brake and accelerate/decelerate the vehicle by sending data to the modules responsible for each action. We used one joystick for steering and the other for braking. Also, we used each trigger for the forward and reversing respectively. We were able to get the steering and braking to work correctly, and although the code was written for acceleration, the state of the vehicle prevented us from testing it.\n\n\n## Set up\n1.  Install Ubuntu and Ros2 on both Raspberry Pis.\n2.\tInstall the CAN system on two Raspberry Pis using the instructions in ```RS485-CAN-HAT-user-manuakl-en.pdf```.\n3.\tConnect an RS485-CAN-HAT to each of the Raspberry Pis.\n4.\tIntegrate one of the Raspberry Pis with the Woodpecker Electric Vehicle (EV) platform by connecting the CAN High and CAN Low of the RS485-CAN-HAT to that of the EV platform.\n\n### Note:\n  - Ensure both Raspberry Pi's are on the same Ethernet or internal WI-FI network for the following steps.\n  - Make sure the ```~/.bashrc``` file of both Raspberry Pi's have the same ROS_DOMAIN_ID and that ROS_LOCALHOST_ONLY is either set to 0 or deleted. \n\n## Programmed With\n\n![C++](https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge\u0026logo=c%2B%2B\u0026logoColor=white)\n![CMake](https://img.shields.io/badge/CMake-%23008FBA.svg?style=for-the-badge\u0026logo=cmake\u0026logoColor=white)\n![ROS](https://img.shields.io/badge/ros-%230A0FF9.svg?style=for-the-badge\u0026logo=ros\u0026logoColor=white)(ROS2)\n\n\n## Installation\nThere are 2 different folders containing the two major parts of the code for the project:\n- [Publisher_node](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/tree/main/Publisher_node)\n\n- [Subscriber_node](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/tree/main/Subscriber_node)\n\n\nAs the names imply, the first folder contains the code for setting up and creating the publisher node to be installed on one Raspberry Pi, and the other folder contains the code for the subscriber node to be installed on the Raspberry Pi integrated with the EV platform. \n\nSteps to install the program:\n1. Create a ROS2 package on both Raspberry Pis by doing the following:\n\n   a. Create a new folder, your workspace, on both devices and create a ```src``` folder in both.\n\n   b. In the Bash terminals of both Raspberry Pis run the code below.\n```bash\n#Replace the address/yourWorkSpace/ with the src folder location\ncd address/yourWorkSpace/src\n\n#Creates a package\n#Replace yourPackageName with any name of your choice\nros2 create pkg yourPackageName\n```\n\n3. Copy the ```subscribe.cpp``` file from the [Subscriber_node](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/tree/main/Subscriber_node) folder and paste it in yourPackageName -\u003e src of the Raspberry Pi (Subscriber node) integrated with the EV platform.\n4. Copy the ```pubvelcpp.cpp``` file from the [Publisher_node](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/tree/main/Publisher_node) folder and paste it in yourPackageName -\u003e src of the other Raspberry Pi (Publisher node).  \n5. Replace the ```CMakeLists.txt``` and ```package.xml``` files with the ones contained in the aforementioned folders for the specific nodes.\n6. Run ```colcon build``` in the Bash terminal in your workspaces at the same level as the ```src``` folders you created initially.\n7. Afterwards, execute ```source install/local_setup.bash``` in the ```install``` folders within the ```src``` folders.\n\n## Usage\nTo use an Xbox to control the WoodpeckervElectrical Vehicle Interface, do the following:\n1. Run ```ls /dev/input/ ``` in the bash terminal of the publisher node.\n2. Connect the Xbox controller to the publisher node.\n3. Run ```ls /dev/input/ ``` again.\n4. Compare both outputs and  make note of the new input device file name that starts with ```event```.\n5. Run ```ros2 run yourPackageName pubvelcpp /dev/input/inputDeviceFileName``` in the Bash terminal in your workspace at the same level as the ```src``` folder.\n6. Then, on your subscriber node run ```ros2 run yourPackageName subscribe ``` in the Bash terminal in your workspace at the same level as the ```src``` folder.\n7. Now, you can utilise the Xbox to control the EV platform using the button control layout provided below.\n\n![image](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/assets/42704298/90b6bb2a-35ac-4027-9f35-61e07d7346bc)\nThe Xbox Control Layout We Specified for Controlling the Electrical Vehicle Platform\u003c/p\u003e\n\n### Development Process\n[Check out the development process in my YouTube playlist](https://www.youtube.com/playlist?list=PL0DIBq2mP_CGUCG4vjxHVTH7tr-DX0TGv)\n\n\n### Presentation and Demo to Senator Gary Peters (on the far left) and National Cyber Director, Harry Coker, Jr. \n![vehicle present](https://github.com/Osestic/Xbox-Woodpecker-Electrical-Vehicle-Interface/assets/42704298/d906fbe6-7b2e-4556-9d71-ab96f1bfa41f)\n[Video Demo](https://youtu.be/h61ZqsItLts?si=CaRQgDzqr-zjd_1M) \n\n \n## Authors\nThis project was a result of the collaborative effort of:\n1. [Oriekaose Chukwuyem Agholor](https://www.linkedin.com/in/oriekaose-agholor/) - Aspiring Robotics and Mechatronic Systems Engineer \n2. [Andrew Pries](https://www.linkedin.com/in/andrew-pries-08781721b/) - Aspiring Computer Scientists\n3. [Brandom Smith](https://www.linkedin.com/in/brandon-smith4/) - Aspiring Robotics and Mechatronic Systems Engineer\n4. [Edrees Ahmed](https://www.linkedin.com/in/edrees-ahmed-1a2186168/)- Aspiring Electrical Engineer\n\n## License\nThis project is licensed under the “Commons Clause” License Condition v1.0. See ```LICENSE``` for more information.\n\n\n## How to Contribute\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)\n\n\n## Recommendations\n- Utilise a more robust means of acceleration using a set of equations to convert the publisher data to correspond to hexadecimal values that are sent to the CAN bus for acceleration if possible.\n- Allow other persons to view the project.\n- Act on their feedback accordingly.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOsestic%2FElectrical-Vehicle-Control-Interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOsestic%2FElectrical-Vehicle-Control-Interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOsestic%2FElectrical-Vehicle-Control-Interface/lists"}