Begin support for interpolation in c/coreslam:scan_update()

This commit is contained in:
simondlevy
2018-07-04 15:16:50 -04:00
parent c5b86a6940
commit b4567062ad
6 changed files with 11 additions and 5 deletions

View File

@@ -432,7 +432,8 @@ void scan_string(
void
scan_update(
scan_t * scan,
int * lidar_mm,
float * lidar_angles_deg,
int * lidar_distances_mm,
double hole_width_mm,
double velocities_dxy_mm,
double velocities_dtheta_degrees)
@@ -450,7 +451,7 @@ scan_update(
for (i=scan->detection_margin+1; i<scan->size-scan->detection_margin; ++i)
{
int lidar_value_mm = lidar_mm[i];
int lidar_value_mm = lidar_distances_mm[i];
/* No obstacle */
if (lidar_value_mm == 0)

View File

@@ -133,7 +133,8 @@ void scan_string(
void
scan_update(
scan_t * scan,
int * lidar_mm,
float * lidar_angles_deg,
int * lidar_distances_mm,
double hole_width_mm,
double velocities_dxy_mm,
double velocities_dtheta_degrees);

View File

@@ -80,6 +80,7 @@ Scan::update(
{
scan_update(
this->scan,
NULL, // no support for angles/interpolation yet
scanvals_mm,
hole_width_millimeters,
poseChange.dxy_mm,

View File

@@ -126,7 +126,8 @@ JNIEXPORT void JNICALL Java_edu_wlu_cs_levy_breezyslam_components_Scan_update (J
jint * lidar_mm_c = (*env)->GetIntArrayElements(env, lidar_mm, 0);
scan_update(scan, lidar_mm_c, hole_width_mm, velocities_dxy_mm, velocities_dtheta_degrees);
// no support for angles/interpolation yet
scan_update(scan, NULL, lidar_mm_c, hole_width_mm, velocities_dxy_mm, velocities_dtheta_degrees);
(*env)->ReleaseIntArrayElements(env, lidar_mm, lidar_mm_c, 0);
}

View File

@@ -191,7 +191,8 @@ static void _scan_update(const mxArray * prhs[])
double * velocities = mxGetPr(prhs[4]);
scan_update(scan, lidar_mm, hole_width_mm, velocities[0], velocities[1]);
/* no support for angles/interpolation yet */
scan_update(scan, NULL, lidar_mm, hole_width_mm, velocities[0], velocities[1]);
}
static void _randomizer_init(mxArray *plhs[], const mxArray * prhs[])

View File

@@ -347,6 +347,7 @@ Scan_update(Scan *self, PyObject *args, PyObject *kwds)
// Update the scan
scan_update(
&self->scan,
NULL,
self->lidar_distances_mm,
hole_width_mm,
dxy_mm,