File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -375,7 +375,7 @@ class OBCameraNode {
375375 std::unique_ptr<ob::Pipeline> imuPipeline_ = nullptr ;
376376 std::atomic_bool pipeline_started_{false };
377377 std::string camera_name_ = " camera" ;
378- const std::string imu_optical_frame_id_ = " camera_gyro_optical_frame " ;
378+ std::string accel_gyro_frame_id_ = " camera_accel_gyro_optical_frame " ;
379379 const std::string imu_frame_id_ = " camera_gyro_frame" ;
380380 std::shared_ptr<ob::Config> pipeline_config_ = nullptr ;
381381 std::map<stream_index_pair, std::shared_ptr<ob::Sensor>> sensors_;
Original file line number Diff line number Diff line change @@ -1133,6 +1133,8 @@ void OBCameraNode::getParameters() {
11331133 depth_aligned_frame_id_[stream_index] = optical_frame_id_[COLOR];
11341134 }
11351135
1136+ accel_gyro_frame_id_ = camera_name_ + " _accel_gyro_optical_frame" ;
1137+
11361138 setAndGetNodeParameter (enable_sync_output_accel_gyro_, " enable_sync_output_accel_gyro" , false );
11371139 for (const auto &stream_index : HID_STREAMS) {
11381140 std::string param_name = stream_name_[stream_index] + " _qos" ;
@@ -2318,7 +2320,7 @@ void OBCameraNode::onNewIMUFrameSyncOutputCallback(const std::shared_ptr<ob::Fra
23182320 accel_info.header = imu_msg.header ;
23192321 imu_info_publishers_[ACCEL]->publish (accel_info);
23202322
2321- imu_msg.header .frame_id = imu_optical_frame_id_ ;
2323+ imu_msg.header .frame_id = accel_gyro_frame_id_ ;
23222324
23232325 auto gyro_frame = gryoframe->as <ob::GyroFrame>();
23242326 auto gyroData = gyro_frame->getValue ();
You can’t perform that action at this time.
0 commit comments