Skip to content

septianrazi/HoloLens2-ROS2-Interactions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MIT License

HoloLens2-ROS2 Interactions ROS Package and XR App

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
  1. About The Project
  2. Getting Started
  3. Examples
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

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

ROS2 Node with Twist commands

Our ROS2 node sends Twist commands to the robot to induce movement. These twist commands can be used with robots generally supporting navigation methods.

Flask API Server

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

Built With

Getting Started

Prerequisites

You will need to download and install the following:

Running the Project

  1. Clone the repo
  2. Setup ROS2 for ubuntu and connect to the robot (eg Turtlebot setup)
  3. 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
    
  4. 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
    
  5. Run the package
    ros2 run hl2_ros2 simple_remote_nav
    
  6. Open the XR Application either on Unity or on a VAM/XR headset (See App README.md)
  7. Ensure firewall settings are compatible for API calls to be received (is network set to private?)
  8. Send commands in the app

Examples

See the project in action on YouTube

Contributing

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.

  1. Choose an Issue you want to work on and assign yourself

    If there is no exsiting issue, please submit one

  2. Fork the Project

  3. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  4. Commit your Changes (git commit -m 'Add some AmazingFeature')

  5. Push to the Branch (git push origin feature/AmazingFeature)

  6. Open a Pull Request linking the issue

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Septian Razi - septianrazi.github.io - raziseptian@gmail.com

Project Link: https://github.com/septianrazi/HoloLens2-ROS2-Interactions

Acknowledgements

About

HoloLens 2 App and ROS2 Python Node code via Flask.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published