Skip to content

Commit

Permalink
fix time stamp increment
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefGst committed Sep 26, 2023
1 parent 65cbefd commit 1ee6c25
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

1 comment on commit 1ee6c25

@JosefGst
Copy link
Contributor Author

@JosefGst JosefGst commented on 1ee6c25 Sep 26, 2023

Choose a reason for hiding this comment

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

Changed to nanosecond, becuase adding a time_increment smaller then 1 to the start_time integer had no effect. The filtered data is now behind the raw scan.
image
This also solved the angular filter issue #184 for me.

Please sign in to comment.