Skip to content

Commit

Permalink
fix time increment error
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefGst committed Sep 26, 2023
1 parent 65cbefd commit 3874f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/laser_filters/angular_bounds_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace laser_filters
if(start_angle < lower_angle_){
start_angle += input_scan.angle_increment;
current_angle += input_scan.angle_increment;
start_time.set__sec(start_time.sec + input_scan.time_increment);
start_time.set__nanosec(start_time.nanosec + (input_scan.time_increment * 10e9)); // convert time increment to nanoseconds
}
else{
filtered_scan.ranges[count] = input_scan.ranges[i];
Expand Down

2 comments on commit 3874f2f

@JosefGst
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to nanoseconds because adding a float smaller than 1 to an integer had no effect.

@JosefGst
Copy link
Contributor Author

@JosefGst JosefGst commented on 3874f2f Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the filtered timestap is behind the raw scan.
image

Please sign in to comment.