diff --git a/.github/ISSUE_TEMPLATE/udev-rules-change-request.yaml b/.github/ISSUE_TEMPLATE/udev-rules-change-request.yaml new file mode 100644 index 0000000..0212cef --- /dev/null +++ b/.github/ISSUE_TEMPLATE/udev-rules-change-request.yaml @@ -0,0 +1,99 @@ +name: "Udev Rules Change Request" +description: "Template for requesting changes or updates to udev rules." +title: "[Udev Rules Change] " +labels: + - udev + - change-request + - needs-review +assignees: [] + +body: + - type: markdown + attributes: + value: | + ## Instructions + Please fill out the sections below to provide all necessary details for your udev rules change request. Ensure you have provided sufficient information for reviewers to understand and evaluate your request. + + ### Example Udev Rules + ``` + ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="1835fcde3dd3ec11931b5383a1ca919a", SYMLINK+="stm_00", MODE="0666" + ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", ATTRS{serial}=="066DFF343047463043161846", SYMLINK+="stm_01", MODE="0666" + ACTION=="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="0001", SYMLINK+="lidar", MODE="0666" + SUBSYSTEM=="tty", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", SYMLINK+="esp32", MODE="0666" + ``` + + ### Explanation of Parameters + - **ACTION**: Specifies the action to trigger the rule, e.g., "add" for adding a device. + - **SUBSYSTEM**: Filters the type of device subsystem, e.g., "tty" for serial devices. + - **ATTRS{idVendor}**: Vendor ID of the device. + - **ATTRS{idProduct}**: Product ID of the device. + - **ATTRS{serial}**: Serial number of the device to uniquely identify it. + - **SYMLINK**: Creates a symbolic link to the device with the specified name. + - **MODE**: Sets the permissions of the device node, e.g., "0666" for read/write access for all users. + + - type: input + id: requestor + attributes: + label: "Requesting Software Group" + description: "Your group requesting the change." + placeholder: "e.g., Localization" + validations: + required: true + + - type: textarea + id: change_description + attributes: + label: "Change Description" + description: "Describe the purpose and context of the proposed udev rules change." + placeholder: "e.g., Update rules for new LIDAR device" + validations: + required: true + + - type: dropdown + id: change_type + attributes: + label: "Change Type" + description: "Select the type of change you are requesting." + options: + - "Addition" + - "Modification" + - "Removal" + validations: + required: true + + - type: textarea + id: new_udev_rule + attributes: + label: "New Udev Rule" + description: "Provide the new udev rule to be added or changed." + placeholder: "e.g., ACTION==\"add\", SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"10c4\", ATTRS{idProduct}==\"ea60\", SYMLINK+=\"device_name\", MODE=\"0666\"" + validations: + required: true + + - type: dropdown + id: tested + attributes: + label: "Has this been tested?" + description: "Confirm whether the change has been tested for functionality." + options: + - "Yes" + - "No" + validations: + required: true + + - type: input + id: priority + attributes: + label: "Startup Priority" + description: "Specify if this needs to start before or after certain processes." + placeholder: "e.g., Not specified" + validations: + required: true + + - type: textarea + id: additional_notes + attributes: + label: "Additional Notes" + description: "Provide any additional context or information." + placeholder: "Optional" + render: false diff --git a/README.md b/README.md index 82e14fa..2b5b795 100644 --- a/README.md +++ b/README.md @@ -53,4 +53,37 @@ To install the DIT-Scripts, clone the repository to your local machine and run t ## Issues -If you want to add new dependencies or other system changes, please open an issue. \ No newline at end of file +If you want to add new dependencies or other system changes, please open an issue. + +## Other Notes + +### A. How is the hostname of our robot's host named? +>The naming convention follows **DIT-[Year]-[Fixed IP Location]**. +> +>For example: If the hostname is **DIT-2025-10**, it indicates that this host belongs to **Eurobot 2025** and its IP is fixed at `192.168.X.10` (by default). Therefore, you can also address it directly using **mDNS** as `dit-2025-10.local`. + +### B. How to ssh without password? (optional) +```bash +# Generate a dedicated ssh_key on your local machine +ssh-keygen -t ed25519 -C "DIT-2025" +# After saving the local key pair, upload the public key to remote (robot) +# [ Friendly Reminder ] It is recommended to switch the files under the keys folder to read-only mode for the user using chmod 400 to ensure security +cat ~/.ssh/keys/DIT-2025_ed25519.pub | ssh username@remote_host "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys" +``` +Refer to the [DigitalOcean Tutorial](https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-20-04) for more information. + +### C. How to setup ssh_config? (recommended) +Edit the `~/.ssh/config` file on your local machine and add the following content: +```bash +Host DIT-2025-10 +Hostname dit-2025-10.local +User main +ForwardAgent yes +IdentityFile ~/.ssh/keys/DIT-2025_ed25519 +``` + +### D. How ssh forwarding works? (**Highly Recommended**) +Forwarding your personal ssh key to the remote host can help you access GitHub repos without leaking your personal ssh key to the robot. (**DO NOT SHARE YOUR PERSONAL SSH KEY!!!**) +```bash +ssh-add ~/.ssh/keys/[Your Personal SSH Key for GitHub] +```