BotHub is a web-based robot editor built in go with support for go and python.

Robot Simulator

This is an application to simulate toy robot moving on a square tabletop, The robot is free to roam around the surface of the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented, however further valid movement commands must still be allowed.

Table of Contents

Preparations

Install Golang

Please Follow the instruction here

Set Up ENV

Make sure $GOPATH environment variable are correctly setup

#this should be your workspace for all the go packages (result will be different from yours)
$ echo $GOPATH
$ /Users/macuser/Documents/gowork

Some comments start with !, TODO, *, and other such symbols. The better comments VSCode extension can help the developer experience by coloring those comments in special ways.

GO version

At the time of writing, we are using 1.7.4 . to check your version

$ go version
$ go version go1.7.4 darwin/amd64

Working Directory

Ensure the structure of your working directory is $GOPATH/src/robot-simulator/., copy or clone all the source code inside this working directory.

Running tests

$ go test -v -cover ./...

Compiling Or Running the Application

This program has been pre-compiled and the executable is called main in the working folder.

Compiling

To Compile the code first make sure you are in the working director

$ pwd
$ /Users/macuser/Document/gowork/src/robot-simulator

Then download all dependencies

$ go get -t -v ./...

Then compile the code, which will create an executable under $GOPATH/bin/robot-simulator

$ go build *.go

Running

You can run the application from the executable file in the working directory

$ /Users/macuser/Document/gowork/robot-simulator/main

Alternatively you can also compile and run the code from your working directory

$ go run main.go

With Table Width and Length Option

You are able to change the width and length of the table before starting the program by providing it using flag -width and -length like below.

$ ./main -width=10 -length=10

With File Commands Option

You are also able to feed commands using flat file in your working directory by providing the filename before starting the program by using flag -f like below

$ ./main -f=test-data.Text

Help Option

Help is available on how to use the flag options by using -h like below

$ ./main -h

Commands

Below are available commands to simulate the robot:

PLACE X,Y,F will put the toy robot on the table in position X,Y,F.

MOVE will move the toy robot one unit forward in the direction it is currently facing.

LEFT will rotate the robot 90 degrees to the left from the robot direction without changing the position of the robot.

RIGHT will rotate the robot 90 degrees to the right from the robot direction without changing the position of the robot.

REPORT will announce the X,Y and F of the robot. This will print out X,Y,F of the current state of the robot.

Similar Resources

Retro-Floppy UI is a web based application for managing & using a GoTek floppy emulator running the Flash Floppy firmware.

Retro-Floppy UI is a web based application for managing & using a GoTek floppy emulator running the Flash Floppy firmware.

A web user interface for a GoTek running flashfloppy utilising a Raspberry PI 0W as the storage. This allows for remote uploading of files & selecting which disk image is loaded on a retro computer like the BBC Micro or Amiga A1200

Dec 10, 2022

yarr (yet another rss reader) is a web-based feed aggregator

yarr (yet another rss reader) is a web-based feed aggregator

yarr (yet another rss reader) is a web-based feed aggregator which can be used both as a desktop application and a personal self-hosted server.

Jan 2, 2023

A simple web library collection based fasthttp

A simple web library collection based fasthttp

Aug 17, 2022

No-frills, web-based remote controll for pianobar.

No-frills, web-based remote controll for pianobar.

pianobar-remote-control No-frills, web-based remote controll for pianobar. Motivation To be able to control (skip/volume/select-station) from web/phon

Aug 5, 2022

Go-gin-mongo-api - A backend RESTful API built using golang, gin and mongoDB

go-gin-mongo-API This is a RESTful backend API which is developed using the gola

Jul 19, 2022

Built a causally consistent, replicated and sharded key value store with a REST API.

A causally consistent, replicated and sharded key value store built in Golang with a RESTful API. Runs through the use of a Docker container.

Feb 2, 2022

This codebase was created to demonstrate a fully fledged fullstack application built with Golang/Echo including CRUD operations, authentication, routing, pagination, and more.

This codebase was created to demonstrate a fully fledged fullstack application built with Golang/Echo including CRUD operations, authentication, routing, pagination, and more.

This codebase was created to demonstrate a fully fledged fullstack application built with Golang/Echo including CRUD operations, authentication, routing, pagination, and more.

Jan 6, 2023

urlsh is URL shortener application built on Go language.

urlsh is URL shortener application built on Go language.

GOlang URL shortener service with UI, API, Cache, Hits Counter and forwarder using postgres and redis in backend, bulma in frontend

Dec 11, 2022

Simple bookmark manager built with Go

Simple bookmark manager built with Go

Shiori This project is now maintained by Dean Jackson (@deanishe). The awesome original author, @RadhiFadlillah, unfortunately no longer has the time

Jan 1, 2023
A web forum built in Golang and SQLite and designed in SCSS
A web forum built in Golang and SQLite and designed in SCSS

Forum "Fairfax" ?? What is it? A web forum built in Golang and SQLite and designed in SCSS. Members of the forum can take a personality test and be so

Nov 10, 2021
A simple web-based time in/time out intended for home-based workers.

Web-based Time in/Time out About A simple web-based time in/time out intended for home-based workers. Pre-requisite To run the pre-built binary: An in

Dec 16, 2021
Go-watchdog - a web application observability tool built for Go
Go-watchdog - a web application observability tool built for Go

Go-watchdog is a web application observability tool built for Go, it exposes a status endpoint for application services like databases, caches, message-brokers, mails and storages.

Jul 11, 2022
GoogleBookAPI is built on top of flogo, a flow based application.

GoogleBookAPI Example GoogleBookAPI is built on top of flogo, a flow based application. Upon launch for first time, the application creates a topic go

Nov 19, 2021
Extract structured data from web sites. Web sites scraping.
Extract structured data from web sites. Web sites scraping.

Dataflow kit Dataflow kit ("DFK") is a Web Scraping framework for Gophers. It extracts data from web pages, following the specified CSS Selectors. You

Jan 7, 2023
記帳-PWA-web-app (Bookkeeping-PWA-web-app)
記帳-PWA-web-app (Bookkeeping-PWA-web-app)

GoKeep (bookkeeping web app) 記帳-PWA-web-app (Bookkeeping-PWA-web-app) demo link : https://bookkepping.herokuapp.com/ 測試用帳密 : tester002 , tester002 (亦可

Jan 31, 2022
log4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web servicelog4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web service
log4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web servicelog4jScanner: provides you with the ability to scan internal (only) subnets for vulnerable log4j web service

log4jScanner Goals This tool provides you with the ability to scan internal (only) subnets for vulnerable log4j web services. It will attempt to send

Jan 5, 2023
Web terminal - A (unsafe) technical demo to export a shell to web browser
Web terminal - A (unsafe) technical demo to export a shell to web browser

Web Terminal A (unsafe) technical demo to export a shell to web browser. This pr

Dec 27, 2022
Go-web-scaffold - A simple scaffold for building web app quickly

Go-web-scaffold A simple scaffold for building web app quickly. features This sc

Jan 21, 2022
GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework
GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework

GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework, it features a simple organized directory structure for your next project with a pleasant development experience, made for developing modern APIs and microservices.

Dec 29, 2022