Skip to content

User_Inst_InstallationROS_sharp

Mehmet Emre Çakal edited this page Oct 10, 2024 · 2 revisions

1.4 Installing ROS# for Unity

1. Installing ROS#

ROS# can be used with Unity by installing the package or with any compatible .NET project by integrating the libraries (RosBridgeClient, MessageGeneration, Urdf) (please see platform support and external dependencies). For both Unity and .NET integration, ROS# can be installed with three options.

You don't need to install ROS# for both Unity and Visual Studio. This page is for Unity installation/configuration. Please head to Installing and Configuring ROS# for .NET if you want to work with Visual Studio.

1. Unity Package Manager (Recommended)

  1. Open Unity Package Manager.

  2. Click the "Add package from git URL" option at the top left corner.

  3. Paste the following URL: https://github.com/siemens/ros-sharp.git?path=/com.siemens.ros-sharp ROS# Package Install from Git

     > This method allows you to access the latest updates more quickly.
    

2. Unity Asset Store

  1. Add the package to your assets from the Unity Asset Store.
  2. Open Unity Package Manager, find ROS#, and download.

3. Manual Installation from Releases (Offline)

  1. Download the desired release from the releases section.
  2. Open Unity Package Manager.
  3. Click the "Add package from disk" option at the top left corner.
  4. Select com.siemens.ros-sharp/package.json from the downloaded release (only for ROS# versions > 2.0.0). ROS# Package Install from Disk

4. After Installing ROS#

  • Now RosBridgeClient, UrdfImporter, and Message Generator are included in your Unity project. Once the plugins have been loaded, the following new menu items will show up:

    • ROSBridgeClient > Generate Messages \ Transfer URDF to ROS \ Transfer URDF from ROS
    ROSbridge in Unity
    • GameObject > 3D Object > URDF Model (import) \ URDF Model (new) URDF# in Unity
  • In addition, you can now access sample tutorials directly from the Package Manager. With the new Unity package system, samples do not come pre-installed, but you can choose which one to download and import with a single button. Once clicked, it will be automatically imported into your assets folder.

ROSbridge in Unity

Next tutorial: Unity Simulation Scene Setup

Further Info


© Siemens AG, 2017-2024

Clone this wiki locally