This repo contains ROS package and Unity project to run a collaborative assembly experiment with robot Baxter, using three different forms of holographic communication to represent robot's intentions.
Make sure you are using a version of Unity 2020.2.2 or newer.
- Download this Unity project and open it within your environment.
- Download the ROS-TCP Connector package from https://github.com/Unity-Technologies/ROS-TCP-Connector and add it to the Unity project, to enable connection to a ROS environment;
- Download the URDF Importer package from https://github.com/Unity-Technologies/URDF-Importer and add it to the Unity project to import your robot's URDF model. This project already contains models for Baxter and Panda robots.
- Within the Robotics tab under Unity's main manu, insert the IP of the machine running the ROS environment.
- The ROS/baxter_hrc folder contains the ROS package needed for motion planning and control. Copy-paste it in your ROS ws;
- Download the ROS-TCP-Endpoint package from https://github.com/Unity-Technologies/ROS-TCP-Endpoint and add it to your ROS ws, then compile via catkin_make;
- Within the config folder of baxter_hrc, change the ROS_IP to the IP of the current machine, whereas under UNITY_IP specify the IP of the machine which runs the Unity simulation.
- MoveIt is used for robot motion planning: make sure to install the <your_robot>_moveit_config from https://moveit.ros.org/robots/;
- Launch the motion planner node and the server endpoint which enables communication with Unity via the launch/main.launch file.
- Start the simulation;
- Ensure the handshake between ROS and Unity is established; Communication issues may be related to Windows Defender Firewall (try deactivating it) or closed ports which need to be opened manually).
- Within the config folder in the ROS package, change the UNITY_IP to that of the HoloLens device;
- Compile the Unity application with UWP build settings. Ensure Internet capabilities and spatial perception are ON in the player settings. Finally, deploy on device and run