Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor Class Reference

Public Member Functions

def __init__ (self, config_dict, M_cam, M_chain)
 
def build_sparsity_dict (self)
 
def compute_cov (self, target_pts)
 
def compute_expected (self, target_pts)
 
def compute_expected_J (self, target_pts)
 
def compute_marginal_gamma_sqrt (self, target_pts)
 
def compute_residual (self, target_pts)
 
def compute_residual_scaled (self, target_pts)
 
def get_chain_cov (self, target_pts, epsilon=1e-8)
 
def get_measurement (self)
 
def get_residual_length (self)
 
def update_config (self, robot_params)
 

Public Attributes

 sensor_id
 
 sensor_type
 
 terms_per_sample
 

Private Member Functions

def _compute_expected (self, chain_state, target_pts)
 

Private Attributes

 _camera
 
 _config_dict
 
 _full_chain
 
 _M_cam
 
 _M_chain
 

Detailed Description

Definition at line 89 of file camera_chain_sensor.py.

Constructor & Destructor Documentation

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.__init__ (   self,
  config_dict,
  M_cam,
  M_chain 
)
Generates a single sensor block for a single configuration
Inputs:
- config_dict: The configuration for this specific sensor. This looks exactly like
       a single element from the valid_configs list passed into CameraChainBundler.__init__
- M_cam: The camera measurement of type calibration_msgs/CameraMeasurement
- M_chain: The chain measurement of type calibration_msgs/ChainMeasurement

Definition at line 90 of file camera_chain_sensor.py.

Member Function Documentation

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor._compute_expected (   self,
  chain_state,
  target_pts 
)
private
Compute what measurement we would expect to see, based on the current system parameters
and the specified target point locations.

Inputs:
- chain_state: The joint angles of this sensor's chain of type sensor_msgs/JointState.
- target_pts: 4XN matrix, storing features point locations in world cartesian homogenous coordinates.

Returns: target points projected into pixel coordinates, in a Nx2 matrix

Definition at line 188 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.build_sparsity_dict (   self)
Build a dictionary that defines which parameters will in fact affect this measurement.

Returned dictionary should be of the following form:
  transforms:
    my_transformA: [1, 1, 1, 1, 1, 1]
    my_transformB: [1, 1, 1, 1, 1, 1]
  chains:
    my_chain:
      gearing: [1, 1, ---, 1]
  rectified_cams:
    my_cam:
      baseline_shift: 1
      f_shift: 1
      cx_shift: 1
      cy_shift: 1

Definition at line 272 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.compute_cov (   self,
  target_pts 
)
Computes the measurement covariance in pixel coordinates for the given
set of target points (target_pts)
Input:
 - target_pts: 4xN matrix, storing N feature points of the target, in homogeneous coords

Definition at line 229 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.compute_expected (   self,
  target_pts 
)
Compute the expected pixel coordinates for a set of target points.
target_pts: 4xN matrix, storing feature points of the target, in homogeneous coords
Returns: target points projected into pixel coordinates, in a Nx2 matrix

Definition at line 178 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.compute_expected_J (   self,
  target_pts 
)
The output Jacobian J shows how moving target_pts in cartesian space affects
the expected measurement in (u,v) camera coordinates.
For n points in target_pts, J is a 2nx3n matrix
Note: This doesn't seem to be used anywhere, except maybe in some drawing code

Definition at line 206 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.compute_marginal_gamma_sqrt (   self,
  target_pts 
)
Calculates the square root of the information matrix for the measurement of the
current set of system parameters at the passed in set of target points.

Definition at line 146 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.compute_residual (   self,
  target_pts 
)
Computes the measurement residual for the current set of system parameters and target points
Input:
- target_pts: 4XN matrix, storing features point locations in world cartesian homogenous coordinates.
Output:
- r: terms_per_sample*N long vector, storing pixel residuals for the target points in the form of
     [u1, v1, u2, v2, ..., uN, vN] or [u1, v1, u'1, u2....]

Definition at line 122 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.compute_residual_scaled (   self,
  target_pts 
)
Computes the residual, and then scales it by sqrt(Gamma), where Gamma
is the information matrix for this measurement (Cov^-1).

Definition at line 136 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.get_chain_cov (   self,
  target_pts,
  epsilon = 1e-8 
)

Definition at line 253 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.get_measurement (   self)
Get the target's pixel coordinates as measured by the actual sensor

Definition at line 169 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.get_residual_length (   self)

Definition at line 166 of file camera_chain_sensor.py.

def calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.update_config (   self,
  robot_params 
)
On each optimization cycle the set of system parameters that we're optimizing over will change. Thus,
after each change in parameters we must call update_config to ensure that our calculated residual reflects
the newest set of system parameters.

Definition at line 112 of file camera_chain_sensor.py.

Member Data Documentation

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor._camera
private

Definition at line 118 of file camera_chain_sensor.py.

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor._config_dict
private

Definition at line 102 of file camera_chain_sensor.py.

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor._full_chain
private

Definition at line 106 of file camera_chain_sensor.py.

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor._M_cam
private

Definition at line 103 of file camera_chain_sensor.py.

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor._M_chain
private

Definition at line 104 of file camera_chain_sensor.py.

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.sensor_id

Definition at line 100 of file camera_chain_sensor.py.

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.sensor_type

Definition at line 99 of file camera_chain_sensor.py.

calibration_estimation.sensors.camera_chain_sensor.CameraChainSensor.terms_per_sample

Definition at line 108 of file camera_chain_sensor.py.


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


calibration_estimation
Author(s): Vijay Pradeep, Michael Ferguson
autogenerated on Fri Apr 2 2021 02:12:53