Skip to content

Commit

Permalink
Merge pull request ros-drivers#76 from pomerlef/master
Browse files Browse the repository at this point in the history
Sign inversion in some equations
  • Loading branch information
jack-oquin committed Mar 19, 2016
2 parents 3fc2d20 + 3df0861 commit 71d6ec2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions velodyne_pointcloud/src/lib/rawdata.cc
Expand Up @@ -183,7 +183,7 @@ namespace velodyne_rawdata
* was added to the expression due to the mathemathical
* model we used.
*/
float xy_distance = distance * cos_vert_angle + vert_offset * sin_vert_angle;
float xy_distance = distance * cos_vert_angle - vert_offset * sin_vert_angle;

// Calculate temporal X, use absolute value.
float xx = xy_distance * sin_rot_angle - horiz_offset * cos_rot_angle;
Expand Down Expand Up @@ -215,12 +215,12 @@ namespace velodyne_rawdata
* was added to the expression due to the mathemathical
* model we used.
*/
xy_distance = distance_x * cos_vert_angle + vert_offset * sin_vert_angle ;
xy_distance = distance_x * cos_vert_angle - vert_offset * sin_vert_angle ;
///the expression wiht '-' is proved to be better than the one with '+'
x = xy_distance * sin_rot_angle - horiz_offset * cos_rot_angle;

float distance_y = distance + distance_corr_y;
xy_distance = distance_y * cos_vert_angle + vert_offset * sin_vert_angle ;
xy_distance = distance_y * cos_vert_angle - vert_offset * sin_vert_angle ;
/**the new term of 'vert_offset * sin_vert_angle'
* was added to the expression due to the mathemathical
* model we used.
Expand Down Expand Up @@ -363,7 +363,7 @@ namespace velodyne_rawdata
* was added to the expression due to the mathemathical
* model we used.
*/
float xy_distance = distance * cos_vert_angle + vert_offset * sin_vert_angle;
float xy_distance = distance * cos_vert_angle - vert_offset * sin_vert_angle;

// Calculate temporal X, use absolute value.
float xx = xy_distance * sin_rot_angle - horiz_offset * cos_rot_angle;
Expand Down Expand Up @@ -395,15 +395,15 @@ namespace velodyne_rawdata
* was added to the expression due to the mathemathical
* model we used.
*/
xy_distance = distance_x * cos_vert_angle + vert_offset * sin_vert_angle ;
xy_distance = distance_x * cos_vert_angle - vert_offset * sin_vert_angle ;
x = xy_distance * sin_rot_angle - horiz_offset * cos_rot_angle;

float distance_y = distance + distance_corr_y;
/**the new term of 'vert_offset * sin_vert_angle'
* was added to the expression due to the mathemathical
* model we used.
*/
xy_distance = distance_y * cos_vert_angle + vert_offset * sin_vert_angle ;
xy_distance = distance_y * cos_vert_angle - vert_offset * sin_vert_angle ;
y = xy_distance * cos_rot_angle + horiz_offset * sin_rot_angle;

// Using distance_y is not symmetric, but the velodyne manual
Expand Down

0 comments on commit 71d6ec2

Please sign in to comment.