To be able to deploy apps from Unity, we need to set the headset into developer mode. This can only be done via the phone app.
Press build and run (save apk file) ... wait a bit ...
You might get some build errors or the Oculus just shows three dots... :
Check the oculus symbol in the bottom right and press fix until it disapiers. If errors consist:
If the error is related to the JDK, Android SDK & NDK (Unity installs some but for some Unity distros (like 18) it’s not working and has to be adjusted), we need to install the right version of these. You can set the JDK, SDK, NDK under “edit -> preferences -> External tools.
To install Android JDK, SDK, & NDK (Ubuntu 18.04):
Install JDK
Install SDK
Install NDK
Now you should be able to “Build and Run” your app on the Occulus Quest 2 I.e. you will see a white plane and cube and can walk around using the controllers and look around via headset movements
mkdir -p ~/my_ws/src
catkin_init_workspace src
cd ~/my_ws/src
git clone https://github.com/Unity-Technologies/ROS-TCP-Endpoint.git
Clone the quest2_ros_msg package
into your src.
git clone https://github.com/vision-tactile-manip/quest2_ros_msg.git
Build with catkin build
cd ~/my_ws/
catkin build
Now we will make a simple example that shows how to move a cube in vr mimicking your right controller movements when the “A” button is pressed over ROS
Add scripts for ROS communication
Configuring communication between ROS and headset:
export ROS_MASTER_URI=http://<pc that runs ros ip>:11311
export ROS_IP=<pc that runs ros ip>
Now start the ros tcp endpoint via roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:=<pc that runs ros ip> tcp_port:=10000
chmod +x filename
rosrun quest2_ros_msg cube_move_ros.py
The cube should move when pressing "A" and moving the right controller or pressing "X" and moving the left controller.roslaunch quest2_ros_msg digit_cams.launch
rosrun quest2_ros_msg haptic_feedback_via_tactile.py