Skip to content

Commit

Permalink
Initialize time stamp for published image messages (#475)
Browse files Browse the repository at this point in the history
Use the current ROS time instead of leaving it unset.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
  • Loading branch information
jacobperron committed Dec 8, 2020
1 parent 485acf2 commit 7ae81a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions image_tools/src/cam2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ class Cam2Image : public rclcpp::Node
msg.data.resize(size);
memcpy(&msg.data[0], frame.data, size);
msg.header.frame_id = frame_id_;
msg.header.stamp = this->now();
}

cv::VideoCapture cap;
Expand Down

0 comments on commit 7ae81a1

Please sign in to comment.