Skip to content

Commit

Permalink
Merge pull request #69 from Autumn60/hotfix/ros2_header
Browse files Browse the repository at this point in the history
Update VelodyneMsgSerializer.cs
  • Loading branch information
Autumn60 authored Dec 3, 2023
2 parents 339b873 + 7708634 commit 872156c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ public VelodyneScanMsg Serialize(float time)

_msg.header = _header.header;

uint sec = _header.header.stamp.sec;
#if ROS2
int sec = (int)_header.header.stamp.sec;
#else
uint sec = (uint)_header.header.stamp.sec;
# endif
uint nanosec = _header.header.stamp.nanosec;

for (int i = 0; i < _msg.packets.Length; i++)
Expand Down

0 comments on commit 872156c

Please sign in to comment.