Skip to content

Install ROS Code from source

Before starting

Prerequisites

Python 3.x and Git are required to install the full ROS Code from source.

Don’t have make or curl?

Skip ahead for instructions on running all the commands listed in the installation steps in a single line

Using make and curl

Compatibility

Make and curl is usually only preinstalled in Linux. On other operating systems, make and curl need to be manually installed.

Install ROS Code

curl -L -o Makefile https://raw.githubusercontent.com/Richienb/ROS-Code/master/Makefile && make prepare && rm Makefile

Uninstall ROS Code

curl -L -o Makefile https://raw.githubusercontent.com/Richienb/ROS-Code/master/Makefile && make uninstall && rm Makefile

As a one-liner

Shell/Terminal

git clone https://github.com/Richienb/ROS-Code.git ; cd ROS-Code ; pip install -r requirements.txt ; cd .. ; mv $PWD/ROS-Code/src/syntax.py $PWD/ROS-Code/src/ros.py ; cp ROS-Code/src/syntax.py . ; cp ROS-Code/src/run-file.py . ; rm -f -r -d ROS-Code

Powershell

git clone https://github.com/Richienb/ROS-Code.git ; cd ROS-Code ; pip install -r requirements.txt ; cd .. ; rename /ROS-Code/src/syntax.py ros.py ; copy ROS-Code/src/syntax.py . ; copy ROS-Code/src/run-file.py . ; rmdir /s /q ROS-Code

Batch/Cmd

git clone https://github.com/Richienb/ROS-Code.git & cd ROS-Code & pip install -r requirements.txt & cd .. & rename /ROS-Code/src/syntax.py ros.py & copy ROS-Code/src/syntax.py . & copy ROS-Code/src/run-file.py . & rmdir /s /q ROS-Code

Manual Installation steps

Clone the Git repository

git clone https://github.com/Richienb/ROS-Code.git

Install the packages required

cd ROS-Code
pip install -r requirements.txt
cd ..

Rename syntax.py to ros.py

Shell/Terminal

mv $PWD/ROS-Code/src/syntax.py $PWD/ROS-Code/src/ros.py

Batch/Cmd/Powershell

rename /ROS-Code/src/syntax.py ros.py

Fetch the required files

Shell/Terminal

cp ROS-Code/src/syntax.py .
cp ROS-Code/src/run-file.py .

Batch/Cmd/Powershell

copy ROS-Code/src/syntax.py .
copy ROS-Code/src/run-file.py .

Remove the unneeded folder

Shell/Terminal

rm -f -r -d ROS-Code

Batch/Cmd/Powershell

rmdir /s /q ROS-Code

Usage

Ensure that the syntax.py and run-file.py file are stored in the same directory.

Call the following command to execute a ROS Code file, replacing mycode.ros with the code you wish to run

python run-file.py mycode.ros

Comments