V-REP

From RoboWiki
Revision as of 18:32, 15 June 2012 by Robot (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

About project

Goal for this project was to choose one of free robot simulator (V-REP for me), install it correctly and try some examples for work with it. V-REP is nice and very user friendly Virtual Robot Experimentation Platform - it is a 3D robot simulator, with integrated development environment, based on a distributed control architecture: control programs (or scripts) can be directly attached to scene objects and run simultaneously in a threaded or non-threaded fashion. This makes V-REP very versatile and ideal for multi-robot applications, and allows users to model robotic systems in a similar fashion as in reality - where control is most of the time also distributed.

V-REP allows you to edit and simulate whole robotic systems, or sub-systems (e.g. sensors, mechanisms, etc.). It offers a multitude of functionalities that can be easily integrated and combined through an exhaustive API and script functionality.

V-REP is used for remote monitoring, hardware control, fast prototyping and verification, fast algorithm development / parameter adjustment, safety double-checking, robotics-related education, factory automation simulations, etc.

V-REP (Virtual Robot Experimentation Platform)

Description: V-REP is a distributed control 3D robot simulator, that allows to create whole robotic systems, simulate and interact with dedicated hardware. It possesses several versatile calculation modules (dynamics based on ODE and Bullet, inverse kinematics, proximity sensors, vision sensors, path planning, collision detection, minimum distance calculation, graphing, etc.) and a very elaborate API (more than 650 API functions in total). The platform supports CAD data import, robot and world edition and user interface edition.
Platform: Windows, Mac OS X & Linux.
License: Partially open source. Several prices available. Free fully functional version available for students.

Example of source code

if (simGetScriptExecutionCount()==0) then
    -- This is executed exactly once, the first time this script is executed
    bubbleRobBase=simGetObjectAssociatedWithScript(sim_handle_self) -- this is bubbleRob's handle
    -- following is the handle of bubbleRob's associated UI (user interface):
    ctrl=simGetUIHandle("bubbleCtrl")
    -- Set the title of the user interface: 
    simSetUIButtonLabel(ctrl,0,simGetObjectName(bubbleRobBase).." speed") 
    leftMotor=simGetObjectHandle("leftMotor") -- Handle of the left motor
    rightMotor=simGetObjectHandle("rightMotor") -- Handle of the right motor
    noseSensor=simGetObjectHandle("sensingNose") -- Handle of the proximity sensor
    minMaxSpeed={50*math.pi/180,300*math.pi/180} -- Min and max speeds for each motor
    backUntilTime=-1 -- Tells whether bubbleRob is in forward or backward mode
end

-- if any child script is attached to the bubbleRob tree, this command will execute it/them:
simHandleChildScript(sim_handle_all_except_explicit)
-- Retrieve the desired speed from the user interface: 
speed=minMaxSpeed[1]+(minMaxSpeed[2]-minMaxSpeed[1])*simGetUISlider(ctrl,3)/1000 

result=simReadProximitySensor(noseSensor) -- Read the proximity sensor
-- If we detected something, we set the backward mode:
if (result>0) then backUntilTime=simGetSimulationTime()+4 end 

if (backUntilTime<simGetSimulationTime()) then
    -- When in forward mode, we simply move forward at the desired speed
    simSetJointTargetVelocity(leftMotor,speed)
    simSetJointTargetVelocity(rightMotor,speed)
else
    -- When in backward mode, we simply backup in a curve at reduced speed
    simSetJointTargetVelocity(leftMotor,-speed/2)
    simSetJointTargetVelocity(rightMotor,-speed/8)
end

Screenshots

Workplace in V-REP:

Workplace in V-REP:






















Example of program in V-REP:

Example of program in V-REP:






















Links

http://www.coppeliarobotics.com/
http://www.v-rep.eu/helpFiles/index.html
http://www.v-rep.eu/helpFiles/en/bubbleRobTutorial.htm