Wasswa  Meagan

Wasswa Meagan

1624480680

Orbitron: Reinventing the wheels and its control algorithm

Being a heavy Sci-fi fan myself, I always wondered: how would those spherical wheels from Tron and I-Robot work in real life? And this simple thought began the 6-month journey of Project Orbitron.

Now, this project consisted of two major goals upon start:

  • Building a vehicle with spherical wheels that implement a 4 wheel independent steering/driving (4WIS/D) system using Arduino
  • Developing an intuitive control algorithm for 4WIS/D vehicle in Mathematica

This article will showcase my vehicle prototype Orbitron along with a short story behind the building scene. Then, I’ll introduce you to the highlight: a clever algorithm I built to control Orbitron seamlessly.

You can also check out this maker portfolio video I made for my college application or check out the GitHub repo containing the full code.

ORBITRON

As I mentioned above, ORBITRON is a vehicle with spherical wheels, hence the name ‘ORB’itron. Unfortunately, I was a bit under-qualified to suspend wheels in mid-air with electromagnets, as many sci-fi movies suggested. Instead, I implemented a 4 Wheel Independent Steering/Driving (4WIS/D) system: a steering system for a four-wheeled vehicle that allows for separate speed and direction controls for each wheel.

#arduino #robotics #algorithms #programming #orbitron

What is GEEK

Buddha Community

Orbitron: Reinventing the wheels and its control algorithm
Wasswa  Meagan

Wasswa Meagan

1624480680

Orbitron: Reinventing the wheels and its control algorithm

Being a heavy Sci-fi fan myself, I always wondered: how would those spherical wheels from Tron and I-Robot work in real life? And this simple thought began the 6-month journey of Project Orbitron.

Now, this project consisted of two major goals upon start:

  • Building a vehicle with spherical wheels that implement a 4 wheel independent steering/driving (4WIS/D) system using Arduino
  • Developing an intuitive control algorithm for 4WIS/D vehicle in Mathematica

This article will showcase my vehicle prototype Orbitron along with a short story behind the building scene. Then, I’ll introduce you to the highlight: a clever algorithm I built to control Orbitron seamlessly.

You can also check out this maker portfolio video I made for my college application or check out the GitHub repo containing the full code.

ORBITRON

As I mentioned above, ORBITRON is a vehicle with spherical wheels, hence the name ‘ORB’itron. Unfortunately, I was a bit under-qualified to suspend wheels in mid-air with electromagnets, as many sci-fi movies suggested. Instead, I implemented a 4 Wheel Independent Steering/Driving (4WIS/D) system: a steering system for a four-wheeled vehicle that allows for separate speed and direction controls for each wheel.

#arduino #robotics #algorithms #programming #orbitron

A greedy algorithm is a simple

The Greedy Method is an approach for solving certain types of optimization problems. The greedy algorithm chooses the optimum result at each stage. While this works the majority of the times, there are numerous examples where the greedy approach is not the correct approach. For example, let’s say that you’re taking the greedy algorithm approach to earning money at a certain point in your life. You graduate high school and have two options:

#computer-science #algorithms #developer #programming #greedy-algorithms #algorithms

Tia  Gottlieb

Tia Gottlieb

1596427800

KMP — Pattern Matching Algorithm

Finding a certain piece of text inside a document represents an important feature nowadays. This is widely used in many practical things that we regularly do in our everyday lives, such as searching for something on Google or even plagiarism. In small texts, the algorithm used for pattern matching doesn’t require a certain complexity to behave well. However, big processes like searching the word ‘cake’ in a 300 pages book can take a lot of time if a naive algorithm is used.

The naive algorithm

Before, talking about KMP, we should analyze the inefficient approach for finding a sequence of characters into a text. This algorithm slides over the text one by one to check for a match. The complexity provided by this solution is O (m * (n — m + 1)), where m is the length of the pattern and n the length of the text.

Find all the occurrences of string pat in string txt (naive algorithm).

#include <iostream>
	#include <string>
	#include <algorithm>
	using namespace std;

	string pat = "ABA"; // the pattern
	string txt = "CABBCABABAB"; // the text in which we are searching

	bool checkForPattern(int index, int patLength) {
	    int i;
	    // checks if characters from pat are different from those in txt
	    for(i = 0; i < patLength; i++) {
	        if(txt[index + i] != pat[i]) {
	            return false;
	        }
	    }
	    return true;
	}

	void findPattern() {
	    int patternLength = pat.size();
	    int textLength = txt.size();

	    for(int i = 0; i <= textLength - patternLength; i++) {
	        // check for every index if there is a match
	        if(checkForPattern(i,patternLength)) {
	            cout << "Pattern at index " << i << "\n";
	        }
	    }

	}

	int main() 
	{
	    findPattern();
	    return 0;
	}
view raw
main6.cpp hosted with ❤ by GitHub

KMP approach

This algorithm is based on a degenerating property that uses the fact that our pattern has some sub-patterns appearing more than once. This approach is significantly improving our complexity to linear time. The idea is when we find a mismatch, we already know some of the characters in the next searching window. This way we save time by skip matching the characters that we already know will surely match. To know when to skip, we need to pre-process an auxiliary array prePos in our pattern. prePos will hold integer values that will tell us the count of characters to be jumped. This supporting array can be described as the longest proper prefix that is also a suffix.

#programming #data-science #coding #kmp-algorithm #algorithms #algorithms

Beth  Nabimanya

Beth Nabimanya

1624867080

Algorithm trading backtest and optimization examples

Algorithm trading backtest and optimization examples

Algorithmic trading backtests

Algorithm trading backtest and optimization examples.

xbtusd-vanila-market-making-backtest-hedge

xbtusd-vanila-market-making-backtest-hedge

#algorithms #optimization examples #algorithm trading backtest #algorithm #trading backtest

Genetic Algorithm (GA): A Simple and Intuitive Guide

Learn what are metaheuristics and why we use them sometimes instead of traditional optimization algorithms. Learn the metaheuristic Genetic Algorithm (GA) and how it works through a simple step by step guide.

#genetic-algorithm #algorithms #optimization #metaheuristics #data-science #algorithms