{"id":29049308,"url":"https://github.com/astuff/pacmod2_game_control","last_synced_at":"2025-06-26T19:08:23.607Z","repository":{"id":45155839,"uuid":"440309432","full_name":"astuff/pacmod2_game_control","owner":"astuff","description":"A demonstration node for controlling a PACMod 2 drive-by-wire system with a standard game controller.","archived":false,"fork":false,"pushed_at":"2023-05-01T18:05:47.000Z","size":247,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"ros1_master","last_synced_at":"2023-12-11T23:00:50.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/astuff.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-20T21:19:26.000Z","updated_at":"2023-12-11T23:00:50.980Z","dependencies_parsed_at":"2022-09-22T17:51:52.078Z","dependency_job_id":null,"html_url":"https://github.com/astuff/pacmod2_game_control","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/astuff/pacmod2_game_control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astuff%2Fpacmod2_game_control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astuff%2Fpacmod2_game_control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astuff%2Fpacmod2_game_control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astuff%2Fpacmod2_game_control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astuff","download_url":"https://codeload.github.com/astuff/pacmod2_game_control/tar.gz/refs/heads/ros1_master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astuff%2Fpacmod2_game_control/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262128872,"owners_count":23263350,"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":[],"created_at":"2025-06-26T19:08:22.093Z","updated_at":"2025-06-26T19:08:23.597Z","avatar_url":"https://github.com/astuff.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PACMod2 Game Controller ##\n\n[![CircleCI](https://circleci.com/gh/astuff/pacmod2_game_control/tree/master.svg?style=svg)](https://circleci.com/gh/astuff/pacmod2_game_control/tree/master)\n\nThis ROS package provides software for controlling a PACMod2 system using a game controller.\nThe `pacmod2_game_control` ROS node subscribes to gamepad input data coming from the ROS joy node and interfaces with the [`pacmod2`](https://github.com/astuff/pacmod) ROS driver to control the PACMod.\n\n## Installation\n\nInstall pacmod2_game_control using our debian repository:\n\n```sh\nsudo apt install apt-transport-https\nsudo sh -c 'echo \"deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ $(lsb_release -sc) main\" \u003e /etc/apt/sources.list.d/autonomoustuff-public.list'\nsudo apt update\nsudo apt install ros-$ROS_DISTRO-pacmod2-game-control\n```\n\n## Controls\n\n### Supported Controllers\n\nThe currently supported controllers are:\n\n- Logitech F310\n- [FORT Robotics Safe Remote Control](https://autonomoustuff.com/products/fort-remote-control-system)\n- Logitech G29 Steering Wheel and Pedals\n- XBOX ONE Wired or Wireless Controller\n\n***NOTE***: The Logitech F310 controller has a switch on the back of the controller for switching between \"X\" and \"D\".\nEnsure the switch is always set to \"X\".\nIn addition, the Logitech F310 also has a MODE button that toggles a green light, ensure the green light is always off.\n\n### Logitech F310 Control Scheme\n\nBelow is the control scheme for the Logitech F310, the control scheme is similar for other controllers.\n\n![Left: Front Layout of logitech Controller; Right: Side-button layout of logitech controller\n](/controller_img.png \"controller_img.png\")\n\n*Note:* Do not use the MODE button. MODE light should be OFF at all times otherwise the button mapping will change.\n\n| Action | Button | Notes |\n| - | - | - |\n| **Enable/Disable** | **Center region** | |\n| Enable | BACK and START | Buttons must be pressed simultaneously to enable by-wire mode |\n| Disable | BACK | button must be pressed to disable by-wire mode.|\n| **Gear Selection** | **Button Pad (right-hand side)** | |\n| Drive | A | |\n| Reverse | B | |\n| Neutral | X | |\n| Park | Y | |\n| **Steering** | **Joystick** | |\n| Steering | Left Joystick | |\n| Brake | Left Trigger | |\n| Throttle | Right Trigger | |\n| Windsheild Wipers | Left Bumper | Not supported by all vehicle platforms |\n| Horn | Right Bumper | Not supported by all vehicle platforms |\n| **Headlights and Turn Signals** | **Directional Pad (left-hand side)** | |\n| Left turn signal | Left | |\n| Right turn signal | Right | |\n| Headlights | Up | Not supported by all vehicle platforms |\n| Hazards | Down | Not supported by all vehicle platforms |\n\n## ROS API\n\n### Launch Arguments\n\n- **launch_driver**: Set this to true if you wish to launch the pacmod3 driver along with the `pacmod2_game_control` node. Defaults to `false`.\n- **pacmod_vehicle_type**: Use this to set your vehicle type. See launch file for available options.\n- **controller_type**: Use this to set your controller type. See launch file for available options.\n- **steering_max_speed**: The maximum rotational speed of the steering wheel in (rad/s).\n- **max_veh_speed**: Maximum vehicle speed in (m/s), only used for speed-based steering damping.\n- **accel_scale_val**: Scale value applied to outgoing accel commands, useful for decreasing sensitivity. Defaults to `1.0`.\n- **brake_scale_val**: Scale value applied to outgoing brake commands, useful for decreasing sensitivity. Defaults to `1.0`.\n- **use_socketcan**: Set this to true if socketCAN is being used to connect to the PACMod. If set false it is assumed a Kvaser CAN device is being used with Kvaser canlib drivers to connect to the PACMod. Defaults to `false`.\n- **pacmod_can_hardware_id**: The hardware id of the kvaser device, only applies if `use_socketcan` is false.\n- **pacmod_can_circuit_id**: The circuit/channel id that the PACMod is plugged into on the kvaser device, only applies if `use_socketcan` is false.\n- **pacmod_socketcan_device**: The device id of the SocketCAN channel the PACMod is plugged into, only applies if `use_socketcan` is true.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastuff%2Fpacmod2_game_control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastuff%2Fpacmod2_game_control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastuff%2Fpacmod2_game_control/lists"}