ricmua / empty_ros_unity_3d_project

A simple repository meant to facilitate git-based management of Unity3D projects that use ROS2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

title subtitle author date documentclass colorlinks
Git repository for Unity-ROS2 projects
README
a.whit ([email](mailto:nml@whit.contact))
January 2022
scrartcl
true

This repository contains an empty Unity project that has been prepared for use with Git and ROS2. For recent versions of Unity, Git should mostly work out-of-the-box -- provided that there is an appropriate .gitignore file -- but the documentation is still a bit fragmented.1

Getting started

To use this project, clone the repository and then open it in the Unity Editor.23 Make any desired changes to your project, and save to disk. Commit the changes as normal via a git command.

Procedure for creating this repository

  1. Create an empty project via Unity Hub and the Unity Editor.

  2. Initialize Git in the project root:

    git init

  3. Initialize Git Large File Storage (LFS):2

    git lfs install

  4. Download the Unity .gitignore file from the GitHub gitignore template repository4 into the repository root:

    wget -O .gitignore https://raw.githubusercontent.com/github/gitignore/main/Unity.gitignore
    
  5. Download the .gitattributes file from the GitHub for Unity project into the repository root:

    wget https://raw.githubusercontent.com/github-for-unity/Unity/master/.gitattributes
    
  6. Create this README in the project root directory.

  7. Add all files to the repository: git add * .gitattributes .gitignore. Commit.

  8. With the project open in the Unity Editor, add Unity's ROS-TCP-Connector to the package.

  9. Save the project.

Footnotes

  1. The main issue to overcome is the problem of dealing with large (binary) files that Unity produces.]

  2. Assumes git LFS is installed. On Ubuntu: sudo apt install git-lfs. 2

  3. To avoid accidentally attempting to push your project to this repository, be sure to modify the git remotes, after cloning.

  4. Other version of .gitignore and .gitattributes files are available. The versions from GitHub and GitHub for Unity were chosen because they are the closest thing that could be found to official versions.

About

A simple repository meant to facilitate git-based management of Unity3D projects that use ROS2.