timestamp_corrector.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Roboception GmbH
3  * All rights reserved
4  *
5  * Author: Heiko Hirschmueller
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its contributors
18  * may be used to endorse or promote products derived from this software without
19  * specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 #ifndef RC_GENICAM_CAMERA_TIMESTAMP_CORRECTOR_H
35 #define RC_GENICAM_CAMERA_TIMESTAMP_CORRECTOR_H
36 
37 #include <ros/ros.h>
38 
39 #include <rc_genicam_api/config.h>
40 
41 namespace rcgccam
42 {
43 
50 {
51 public:
54 
62  void setMaximumTolerance(int64_t tol_ns);
63 
69  void setInterval(int64_t interval_ns);
70 
82  bool determineOffset(const std::shared_ptr<GenApi::CNodeMapRef>& nodemap);
83 
93  int64_t correct(ros::Time& time);
94 
95 private:
98 
100 
103 };
104 
105 } // namespace rcgccam
106 
107 #endif
ros.h
rcgccam::TimestampCorrector::tolerance_
int64_t tolerance_
Definition: timestamp_corrector.h:96
rcgccam
Definition: camerainfolist.cc:40
rcgccam::TimestampCorrector::determineOffset
bool determineOffset(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap)
Determine the offset between the system and camera clock.
Definition: timestamp_corrector.cc:76
rcgccam::TimestampCorrector::correct
int64_t correct(ros::Time &time)
Correct the given camera timestamp to system time.
Definition: timestamp_corrector.cc:135
rcgccam::TimestampCorrector::interval_
int64_t interval_
Definition: timestamp_corrector.h:97
rcgccam::TimestampCorrector::setMaximumTolerance
void setMaximumTolerance(int64_t tol_ns)
Set the maximum tolerance for the offset between system and camera clock.
Definition: timestamp_corrector.cc:55
rcgccam::TimestampCorrector::last_
int64_t last_
Definition: timestamp_corrector.h:99
rcgccam::TimestampCorrector::TimestampCorrector
TimestampCorrector()
Definition: timestamp_corrector.cc:40
rcgccam::TimestampCorrector::accuracy_
int64_t accuracy_
Definition: timestamp_corrector.h:101
ros::Time
int64_t
__int64 int64_t
rcgccam::TimestampCorrector
This class uses the GenICam command "TimestampLatch" and the parameter "TimestampLatchValue" to deter...
Definition: timestamp_corrector.h:49
rcgccam::TimestampCorrector::setInterval
void setInterval(int64_t interval_ns)
Set minimum time between determination of offset.
Definition: timestamp_corrector.cc:60
rcgccam::TimestampCorrector::~TimestampCorrector
~TimestampCorrector()
Definition: timestamp_corrector.cc:51
rcgccam::TimestampCorrector::offset_
int64_t offset_
Definition: timestamp_corrector.h:102


rc_genicam_camera
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 2 2022 00:49:18