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