Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Snap! V-REP example

This is simple "proof of concept" of controlling V-REP 3d robotics simulation world from Snap! web-based Scratch-like system.

Open image in full-size


  • /scena - folder with simple V-REP's scene
  • /views - for html template for web-backend
  • .gitignore - exclude some files
  • - this file
  • snap-v-rep-example.jpg - screenshot with annotations
  • - web-backed for web API
  • v-rep_demo.xml - Snap! demo project
  • remoteApi.dll - files needed to work with V-REP API
  • - python wrapper for DLL
  • - constants for V-REP API

Files remoteApi.dll, and have to be taken from V-REP installation folder.

Install V-REP

Download from

Copy DLL for API

Copy 2 files (Python wrapper and constants for API) from folder [Program Files]\V-REP3\V-REP_PRO_EDU\programming\remoteApiBindings\python\python:


Copy remoteApi.dll from [Program Files]\V-REP3\V-REP_PRO_EDU\programming\remoteApiBindings\lib\lib\, folder (according to your machine 32/64bit architecture):

  • 32Bit
  • 64Bit

To current folder.

Install Python

To install bottle in console:

pip install bottle

bottle - is web framework.

Start V-REP

Open scena/simpleLineFollower_api.ttt file - starting V-REP.

Or Start V-REP and open from menu "File", "Open scene...".

simpleLineFollower_api.ttt is simple LineFollower (without Lua embedded script).

Start Simulation by press on "Play" button or from menu "Simulation", "Start simulation".

Start API backend

In console:


Bottle started at 8080 port.

Test API web control

Open in browser URL:

See moving of LineFollower at V-REP. If not moving see section "Problems".

Start Snap!

Open demo Snap! application:

Or open: and Drag and drop file v-rep_demo.xml to browser.

Press curson up/down/left/right - see reaction of car at V-REP

Press "w", "a", "d" keys - see reaction of car at V-REP.

In Snap! was created custom blocks: "up", "down", "left", "right". Each block just call "Report" block, with URL request (to http://localhost:8080/ACTION).


  • Q: Car not moved?

  • A: Are you pressed "Play" button for start simulation at V-REP?

  • Q: Python backent cant connect to 19997 port (in

  • A: See config portIndex1_port in V-REP_PRO_EDU/remoteApiConnections.txt


Example of Snap! controlled LineFollower at V-REP



No releases published
You can’t perform that action at this time.