Skip to content

Commit

Permalink
check the components size instead of the variable (fixes #1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Jan 16, 2024
1 parent 3309c6d commit c4c060f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,12 @@ void ResourceManager::load_urdf(const std::string & urdf, bool validate_interfac
resource_storage_->systems_.size());
}

bool ResourceManager::is_urdf_already_loaded() const { return is_urdf_loaded__; }
bool ResourceManager::is_urdf_already_loaded() const
{
return (
!resource_storage_->actuators_.empty() || !resource_storage_->sensors_.empty() ||
!resource_storage_->systems_.empty());
}

// CM API: Called in "update"-thread
LoanedStateInterface ResourceManager::claim_state_interface(const std::string & key)
Expand Down

0 comments on commit c4c060f

Please sign in to comment.