Skip to content

Commit

Permalink
Read predict_to_current_time from ROS parameters (#737)
Browse files Browse the repository at this point in the history
Co-authored-by: Zygfryd Wieszok <zwieszok@autonomous-systems.pl>
  • Loading branch information
2 people authored and ayrton04 committed May 5, 2022
1 parent 133d263 commit cfcb668
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ros_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ RosFilter<T>::RosFilter(const rclcpp::NodeOptions & options)
latest_control_(),
last_diag_time_(0, 0, RCL_ROS_TIME),
last_published_stamp_(0, 0, RCL_ROS_TIME),
predict_to_current_time_(false),
last_set_pose_time_(0, 0, RCL_ROS_TIME),
latest_control_time_(0, 0, RCL_ROS_TIME),
tf_timeout_(0ns),
Expand Down Expand Up @@ -849,6 +850,8 @@ void RosFilter<T>::loadParams()
// Update frequency and sensor timeout
frequency_ = this->declare_parameter("frequency", 30.0);

predict_to_current_time_ = this->declare_parameter<bool>("predict_to_current_time", false);

double sensor_timeout = this->declare_parameter("sensor_timeout", 1.0 / frequency_);
filter_.setSensorTimeout(rclcpp::Duration::from_seconds(sensor_timeout));

Expand Down

0 comments on commit cfcb668

Please sign in to comment.