Skip to content

Commit

Permalink
Merge pull request #48 from SICKAG/feature/timestamp-laserscan-message
Browse files Browse the repository at this point in the history
Timestamp Laserscan message corrected #47
  • Loading branch information
rostest authored May 4, 2022
2 parents eb4e637 + 0dda063 commit c2642d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ features that will be removed in future versions **Removed** for deprecated feat

## Released ##

### v2.6.3 -
- **Fixed** Timestamp Laserscan message corrected

### v2.6.2 -
- **Fixed** LDMRS spinning problem corrected

Expand Down
2 changes: 1 addition & 1 deletion driver/src/sick_generic_caller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

#define SICK_GENERIC_MAJOR_VER "2"
#define SICK_GENERIC_MINOR_VER "6"
#define SICK_GENERIC_PATCH_LEVEL "2"
#define SICK_GENERIC_PATCH_LEVEL "3"

#include <algorithm> // for std::min

Expand Down
6 changes: 5 additions & 1 deletion driver/src/sick_scan_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3785,7 +3785,7 @@ namespace sick_scan
bool FireEncoder = false;
EncoderMsg.header.frame_id = "Encoder";
ROS_HEADER_SEQ(EncoderMsg.header, numPacketsProcessed);
msg.header.stamp = recvTimeStamp + rosDuration(config_.time_offset);
msg.header.stamp = recvTimeStamp + rosDuration(config_.time_offset); // default: ros-timestamp at message received, will be updated by software-pll
double elevationAngleInRad = 0.0;
short elevAngleX200 = 0; // signed short (F5 B2 -> Layer 24
// F5B2h -> -2638/200= -13.19°
Expand Down Expand Up @@ -3940,6 +3940,10 @@ namespace sick_scan
dataToProcess = false;
break;
}
else
{
msg.header.stamp = recvTimeStamp + rosDuration(config_.time_offset); // update timestamp by software-pll
}
}

#ifdef DEBUG_DUMP_ENABLED
Expand Down

0 comments on commit c2642d0

Please sign in to comment.