Skip to content

MixedRealityETHZ/ROS-Plug-in-for-Magic-Leap

Repository files navigation

ROS-Plug-in-for-Magic-Leap

For a detailed description of the project please check out following paper: https://github.com/MixedRealityETHZ/ROS-Plug-in-for-Magic-Leap/blob/main/ROS%20Plug%20in%20for%20Magic%20Leap%20Final%20Report.pdf

and for a video demo: https://drive.google.com/file/d/1U-3vY0MfHQ0c8sJFA6zQiUBgGqsD_S83/view

Setup

Install the following applications to setup the application:

Select Open and navigate to the folder where this repo is installed. Once you find the folder with the repo name, click the Open button. Unity will then begin to open the folder (this could take several minutes).

Open the Scene ml2_deployment_1 under Asstes/Scenes

Once Unity launches, navigate to the Hierarchy tab and click on ROSConnectionPrefab (refer to the red circle in the image).

Setup on Unity. Note the colored circles.

Afterwards, navigate to the Inspector tab. Take note of the 4 scripts.

The first script is for setting up the ROS-TCP connector. Note that the ROS IP Address and Ros Port should match based on what was inputted during the roslaunch of the ros_tcp_endpoint (refer to the green circle).

ROS Setup

In your Ubuntu 20.04 system (OS or WSL Ubuntu 20.04), open up 2 terminals.

First, in one terminal, run the following command. This brings up the ROS-TCP Connection and launches roscore underneath the hood, e.g.:

roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:=127.0.0.1 tcp_port:=10000

Launching the ROS-TCP Endpoint to communicate with Unity

Important Notes

Make sure that tf tracking is turned off or carefully selected in all objects (ex. ROSConnector, PointCloud2Visualizer). tf will write to the global frame of Unity rather than the local frame of the parent.

About

ROS Plug-in for Magic Leap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages