mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-10 14:39:49 +08:00
Update accel_gyro_frame_id
This commit is contained in:
@@ -353,7 +353,7 @@ class OBCameraNode {
|
|||||||
std::unique_ptr<ob::Pipeline> imuPipeline_ = nullptr;
|
std::unique_ptr<ob::Pipeline> imuPipeline_ = nullptr;
|
||||||
std::atomic_bool pipeline_started_{false};
|
std::atomic_bool pipeline_started_{false};
|
||||||
std::string camera_name_ = "camera";
|
std::string camera_name_ = "camera";
|
||||||
const std::string imu_optical_frame_id_ = "camera_gyro_optical_frame";
|
std::string accel_gyro_frame_id_ = "camera_accel_gyro_optical_frame";
|
||||||
const std::string imu_frame_id_ = "camera_gyro_frame";
|
const std::string imu_frame_id_ = "camera_gyro_frame";
|
||||||
std::shared_ptr<ob::Config> pipeline_config_ = nullptr;
|
std::shared_ptr<ob::Config> pipeline_config_ = nullptr;
|
||||||
std::map<stream_index_pair, std::shared_ptr<ob::Sensor>> sensors_;
|
std::map<stream_index_pair, std::shared_ptr<ob::Sensor>> sensors_;
|
||||||
|
|||||||
@@ -1039,6 +1039,8 @@ void OBCameraNode::getParameters() {
|
|||||||
camera_name_ + "_" + stream_name_[COLOR] + "_optical_frame";
|
camera_name_ + "_" + stream_name_[COLOR] + "_optical_frame";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
accel_gyro_frame_id_ = camera_name_ + "_accel_gyro_optical_frame";
|
||||||
|
|
||||||
setAndGetNodeParameter(publish_tf_, "publish_tf", true);
|
setAndGetNodeParameter(publish_tf_, "publish_tf", true);
|
||||||
setAndGetNodeParameter(tf_publish_rate_, "tf_publish_rate", 0.0);
|
setAndGetNodeParameter(tf_publish_rate_, "tf_publish_rate", 0.0);
|
||||||
setAndGetNodeParameter(depth_registration_, "depth_registration", false);
|
setAndGetNodeParameter(depth_registration_, "depth_registration", false);
|
||||||
@@ -2219,7 +2221,7 @@ void OBCameraNode::onNewIMUFrameSyncOutputCallback(const std::shared_ptr<ob::Fra
|
|||||||
accel_info.header = imu_msg.header;
|
accel_info.header = imu_msg.header;
|
||||||
imu_info_publishers_[ACCEL]->publish(accel_info);
|
imu_info_publishers_[ACCEL]->publish(accel_info);
|
||||||
|
|
||||||
imu_msg.header.frame_id = imu_optical_frame_id_;
|
imu_msg.header.frame_id = accel_gyro_frame_id_;
|
||||||
|
|
||||||
auto gyro_frame = gryoframe->as<ob::GyroFrame>();
|
auto gyro_frame = gryoframe->as<ob::GyroFrame>();
|
||||||
auto gyroData = gyro_frame->value();
|
auto gyroData = gyro_frame->value();
|
||||||
|
|||||||
Reference in New Issue
Block a user