mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 03:57:46 +08:00
Change default enable_imu parameter to false
This commit is contained in:
@@ -188,7 +188,7 @@ def generate_launch_description():
|
||||
),
|
||||
DeclareLaunchArgument(
|
||||
'enable_imu',
|
||||
default_value='true',
|
||||
default_value='false',
|
||||
description='Enable IMU (accelerometer and gyroscope) data publishing.'
|
||||
),
|
||||
DeclareLaunchArgument(
|
||||
|
||||
@@ -576,6 +576,11 @@ void OBLidarNode::onNewIMUFrameCallback(const std::shared_ptr<ob::Frame> &accelf
|
||||
return;
|
||||
}
|
||||
|
||||
if (!tf_published_) {
|
||||
publishStaticTransforms();
|
||||
tf_published_ = true;
|
||||
}
|
||||
|
||||
bool has_subscriber = imu_publisher_->get_subscription_count() > 0;
|
||||
if (!has_subscriber) {
|
||||
return;
|
||||
@@ -621,7 +626,7 @@ void OBLidarNode::onNewFrameSetCallback(std::shared_ptr<ob::FrameSet> frame_set)
|
||||
}
|
||||
try {
|
||||
RCLCPP_INFO_ONCE(logger_, "New frame received");
|
||||
if (!tf_published_) {
|
||||
if (!tf_published_ && !enable_imu_) {
|
||||
publishStaticTransforms();
|
||||
tf_published_ = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user