Skip to content

yuanlinyang666/Simulation-Unity3D

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Unity3D UAV Simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%