VREP

V-REP simulator communications object

A VREP object holds all information related to the state of a connection. References are passed to other objects which mirror the V-REP environment in MATLAB.

This class handles the interface to the simulator and low-level object handle operations.

Methods throw exception if an error occurs.

Methods

gethandle get handle to named object
getchildren get children belonging to handle
object return a VREP_obj object for named object
arm return a VREP_arm object for named robot
camera return a VREP_camera object for named vosion sensor
hokuyo return a VREP_hokuyo object for named Hokuyo scanner
getpos return position of object given handle
setpos set position of object given handle
getorient return orientation of object given handle
setorient set orientation of object given handle
getpose return pose of object given handle
setpose set pose of object given handle
setobjparam_bool set object boolean parameter
setobjparam_int set object integer parameter
setobjparam_float set object float parameter
getobjparam_bool get object boolean parameter
getobjparam_int get object integer parameter
getobjparam_float get object float parameter
signal_int send named integer signal
signal_float send named float signal
signal_str send named string signal
setparam_bool set object boolean parameter
setparam_int set object integer parameter
setparam_float set object float parameter
delete shutdown the connection and cleanup
startsim start the simulator running
stopsim stop the simulator running
pausesim pause the simulator
getversion get V-REP version number
checkcomms return status of connection
pausecomms pause the comms
display print the link parameters in human readable form
char convert to string

See also

VREP_obj, VREP_arm, VREP_camera, VREP_hokuyo


VREP.VREP

VREP object constructor

v = VREP(options) create a connection to the V-REP simulator.

v = VREP(path, options) as above but specify the root directory of V-REP.

Options

'version', V Version of V-REP, V=304, 311 etc
'timeout', T Timeout T in ms (default 2000)
'cycle', C Cycle time C in ms (default 5)
'port', P Override communications port
'reconnect' Reconnect on error (default noreconnect)

VREP.arm

Return VREP_arm object

V.arm(name) is a factory method that returns a VREP_arm object for the V-REP robot object named NAME.

See also

VREP_arm


VREP.camera

Return VREP_camera object

V.camera(name) is a factory method that returns a VREP_camera object for the V-REP vision sensor object named NAME.

See also

VREP_camera


VREP.checkcomms

Check communications to V-REP simulator

V.checkcomms() is true if a valid connection to the V-REP simulator exists.


VREP.delete

VREP object destructor

delete(v) closes the connection to the V-REP simulator


VREP.getchildren

Return children of object

C = V.getchildren(H) is a vector of integer handles for the V-REP object denoted by the integer handle H.


VREP.gethandle

Return handle to VREP object

H = V.gethandle(name) is an integer handle for named V-REP object.

H = V.gethandle(fmt, arglist) as above but the name is formed from sprintf(fmt, arglist).


VREP.getjoint

Get value of V-REP joint object

V.getjoint(H, q) is the position of joint object with integer handle H.


VREP.getobjparam_bool

get boolean parameter of a V-REP object

V.getobjparam_bool(H, param) gets the boolean parameter with identifier param of object with integer handle H.


VREP.getobjparam_float

get float parameter of a V-REP object

V.getobjparam_bool(H, param) gets the float parameter with identifier param of object with integer handle H.


VREP.getobjparam_int

get Integer parameter of a V-REP object

V.getobjparam_int(H, param) gets the integer parameter with identifier param of object with integer handle H.


VREP.getorient

Get orientation of V-REP object

V.getorient(H) is the orientation as a rotation matrix (3x3) of the V-REP object with integer handle H.

V.getorient(H, 'euler', OPTIONS) as above but returns ZYZ Euler angles.

V.getorient(H, hrr) as above but orientation is relative to the position of object with integer handle HR.

V.getorient(H, hrr, 'euler', OPTIONS) as above but returns ZYZ Euler angles.

Options

See tr2eul.


VREP.getpos

Get position of V-REP object

V.getpos(H) is the position (1x3) of the V-REP object with integer handle H.

V.getpos(H, hr) as above but position is relative to the position of object with integer handle hr.


VREP.getpose

Get pose of V-REP object

V.getpose(H) is the pose (4x4) of the V-REP object with integer handle H.

V.getpose(H, hr) as above but pose is relative to the pose of object with integer handle R.


VREP.getversion

Get version of the V-REP simulator

V.getversion() is the version of the V-REP simulator server as an integer MNNNN where M is the major version number and NNNN is the minor version number.


VREP.hokuyo

Return VREP_hokuyo object

V.hokuyo(name) is a factory method that returns a VREP_hokuyo object for the V-REP Hokuyo laser scanner object named NAME.

See also

VREP_hokuyo


VREP.mobile

Return VREP_mobile object

V.mobile(name) is a factory method that returns a VREP_mobile object for the V-REP mobile base object named NAME.

See also

VREP_mobile


VREP.object

Return VREP_obj object

V.objet(name) is a factory method that returns a VREP_obj object for the V-REP object named NAME.

See also

VREP_obj


VREP.pausecomms

Pause communcations to the V-REP simulator

V.pausecomms(p) pauses communications to the V-REP simulation engine if p is true else resumes it. Useful to ensure an atomic update of simulator state.


VREP.setjoint

Set value of V-REP joint object

V.setjoint(H, q) sets the position of joint object with integer handle H to the value q.


VREP.setjointtarget

Set target value of V-REP joint object

V.setjointtarget(H, q) sets the target position of joint object with integer handle H to the value q.


VREP.setjointvel

Set velocity of V-REP joint object

V.setjointvel(H, qd) sets the target velocity of joint object with integer handle H to the value qd.


VREP.setobjparam_bool

Set boolean parameter of a V-REP object

V.setobjparam_bool(H, param, val) sets the boolean parameter with identifier param of object H to value val.


VREP.setobjparam_float

Set float parameter of a V-REP object

V.setobjparam_bool(H, param, val) sets the float parameter with identifier param of object H to value val.


VREP.setobjparam_int

Set Integer parameter of a V-REP object

V.setobjparam_int(H, param, val) sets the integer parameter with identifier param of object H to value val.


VREP.setorient

Set orientation of V-REP object

V.setorient(H, R) sets the orientation of V-REP object with integer handle H to that given by rotation matrix R (3x3).

V.setorient(H, T) sets the orientation of V-REP object with integer handle H to rotational component of homogeneous transformation matrix T (4x4).

V.setorient(H, E) sets the orientation of V-REP object with integer handle H to ZYZ Euler angles (1x3).

V.setorient(H, x, hr) as above but orientation is set relative to the orientation of object with integer handle hr.


VREP.setparam_bool

Set boolean parameter of the V-REP simulator

V.setparam_bool(name, val) sets the boolean parameter with name name to value val within the V-REP simulation engine.


VREP.setparam_float

Set float parameter of the V-REP simulator

V.setparam_float(name, val) sets the float parameter with name name to value val within the V-REP simulation engine.


VREP.setparam_int

Set intger parameter of the V-REP simulator

V.setparam_int(name, val) sets the integer parameter with name name to value val within the V-REP simulation engine.


VREP.setpos

Set position of V-REP object

V.setpos(H, T) sets the position of V-REP object with integer handle H to T (1x3).

V.setpos(H, T, hr) as above but position is set relative to the position of object with integer handle hr.


VREP.setpose

Set pose of V-REP object

V.setpos(H, T) sets the pose of V-REP object with integer handle H according to homogeneous transform T (4x4).

V.setpos(H, T, hr) as above but pose is set relative to the pose of object with integer handle hr.


VREP.signal_float

Send a float signal to the V-REP simulator

V.signal_float(name, val) send a float signal with name name and value val to the V-REP simulation engine.


VREP.signal_int

Send an integer signal to the V-REP simulator

V.signal_int(name, val) send an integer signal with name name and value val to the V-REP simulation engine.


VREP.signal_str

Send a string signal to the V-REP simulator

V.signal_str(name, val) send a string signal with name name and value val to the V-REP simulation engine.


VREP.simpause

Pause V-REP simulation

V.simpause() pauses the V-REP simulation engine. Use V.simstart() to resume the simulation.

See also

VREP.simstart


VREP.simstart

Start V-REP simulation

V.simstart() starts the V-REP simulation engine.

See also

VREP.simstop, VREP.simpause


VREP.simstop

Stop V-REP simulation

V.simstop() stops the V-REP simulation engine.

See also

VREP.simstart


VREP.youbot

Return VREP_youbot object

V.youbot(name) is a factory method that returns a VREP_youbot object for the V-REP YouBot object named NAME.

See also

vrep_youbot


Robotics Toolbox for MATLAB © 1990-2012 Peter Corke.