Skip to content

Commit

Permalink
feat(autonomous_emergency_braking): increase aeb speed by getting las…
Browse files Browse the repository at this point in the history
…t transform (autowarefoundation#8734)

set stamp to 0 to get the latest stamp instead of waiting for the stamp

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
  • Loading branch information
danielsanchezaran authored Sep 3, 2024
1 parent 9aed218 commit c0fa137
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions control/autoware_autonomous_emergency_braking/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void AEB::onImu(const Imu::ConstSharedPtr input_msg)
geometry_msgs::msg::TransformStamped transform_stamped{};
try {
transform_stamped = tf_buffer_.lookupTransform(
"base_link", input_msg->header.frame_id, input_msg->header.stamp,
"base_link", input_msg->header.frame_id, rclcpp::Time(0),
rclcpp::Duration::from_seconds(0.5));
} catch (tf2::TransformException & ex) {
RCLCPP_ERROR_STREAM(
Expand Down Expand Up @@ -631,7 +631,7 @@ std::optional<Path> AEB::generateEgoPath(const Trajectory & predicted_traj)
geometry_msgs::msg::TransformStamped transform_stamped{};
try {
transform_stamped = tf_buffer_.lookupTransform(
"base_link", predicted_traj.header.frame_id, predicted_traj.header.stamp,
"base_link", predicted_traj.header.frame_id, rclcpp::Time(0),
rclcpp::Duration::from_seconds(0.5));
} catch (tf2::TransformException & ex) {
RCLCPP_ERROR_STREAM(
Expand Down Expand Up @@ -705,7 +705,7 @@ void AEB::createObjectDataUsingPredictedObjects(
geometry_msgs::msg::TransformStamped transform_stamped{};
try {
transform_stamped = tf_buffer_.lookupTransform(
"base_link", predicted_objects_ptr_->header.frame_id, stamp,
"base_link", predicted_objects_ptr_->header.frame_id, rclcpp::Time(0),
rclcpp::Duration::from_seconds(0.5));
} catch (tf2::TransformException & ex) {
RCLCPP_ERROR_STREAM(get_logger(), "[AEB] Failed to look up transform from base_link to map");
Expand Down

0 comments on commit c0fa137

Please sign in to comment.