Skip to content

About

Localization of mobile robots via OpenCV

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

SpaceShipRadar - Localization of mobile robots via OpenCV

License Repo Status CI

Overview

The Space Ship Radar is a Python script designed to initialize a Webots camera and track ArUco markers within its field of view. The system accurately determines the position (P) of the markers in millimeters. Additionally, it tracks the speed (S) of the markers and measures their orientation angle in milliradians (mrad).

GUI_output

States

state

The system starts in the Configuration-State where the user can adjust certain values before the tracking begins. At the moment the user can adjust the size of the edge-markers in mm.

Then if the configuration is complete any key can be pressed to proceed to the tracking-state. Here the objects will be tracked and displayed.

To quit the program you can press the q-key in the Tracking-state.

Installation

git clone https://github.com/NewTec-GmbH/SpaceShipRadar.git
cd SpaceShipRadar
pip install .

Usage

Setup .env

1. Rename the file:

Locate the file named template.env in your project directory. Rename this file to .env. This is important as the application will look for this specific filename.

2. Adjust the paths:

Open the newly renamed .env file in a text editor. You will see several lines that specify paths. You need to update these paths to point to the correct locations on your system.

3. Set the path for RadonUlzer executable:

Find the line that starts with RadonUlzer_PATH=. Change it to reflect the absolute path where program.exe is located on your machine. For example:

RadonUlzer_PATH=C:\path\to\your\LineFollowerSim\program.exe

4. Set the path for Space Ship Radar script:

Locate the line starting with SpaceShipRadar_PATH=. Update it with the absolute path to space_ship_radar.py which is in this repo under src\space_ship_radar\. For example:

SpaceShipRadar_PATH=C:\path\to\your\SpaceShipRadar\src\space_ship_radar\space_ship_radar.py

5. Set the path for calibration folder:

Find the line that begins with CalibrationFolder_PATH=. Ensure this points to the folder calibration (found in this repo under src\), and make sure it ends with a backslash '\'. For example:

CalibrationFolder_PATH=C:\path\to\your\src\calibration\

6. Save your changes:

After updating all necessary paths, save and close the .env file.

Webots world

To test this project in webots you can use the world under webots\worlds\WorkSpace.wbt.

Start script

If webots is open, you can use the start script:

.\start.ps1

This will load the RadonUlzer Program specified .env and also load the SpaceShipRadar

Calibrate camera

python .\src\space_ship_radar\calibrate_camera.py

Use a webcam

python .\src\space_ship_radar\real_camera.py 

Docker

In the docker-folder of this repository, you'll find a docker-compose.yml file that sets up an MQTT broker. Additionally, there's a Python script (mqtt_subscriber.py) available that can listen to all messages published to the MQTT broker within the Docker container, specifically for topics matching ssr/#.

python .\docker\mqtt_subscriber.py 

SW documentation

More information on the deployment and architecture can be found in the documentation

For detailed software design run $ /doc/detailed-design/make html to generate the detailed design documentation that then can be found in the folder /doc/detailed-design/_build/html/index.html

Used Libraries

Used 3rd party libraries which are not part of the standard Python package:

Library Description License
toml Parsing TOML MIT

see also requirements.txt


Sections below, for GitHub only

Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create an issue or if you are able and willing to fix it by yourself, clone the repository and create a pull request.

License

The whole source code is published under BSD-3-Clause. Consider the different licenses of the used third party libraries too!

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

About

Localization of mobile robots via OpenCV

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages