M-File Help: VREP_camera | View code for VREP_camera |
Mirror of V-REP vision sensor object
Mirror objects are MATLAB objects that reflect the state of objects in the V-REP environment. Methods allow the V-REP state to be examined or changed.
This is a concrete class, derived from VREP_mirror, for all V-REP vision sensor objects and allows access to images and image parameters.
Methods throw exception if an error occurs.
vrep = VREP(); camera = vrep.camera('Vision_sensor'); im = camera.grab(); camera.setpose(T); R = camera.getorient();
grab | return an image from simulated camera |
setangle | set field of view |
setresolution | set image resolution |
setclipping | set clipping boundaries |
getpos | get position of object |
setpos | set position of object |
getorient | get orientation of object |
setorient | set orientation of object |
getpose | get pose of object |
setpose | set pose of object |
can be used to set/get the pose of the robot base.
getname | get object name |
setparam_bool | set object boolean parameter |
setparam_int | set object integer parameter |
setparam_float | set object float parameter |
getparam_bool | get object boolean parameter |
getparam_int | get object integer parameter |
getparam_float | get object float parameter |
VREP_mirror, VREP_obj, VREP_arm, VREP_camera, VREP_hokuyo
Create a camera mirror object
C = VREP_camera(name, options) is a mirror object that corresponds to the vision senor named name in the V-REP environment.
'fov', A | Specify field of view in degreees (default 60) |
'resolution', N | Specify resolution. If scalar NxN else N(1)xN(2) |
'clipping', Z | Specify near Z(1) and far Z(2) clipping boundaries |
Convert to string
V.char() is a string representation the VREP parameters in human readable foramt.
Fet field of view for V-REP vision sensor
fov = C.getangle(fov) is the field-of-view angle to fov in radians.
Get clipping boundaries for V-REP vision sensor
C.getclipping() is the near and far clipping boundaries (1x2) in the Z-direction as a 2-vector [NEAR,FAR].
Get resolution for V-REP vision sensor
R = C.getresolution() is the image resolution (1x2) of the vision sensor R(1)xR(2).
Get image from V-REP vision sensor
im = C.grab(options) is an image (WxH) returned from the V-REP vision sensor.
C.grab(options) as above but the image is displayed using idisp.
'grey' | Return a greyscale image (default color). |
Set field of view for V-REP vision sensor
C.setangle(fov) set the field-of-view angle to fov in radians.
Set clipping boundaries for V-REP vision sensor
C.setclipping(near, far) set clipping boundaries to the range of Z from near to far. Objects outside this range will not be rendered.
Set resolution for V-REP vision sensor
C.setresolution(R) set image resolution to RxR if R is a scalar or R(1)xR(2) if it is a 2-vector.
© 1990-2014 Peter Corke.