# Simulation-Unity3D
**Repository Path**: I_like_sci_admin/Simulation-Unity3D
## Basic Information
- **Project Name**: Simulation-Unity3D
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-05-02
- **Last Updated**: 2021-05-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Simulation-Unity3D
Unity3D UAV Simulation
## ROS Integration
Simple setup to get ROS on Linux VM connected to Unity3D on host computer
#### ROS Bridge
To connect ROS on VM to host computer, ROS-Bridge is required
Install: `sudo apt-get install ros-indigo-rosbridge-suite`
Run: `roslaunch rosbridge_server rosbridge_websocket.launch`
This creates a websocket on port 9090 by default
#### Connection in Unity3D
Edit line 29 in TurtlesimViewer.cs to use the VM IP address
`ros = new ROSBridgeWebSocketConnection ("ws://VM.IP.ADDRESS", 9090);`
The VM IP address can be found at the top right of VM (two arrows up/down) -> "Connection Information" -> IPv4 IP Address
#### Running System
To test connection, run the ROS turtle sim (http://wiki.ros.org/turtlesim) and run ROS-Bridge on the VM.
In Unity3D open RosScene and click Play.
Use arrow keys inside Unity to move turtle in ROS on VM