-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- binaries
- Version or commit hash:
- rolling
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
rclcpp/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp
Lines 527 to 535 in 3123f5a
| on_deactivate() | |
| { | |
| for (const auto & weak_entity : weak_managed_entities_) { | |
| auto entity = weak_entity.lock(); | |
| if (entity) { | |
| entity->on_activate(); | |
| } | |
| } | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working