Control your ROS2 Robot using interaction techniques via the HoloLens. This repository contains the ROS2 Node developed for the Novel Human-Robot Interfaces with XR project, as well as a child repository of the Unity App.
Thinking of using this for your future projects? Feel free to fork it and send a pull request.
Table of Contents
This code contains the necessary ROS2 node and Flask Python API server. This project is part of my final project for the Robotics and XR course of University of Eastern Finland in 2023.
See the project in action on YouTube
Our ROS2 node sends Twist commands to the robot to induce movement. These twist commands can be used with robots generally supporting navigation methods.
Our ROS2 node also contains code that allows the Ubuntu Machine where the ROS2 node is being run to act as a server to receive API calls. There are five main endpoints in the code currently, namely /move_forward,/move_backwards, /turn_left, /turn_right, and /stop. When these endpoints are triggered, they will send the appropriate movement to the
You will need to download and install the following:
- Clone the repo
- Setup ROS2 for ubuntu and connect to the robot (eg Turtlebot setup)
- Open command line interface and run the following code for first time initialisations:
source /opt/ros/humble/setup.bash cd ~/hl2_ros2/src ros2 pkg create --build-type ament_python --node-name simple_remote_nav hl2_ros2
- Once package creation is succesful, we can build with the following commands:
cd ~/hl2-ros2/src source /opt/ros/humble/setup.bash cd .. colcon build --symlink-install --packages-select hl2_ros2 source install/local_setup.bash
- Run the package
ros2 run hl2_ros2 simple_remote_nav
- Open the XR Application either on Unity or on a VAM/XR headset (See App README.md)
- Ensure firewall settings are compatible for API calls to be received (is network set to private?)
- Send commands in the app
See the project in action on YouTube
If you plan on using this repository for future Robotics and XR project, feel free to fork this project. Once complete, I am more than happy to merge it into this repo as an addition. Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
-
Choose an Issue you want to work on and assign yourself
If there is no exsiting issue, please submit one
-
Fork the Project
-
Create your Feature Branch (
git checkout -b feature/AmazingFeature
) -
Commit your Changes (
git commit -m 'Add some AmazingFeature'
) -
Push to the Branch (
git push origin feature/AmazingFeature
) -
Open a Pull Request linking the issue
Distributed under the MIT License. See LICENSE
for more information.
Septian Razi - septianrazi.github.io - raziseptian@gmail.com
Project Link: https://github.com/septianrazi/HoloLens2-ROS2-Interactions