File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 22
22
<arg name =" enable_color_hdr" default =" false" />
23
23
<arg name =" enable_sync_output_accel_gyro" default =" true" />
24
24
<arg name =" enable_accel" default =" false" />
25
- <arg name =" accel_rate" default =" 100hz " />
25
+ <arg name =" accel_rate" default =" 200hz " />
26
26
<arg name =" accel_range" default =" 4g" />
27
27
<arg name =" enable_gyro" default =" false" />
28
- <arg name =" gyro_rate" default =" 100hz " />
28
+ <arg name =" gyro_rate" default =" 200hz " />
29
29
<arg name =" gyro_range" default =" 1000dps" />
30
30
<arg name =" liner_accel_cov" default =" 0.01" />
31
31
<arg name =" angular_vel_cov" default =" 0.01" />
Original file line number Diff line number Diff line change @@ -298,6 +298,9 @@ void OBCameraNode::startIMUSyncStream() {
298
298
imuPipeline_->enableFrameSync ();
299
299
imuPipeline_->start (imuConfig, [&](std::shared_ptr<ob::Frame> frame) {
300
300
auto frameSet = frame->as <ob::FrameSet>();
301
+ if (!frameSet) {
302
+ return ;
303
+ }
301
304
auto aFrame = frameSet->getFrame (OB_FRAME_ACCEL);
302
305
auto gFrame = frameSet->getFrame (OB_FRAME_GYRO);
303
306
if (aFrame && gFrame ) {
@@ -831,6 +834,7 @@ void OBCameraNode::onNewIMUFrameSyncOutputCallback(const std::shared_ptr<ob::Fra
831
834
return ;
832
835
}
833
836
837
+ std::this_thread::sleep_for (std::chrono::nanoseconds (1 ));
834
838
auto imu_msg = sensor_msgs::Imu ();
835
839
setDefaultIMUMessage (imu_msg);
836
840
@@ -872,6 +876,8 @@ void OBCameraNode::onNewIMUFrameCallback(const std::shared_ptr<ob::Frame>& frame
872
876
if (!has_subscriber) {
873
877
return ;
874
878
}
879
+ std::this_thread::sleep_for (std::chrono::nanoseconds (1 ));
880
+
875
881
auto imu_msg = sensor_msgs::Imu ();
876
882
setDefaultIMUMessage (imu_msg);
877
883
imu_msg.header .frame_id = optical_frame_id_[stream_index];
You can’t perform that action at this time.
0 commit comments