Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
nachovizzo committed Mar 1, 2024
1 parent 3874ffd commit d1dcb48
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ros/src/OdometryServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ OdometryServer::OdometryServer(const rclcpp::NodeOptions &options)
Sophus::SE3d OdometryServer::LookupTransform(const std::string &target_frame,
const std::string &source_frame) const {
std::string err_msg;
if (tf2_buffer_->_frameExists(source_frame) && //
tf2_buffer_->_frameExists(target_frame) && //
tf2_buffer_->canTransform(target_frame, source_frame, tf2::TimePointZero, &err_msg)) {
if (tf2_buffer_->canTransform(target_frame, source_frame, tf2::TimePointZero, &err_msg)) {
try {
auto tf = tf2_buffer_->lookupTransform(target_frame, source_frame, tf2::TimePointZero);
return tf2::transformToSophus(tf);
Expand Down

0 comments on commit d1dcb48

Please sign in to comment.