Skip to content

Commit b52a38a

Browse files
committed
chore: Fixed blot imu issue
1 parent 70f9cbf commit b52a38a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

launch/femto_bolt.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
<arg name="enable_color_hdr" default="false"/>
2323
<arg name="enable_sync_output_accel_gyro" default="true"/>
2424
<arg name="enable_accel" default="false"/>
25-
<arg name="accel_rate" default="100hz"/>
25+
<arg name="accel_rate" default="200hz"/>
2626
<arg name="accel_range" default="4g"/>
2727
<arg name="enable_gyro" default="false"/>
28-
<arg name="gyro_rate" default="100hz"/>
28+
<arg name="gyro_rate" default="200hz"/>
2929
<arg name="gyro_range" default="1000dps"/>
3030
<arg name="liner_accel_cov" default="0.01"/>
3131
<arg name="angular_vel_cov" default="0.01"/>

src/ob_camera_node.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ void OBCameraNode::startIMUSyncStream() {
298298
imuPipeline_->enableFrameSync();
299299
imuPipeline_->start(imuConfig, [&](std::shared_ptr<ob::Frame> frame) {
300300
auto frameSet = frame->as<ob::FrameSet>();
301+
if (!frameSet) {
302+
return;
303+
}
301304
auto aFrame = frameSet->getFrame(OB_FRAME_ACCEL);
302305
auto gFrame = frameSet->getFrame(OB_FRAME_GYRO);
303306
if (aFrame && gFrame) {
@@ -831,6 +834,7 @@ void OBCameraNode::onNewIMUFrameSyncOutputCallback(const std::shared_ptr<ob::Fra
831834
return;
832835
}
833836

837+
std::this_thread::sleep_for(std::chrono::nanoseconds(1));
834838
auto imu_msg = sensor_msgs::Imu();
835839
setDefaultIMUMessage(imu_msg);
836840

@@ -872,6 +876,8 @@ void OBCameraNode::onNewIMUFrameCallback(const std::shared_ptr<ob::Frame>& frame
872876
if (!has_subscriber) {
873877
return;
874878
}
879+
std::this_thread::sleep_for(std::chrono::nanoseconds(1));
880+
875881
auto imu_msg = sensor_msgs::Imu();
876882
setDefaultIMUMessage(imu_msg);
877883
imu_msg.header.frame_id = optical_frame_id_[stream_index];

0 commit comments

Comments
 (0)