Skip to content

User_Inst_UnitySimulationExample

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

1.4.2 Unity Simulation Scene Setup

Note: This tutorial assumes that you have completed tutorials:

ROS2 Humble - R2D2
  • In the Ubuntu VM, install tkinter (which is required by mouse_to_joy2.py) via
sudo apt update && sudo apt install python3-tk
  • Place the folder unity_simulation_scene2 and file_server2 inside the /src folder of your ROS workspace and rebuild your workspace.

  • In your Unity Package Manager, select ROS# -> Samples and import the Unity Simulation Scenes ROS2.

  • You can follow this step in the preparation part of our tutorial video on YouTube.

# Inside the root of your workspace folder (not /src)
colcon build
source install/local_setup.bash
ROS1 Noetic - TurtleBot2

Note: This tutorial assumes that you have complated TurtleBot Setup for ROS Noetic.

  • In the Ubuntu VM, install python-xlib (which is required by mouse_to_joy.py) via
sudo apt update && sudo apt install python-xlib
  • Place the folder unity_simulation_scene (from here) inside the src folder of your ROS workspace and rebuild your workspace.

  • In the directory unity_simulation_scene/scripts make the file mouse_to_joy.py executable by running

chmod +x mouse_to_joy.py

Next tutorial: Gazebo Simulation Scene Setup


© Siemens AG, 2017-2024

Clone this wiki locally