Skip to content

Commit 30bc444

Browse files
authored
build timings in offline setup (#428)
Currently when using the offline setup, it does not build the per-point timing offsets which means when unpacking the packets in the offline mode, you cannot timestamp each point with its packet time. This commit does the following: - call buildTimings from setupOffline function - add model to setupOffline interface - set config model param which is needed by buildTimings
1 parent f4c35a2 commit 30bc444

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

velodyne_pointcloud/include/velodyne_pointcloud/rawdata.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,14 @@ class RawData
176176
* through a communication overhead.
177177
*
178178
* @param calibration_file path to the calibration file
179+
* @param model sensor model type
179180
* @param max_range_ cutoff for maximum range
180181
* @param min_range_ cutoff for minimum range
181182
* @returns 0 if successful;
182183
* errno value for failure
183184
*/
184-
int setupOffline(std::string calibration_file, double max_range_, double min_range_);
185+
int setupOffline(std::string calibration_file, std::string model, double max_range_,
186+
double min_range_);
185187

186188
void unpack(const velodyne_msgs::VelodynePacket& pkt, DataContainerBase& data,
187189
const ros::Time& scan_start_time);

velodyne_pointcloud/src/lib/rawdata.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,13 @@ inline float SQR(float val) { return val*val; }
253253
}
254254

255255
/** Set up for offline operation */
256-
int RawData::setupOffline(std::string calibration_file, double max_range_, double min_range_)
256+
int RawData::setupOffline(std::string calibration_file, std::string model,
257+
double max_range_, double min_range_)
257258
{
258259

260+
config_.model = model;
261+
buildTimings();
262+
259263
config_.max_range = max_range_;
260264
config_.min_range = min_range_;
261265
ROS_INFO_STREAM("data ranges to publish: ["

0 commit comments

Comments
 (0)