Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygerardmoore committed Dec 20, 2024
1 parent 382ac3d commit 25b27d4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions fuse_models/src/transform_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,18 @@ void TransformSensor::onInit()

if (params_.position_indices.empty() && params_.orientation_indices.empty())
{
throw std::runtime_error("No dimensions specified, so this sensor would not do anything (tf data would be ignored).");
throw std::runtime_error(
"No dimensions specified, so this sensor would not do anything (tf data would be ignored).");
}

if (params_.transforms.empty()) {
throw std::runtime_error("No transforms specified, this sensor would not do anything (all tf data would be ignored).");
if (params_.transforms.empty())
{
throw std::runtime_error(
"No transforms specified, this sensor would not do anything (all tf data would be ignored).");
}

for (auto const& name : params_.transforms) {
for (auto const& name : params_.transforms)
{
transforms_of_interest_.insert(name);
}

Expand Down Expand Up @@ -122,7 +126,8 @@ void TransformSensor::process(MessageType const& msg)
for (auto const& transform : msg.transforms)
{
std::string const& tf_name = transform.child_frame_id;
if (transforms_of_interest_.find(tf_name) == transforms_of_interest_.end()) {
if (transforms_of_interest_.find(tf_name) == transforms_of_interest_.end())
{
// we don't care about this transform, skip it
RCLCPP_DEBUG(logger_, "Ignoring transform from %s to %s", transform.header.frame_id.c_str(), tf_name.c_str());
continue;
Expand Down

0 comments on commit 25b27d4

Please sign in to comment.