Skip to content

Protocol bridge between PEDRO messaging system for robotics and V-REP Remote API

License

Notifications You must be signed in to change notification settings

pjritee/pedro_v-rep_bridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pedro_v-rep_bridge

Protocol bridge between PEDRO messaging system for robotics and V-REP Remote API

Python robot controller that gets sensor data from V-REP simulator sending percepts to a PEDRO/QuProlog/Teleor program and receving motion commands (actions) from it. Here we user the PioneerP3DX V-REP mobile robot model, but you can easily replace it with the model you prefer just changing the names and the arrangement of the sensors and actuators.

Requirements

V-REP robot simulator, PEDRO server are needed:

Nodes

Configuration for redis_control:

V_REP robot --> robot_interface (Python3) --> REDIS --> your AI
V_REP robot <-- robot_interface (Python3) <-- REDIS <-- your AI

Configuration for redis_control (+pedro):

V_REP robot --> robot_interface (Python3) --> REDIS --> pedro_percepts -> PEDRO --> QuLog AI
V_REP robot <-- robot_interface (Python3) <-- REDIS <-- pedro_actions <-- PEDRO <-- QuLog AI

Configuration for pedro_control:

V_REP robot --> robot_interface (Python3) --> PEDRO --> QuLog AI
V_REP robot <-- robot_interface (Python3) <-- PEDRO <-- QuLog AI

Like any V-REP project, you have to put the following files in the working directory, in order to run it:

  • vrep.py
  • vrepConst.py
  • the appropriate remote API library: "remoteApi.dll" (Windows), "remoteApi.dylib" (Mac) or "remoteApi.so" (Linux)
  • simpleTest.py (or any other example file) to test remote API functionality

Check the vrep-api-python for details

Robot control protocol

In the redis_control configuration, the robot is controlled by the ROBOT redis channel, while it sends its sensor readings to the ROBOT:PERCEPTS redis channel.

Protocol

Percepts:

sonar( Ld, Rd)
  • Ld Left distance
  • Rd Right distance

of type floating point, meters from obstacles. Became very large to represent nothing (+ infinity)

Actions:

turn_right(speed)
turn_left(speed)
move_forward(speed)
stop()

of type floating point, meters per seconds.

About

Protocol bridge between PEDRO messaging system for robotics and V-REP Remote API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%