Bug report
Required Info:
- Operating System:
- Installation type:
- Version or commit hash:
Steps to reproduce issue
LNI::CallbackReturn PackageName::on_deactivate(const rclcpp_lifecycle::State& state)
{
publisher_->on_deactivate();
auto pub_activated_before = publisher_->is_activated();
LifecycleNode::on_deactivate(state);
auto pub_activated_after = publisher_->is_activated();
return LNI::CallbackReturn::SUCCESS;
}
Expected behavior
In this snippet, pub_activated_before is false and pub_activated_after is true.
Actual behavior
In this snippet, pub_activated_before is false and pub_activated_after is false.
Additional information
It seems that on_activate and on_deactivate were inverted here
|
on_deactivate() |
|
{ |
|
for (const auto & weak_entity : weak_managed_entities_) { |
|
auto entity = weak_entity.lock(); |
|
if (entity) { |
|
entity->on_activate(); |
|
} |
|
} |
|
} |
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
In this snippet,
pub_activated_beforeis false andpub_activated_afteris true.Actual behavior
In this snippet,
pub_activated_beforeis false andpub_activated_afteris false.Additional information
It seems that
on_activateandon_deactivatewere inverted hererclcpp/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp
Lines 527 to 535 in 3123f5a