Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.
/ T6-communications Public archive

This GitHub repository hosts a ROS2 node facilitating communication over LoRa 868 MHz. The primary function of the node is to transmit subscribed information, including sensor data, battery status, and blockage information, to a ground station. The communication process is orchestrated by a Pycom LoPy4 device connected to a RasPi4 through USB port

License

Notifications You must be signed in to change notification settings

pipebots/T6-communications

Repository files navigation

Overview

This lora_communications contains a ROS2 node designed to facilitate communication over LoRa 868 MHz and WiFi. The node subscribes to various pieces of information, including sensor data, and diagnostic information. This information is then transmitted to a ground station. The LoRa communication is established using a Pycom LoPy4 device connected to a Raspberry Pi 4 via a USB port.

Requirements

To set up the communication system, you will need the following hardware components:

  • 2 Pycom LoPy4 or FiPy devices
  • 2 pycom Expansion Boards 3.0
  • 1 Raspberry Pi 4 with ROS2 installed
  • 1 PC for base station monitoring

Setup Instructions

Connect the Raspberry Pi 4 to the LoPy4 device using a USB cable. Ensure that the correct port (in this code, it is assumed to be ttyACM0) is used.

Connect the LoPy4 device to the PC or laptop located at the ground station.

Save the code in the file mainSender.py to the main.py file of the LoPy4 connected to the Raspberry Pi 4.

Save the code in the file mainBS.py to the main.py file of the LoPy4 connected to the laptop or PC, which functions as the base station.

Running the System

The ROS2 package lora_communications includes two nodes:

  • lora_node: This node is responsible for publishing information.
  • lora_receiver_node: This node subscribes to the information published by the lora_node.

Follow these steps to run the system:

  1. Execute both the lora_node and lora_receiver_node.
  2. The LoPy4 attached to the Raspberry Pi will start receiving data on the serial port and send it to another LoPy4 connected to the PC.

Notes

Make sure that the appropriate COM port is configured in the code (e.g., ttyACM0). Adjust this value if necessary.

Ensure that the ROS2 setup on the Raspberry Pi is properly configured.

Monitor the communication system using a PC connected as the base station.

Acknowledgments

This work is supported by the UK's Engineering and Physical Sciences Research Council (EPSRC) Programme Grant EP/S016813/1

© 2023 University of Leeds

The author, H. Nasir, has asserted their moral rights.

About

This GitHub repository hosts a ROS2 node facilitating communication over LoRa 868 MHz. The primary function of the node is to transmit subscribed information, including sensor data, battery status, and blockage information, to a ground station. The communication process is orchestrated by a Pycom LoPy4 device connected to a RasPi4 through USB port

Topics

Resources

License

Stars

Watchers

Forks