Fix imu stamp bug in ros
This commit is contained in:
parent
a9353c965a
commit
5c46c72883
|
@ -99,8 +99,7 @@ int main(int argc, char *argv[]) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cv::imshow("frame", img);
|
cv::imshow("frame", img);
|
||||||
|
if (img_count > 10 && imu_count > 50) { // save
|
||||||
{ // save
|
|
||||||
for (auto &&left : left_datas) {
|
for (auto &&left : left_datas) {
|
||||||
dataset.SaveStreamData(Stream::LEFT, left);
|
dataset.SaveStreamData(Stream::LEFT, left);
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,9 +341,10 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
} else {
|
} else {
|
||||||
NODELET_WARN_STREAM("Motion data is empty");
|
NODELET_WARN_STREAM("Motion data is empty");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
publishImu(data, imu_count_, stamp);
|
||||||
|
publishTemp(data.imu->temperature, imu_count_, stamp);
|
||||||
}
|
}
|
||||||
publishImu(data, imu_count_, stamp);
|
|
||||||
publishTemp(data.imu->temperature, imu_count_, stamp);
|
|
||||||
NODELET_DEBUG_STREAM(
|
NODELET_DEBUG_STREAM(
|
||||||
"Imu count: " << imu_count_ << ", timestamp: " << data.imu->timestamp
|
"Imu count: " << imu_count_ << ", timestamp: " << data.imu->timestamp
|
||||||
<< ", accel_x: " << data.imu->accel[0]
|
<< ", accel_x: " << data.imu->accel[0]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user