| M-File Help: VREP_camera | View code for VREP_camera |
V-REP mirror of vision sensor object
Mirror objects are MATLAB objects that reflect 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 | 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 |
can be used to set/get the pose of the robot base.
| setobjparam_bool | set object boolean parameter |
| setobjparam_int | set object integer parameter |
| setobjparam_float | set object float parameter |
| n | Number of joints |
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 a 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 |
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.