Skip to content

Commit cfcb668

Browse files
zygfrydwZygfryd Wieszok
authored andcommitted
Read predict_to_current_time from ROS parameters (#737)
Co-authored-by: Zygfryd Wieszok <[email protected]>
1 parent 133d263 commit cfcb668

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ros_filter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ RosFilter<T>::RosFilter(const rclcpp::NodeOptions & options)
7878
latest_control_(),
7979
last_diag_time_(0, 0, RCL_ROS_TIME),
8080
last_published_stamp_(0, 0, RCL_ROS_TIME),
81+
predict_to_current_time_(false),
8182
last_set_pose_time_(0, 0, RCL_ROS_TIME),
8283
latest_control_time_(0, 0, RCL_ROS_TIME),
8384
tf_timeout_(0ns),
@@ -849,6 +850,8 @@ void RosFilter<T>::loadParams()
849850
// Update frequency and sensor timeout
850851
frequency_ = this->declare_parameter("frequency", 30.0);
851852

853+
predict_to_current_time_ = this->declare_parameter<bool>("predict_to_current_time", false);
854+
852855
double sensor_timeout = this->declare_parameter("sensor_timeout", 1.0 / frequency_);
853856
filter_.setSensorTimeout(rclcpp::Duration::from_seconds(sensor_timeout));
854857

0 commit comments

Comments
 (0)