IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
Public Member Functions | Public Attributes | List of all members
Replay Class Reference

Replay a recorded stream from a bag file. More...

Inheritance diagram for Replay:
Inheritance graph
[legend]
Collaboration diagram for Replay:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, configs)
 Constructor for Intel Realsense D435 camera bag replay instance. More...
 
def capture (self, before_scale=False)
 Get the next frame(s) with awareness of expected return. More...
 
def get_frames (self, before_scale=False)
 Get the next frame(s) More...
 
def replay_loop (self)
 Replay the data from the bag file attached to this instance. More...
 
def start (self)
 Start capturing the stream. More...
 
- Public Member Functions inherited from D435_Runner
def captureRGBD (self, before_scale=False)
 Snag the next set of RGB and D frames. More...
 
def display (self, rgb, depth)
 
def get (self, key)
 
def process_frame (self, theProcessor, figOut=False)
 Replay and process data from the bag file attached to this instance. More...
 
def process_frames_selected (self, theProcessor, figOut=True)
 Replay and process data from the bag file attached to this instance. More...
 
def process_loop (self, theProcessor, figOut=False)
 Replay and process data from the bag file attached to this instance. More...
 
def stop (self)
 Stop capturing the stream. More...
 
- Public Member Functions inherited from Base
None __init__ (self, configs, K=None)
 Base class instantiator for camera runners. More...
 
def get_configs (self)
 
def get_frames (self)
 
def set (self, key, value)
 
def set_configs (self, configs)
 
def set_intrinsic (self, K)
 

Public Attributes

 align
 
 depth_scale
 
 gCD
 
 Kdepth
 
 pipeline
 
 rs_config
 
- Public Attributes inherited from D435_Runner
 align
 
 auto_exposure
 
 color_sensor
 
 depth_scale
 
 depth_sensor
 
 gCD
 
 K
 
 Kdepth
 
 pipeline
 
 profile
 
 rs_config
 
- Public Attributes inherited from Base
 configs
 
 K
 

Additional Inherited Members

- Static Public Member Functions inherited from D435_Runner
def buildFromFile (configFile)
 

Detailed Description

Replay a recorded stream from a bag file.

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self,
  configs 
)

Constructor for Intel Realsense D435 camera bag replay instance.

Parameters
[in]configsSettings to apply (indicates topics and alignment).

Reimplemented from D435_Runner.

Member Function Documentation

◆ capture()

def capture (   self,
  before_scale = False 
)

Get the next frame(s) with awareness of expected return.

Slightly more flexible version of get_frames agnostic to what is being captured. The setup determines configured returns and returns compatible output.

Returns arguments provided in prioritized order based on camera configuration: color, depth, flag.

Parameters
[in]before_scale[bool] If True, get integer depth map before scaling.
[out]rgb[np.ndarray] RGB image if set to read.
[out]dep[np.ndarray] Depth map in meters if set to read.
[out]flag[bool] Indicator status of fetch/capture operation. \ If true, then expected frame(s) fetched.

Reimplemented from D435_Runner.

◆ get_frames()

def get_frames (   self,
  before_scale = False 
)

Get the next frame(s)

Args:
before_scale (bool). Before the scaling. If True, will get the integer depth map before scaling.

Returns: rgb [np.ndarray]: The rgb image dep [np.ndarray]: The depth map in meter succ_flag [bool]: The indicator for the status of fetching the next frames. \ If true, then both rgb and depth frames are successfully fetched.

Reimplemented from D435_Runner.

◆ replay_loop()

def replay_loop (   self)

Replay the data from the bag file attached to this instance.

Basically will display the color and depth information. See process_loop for performing actual processing on the data.

◆ start()

def start (   self)

Start capturing the stream.

Note
Right now the construction does this, which is poor design.
Todo:
Should implement start/stop functionality and capture boolean.

Reimplemented from D435_Runner.

Member Data Documentation

◆ align

align

◆ depth_scale

depth_scale

◆ gCD

gCD

◆ Kdepth

Kdepth

◆ pipeline

pipeline

◆ rs_config

rs_config

The documentation for this class was generated from the following file: