You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while developing a hobby robot, I created hardware that interfaces with a vesc. to be able to control 4 motors each separately via a serial connection I created an urdf that instantiates 4 of them with different parameters.
I realized that during startup I always encountered the warning message
RCUTILS_LOG_WARN_NAMED(
"resource_manager",
"(hardware '%s'): '%s' command interface not in available list. "
"This should not happen (hint: multiple cleanup calls).",
hardware_name.c_str(), interface.c_str());
of the remove_all_hardware_interfaces_from_available_list method
analyzing the problem I found that the cause is due to the fact that when the first component is initialized but not the others, the following ResourceManager code occurs
// TODO(destogl): discuss what should be default return value, e.g., "NOT_EXECUTED"
return_type result = return_type::ERROR;
if (
impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE ||
impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
{
result = impl_->read(time, period);
if (result == return_type::ERROR)
{
error();
}
}
return result;
where all components except one return return_type::ERROR because are not yet configured.
This trigger all interfaces to be removed , living the hardware in indeterminate state.
correcting in
// TODO(destogl): discuss what should be default return value, e.g., "NOT_EXECUTED"
return_type result = return_type::ERROR;
if (
impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE ||
impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
{
result = impl_->write(time, period);
if (result == return_type::ERROR)
{
error();
}
} else if (
impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED
)
{
return return_type::OK;
}
return result;
suppress the removal of the interfaces until components are CONFIGURED.
if my analysis is correct I would have a pr with the reported correction.
On my hardware it seems to have resolved the instability.
The text was updated successfully, but these errors were encountered:
Background
while developing a hobby robot, I created hardware that interfaces with a vesc. to be able to control 4 motors each separately via a serial connection I created an urdf that instantiates 4 of them with different parameters.
I realized that during startup I always encountered the warning message
of the remove_all_hardware_interfaces_from_available_list method
analyzing the problem I found that the cause is due to the fact that when the first component is initialized but not the others, the following ResourceManager code occurs
where all components except one return return_type::ERROR because are not yet configured.
This trigger all interfaces to be removed , living the hardware in indeterminate state.
correcting in
suppress the removal of the interfaces until components are CONFIGURED.
if my analysis is correct I would have a pr with the reported correction.
On my hardware it seems to have resolved the instability.
The text was updated successfully, but these errors were encountered: