Giter Club home page Giter Club logo

caladan's Introduction

caladan_examples caladan_examples

See your robot moving autonomously in simulation - today!

Requirements

  1. Python3
  2. Pip3

Once you have both of the above installed, you can go to the installation section below to pull down requirements.
These are python libraries Requests and PySimpleGUI

On Mac:

Python3 installation: Guide here

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

On Ubuntu:

sudo apt update
sudo apt install python3-pip

On Windows:

Download Windows Installer (likely 64bit) from: https://www.python.org/downloads/release/python-3105/
Or search python3 in the Microsoft Store

Quick Start

Open the API webpage, Authorize with your Bearer Token, click "try it out" and enter your device key. For launching simulation_world, you can choose between farm, port or mine.

Clone this repo and then open a terminal in the folder.

Installation

Install dependencies using the requirements file

python3 -m pip install -r requirements.txt
Launch the farm world gui example

python3 farmworld.py

  1. Enter your Bearer Token and Device Key.

  2. Click Connect, and after a second or so, you will get current position and data about your simulated vehicle.

  3. Click on some open space in the map, and the vehicle will navigate itself there.

  4. Explore! Have fun (note: you will have to click STOP to send a new goal)

To launch the port world gui example

python3 portworld.py

  1. Enter your Bearer Token and Device Key.

  2. Click Connect, and after a second or so, you will get current position and data about your simulated vehicle.

  3. Click on some open space in the map, and the vehicle will navigate itself there.

  4. Explore! Have fun (note: you will have to click STOP to send a new goal)

To launch the mine world gui example

python3 mineworld.py

  1. Enter your Bearer Token and Device Key.

  2. Click Connect, and after a second or so, you will get current position and data about your simulated vehicle.

  3. Click on some open space in the map, and the vehicle will navigate itself there.

  4. Explore! Have fun (note: you will have to click STOP to send a new goal)

Caladan API

Check the bottom of the caladan_api.py file for example usage of the API in Python directly, for use in your own code. Example:

user@computer:~/caladan_examples$ python3
Python 3.8.10
 
>>> import caladan_api
>>> url = "https://beta-caladan.polymathrobotics.dev/api/"
>>> device_key = "******"
>>> token = "*******"
>>> api = caladan_api.SimpleAPI(url,device_key,token)
>>> print (api.get_uuid())
{'uuid': 'ba791890-06e9-11ed-abcd-123456'}
>>> print (api.get_position())
{'position': {'latitude': 37.12345678, 'longitude': -120.12345678}, 'orientation': {'x': 0.0, 'y': 0.0, 'z': -0.9996048936785271, 'w': 0.028107944320787368}}

FAQs

  • Q: I don't have a token and key?

    • A: Sign up for our beta!
  • NB: Add your token and key to farmworld_config.py and portworld_config.py files directly, so you don't have to copy/paste them in every time you start the examples.

  • NB: Clicking to send a goal in the examples always sets the orientation to 0 (north or up). Try changing this to a click-and-drag behavior to set orientation, as a first improvement to make!

  • Q: Why does the vehicle take the long way around sometimes?

    • A: The vehicle starts without any pre-baked map of the world. As it explores, it will build this map, and make better path planning decisions over time.
  • Q: Why does the vehicle back up sometimes?

    • A: The example vehicles have no preference for forwards/backwards, only to arrive at a goal with a set orientation.
  • Q: Why does the vehicle not reach the exact lat/lon/yaw I requested?

    • A: The example vehicles have position and orientation tolerances of 2m and 0.2rad respectively. On real vehicles, these are generaly much smaller.

Questions?

Check out our discussion page: https://github.com/polymathrobotics/caladan_examples/discussions
Email [email protected]

caladan's People

Contributors

iliabaranov avatar taylorific avatar diulamax avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.