Support variable-size input to scan_update()
This commit is contained in:
@@ -434,6 +434,7 @@ scan_update(
|
|||||||
scan_t * scan,
|
scan_t * scan,
|
||||||
float * lidar_angles_deg,
|
float * lidar_angles_deg,
|
||||||
int * lidar_distances_mm,
|
int * lidar_distances_mm,
|
||||||
|
int scan_size,
|
||||||
double hole_width_mm,
|
double hole_width_mm,
|
||||||
double velocities_dxy_mm,
|
double velocities_dxy_mm,
|
||||||
double velocities_dtheta_degrees)
|
double velocities_dtheta_degrees)
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ scan_update(
|
|||||||
scan_t * scan,
|
scan_t * scan,
|
||||||
float * lidar_angles_deg,
|
float * lidar_angles_deg,
|
||||||
int * lidar_distances_mm,
|
int * lidar_distances_mm,
|
||||||
|
int scan_size,
|
||||||
double hole_width_mm,
|
double hole_width_mm,
|
||||||
double velocities_dxy_mm,
|
double velocities_dxy_mm,
|
||||||
double velocities_dtheta_degrees);
|
double velocities_dtheta_degrees);
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ Scan::update(
|
|||||||
this->scan,
|
this->scan,
|
||||||
NULL, // no support for angles/interpolation yet
|
NULL, // no support for angles/interpolation yet
|
||||||
scanvals_mm,
|
scanvals_mm,
|
||||||
|
this->scan->size,// no support for angles/interpolation yet
|
||||||
hole_width_millimeters,
|
hole_width_millimeters,
|
||||||
poseChange.dxy_mm,
|
poseChange.dxy_mm,
|
||||||
poseChange.dtheta_degrees);
|
poseChange.dtheta_degrees);
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ JNIEXPORT void JNICALL Java_edu_wlu_cs_levy_breezyslam_components_Scan_update (J
|
|||||||
jint * lidar_mm_c = (*env)->GetIntArrayElements(env, lidar_mm, 0);
|
jint * lidar_mm_c = (*env)->GetIntArrayElements(env, lidar_mm, 0);
|
||||||
|
|
||||||
// no support for angles/interpolation yet
|
// no support for angles/interpolation yet
|
||||||
scan_update(scan, NULL, lidar_mm_c, hole_width_mm, velocities_dxy_mm, velocities_dtheta_degrees);
|
scan_update(scan, NULL, lidar_mm_c, scan->size, hole_width_mm, velocities_dxy_mm, velocities_dtheta_degrees);
|
||||||
|
|
||||||
(*env)->ReleaseIntArrayElements(env, lidar_mm, lidar_mm_c, 0);
|
(*env)->ReleaseIntArrayElements(env, lidar_mm, lidar_mm_c, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ static void _scan_update(const mxArray * prhs[])
|
|||||||
double * velocities = mxGetPr(prhs[4]);
|
double * velocities = mxGetPr(prhs[4]);
|
||||||
|
|
||||||
/* no support for angles/interpolation yet */
|
/* no support for angles/interpolation yet */
|
||||||
scan_update(scan, NULL, lidar_mm, hole_width_mm, velocities[0], velocities[1]);
|
scan_update(scan, NULL, lidar_mm, scan->size, hole_width_mm, velocities[0], velocities[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _randomizer_init(mxArray *plhs[], const mxArray * prhs[])
|
static void _randomizer_init(mxArray *plhs[], const mxArray * prhs[])
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ Scan_update(Scan *self, PyObject *args, PyObject *kwds)
|
|||||||
&self->scan,
|
&self->scan,
|
||||||
NULL,
|
NULL,
|
||||||
self->lidar_distances_mm,
|
self->lidar_distances_mm,
|
||||||
|
PyList_Size(py_lidar),
|
||||||
hole_width_mm,
|
hole_width_mm,
|
||||||
dxy_mm,
|
dxy_mm,
|
||||||
dtheta_degrees);
|
dtheta_degrees);
|
||||||
|
|||||||
Reference in New Issue
Block a user