Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ template <class NODETYPE>
void NodeCanopen402Driver<NODETYPE>::deactivate(bool called_from_base)
{
NodeCanopenProxyDriver<NODETYPE>::deactivate(false);
timer_->cancel();
if(timer_ != nullptr){
timer_->cancel();
}
this->exec_->post([this]() { motor_.reset(); });

}

template <class NODETYPE>
Expand Down
7 changes: 5 additions & 2 deletions canopen_core/src/lifecycle_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ bool LifecycleManager::load_from_config()
for (auto it = devices.begin(); it != devices.end(); it++)
{
uint8_t node_id = config_->get_entry<uint8_t>(*it, "node_id").value();
std::string change_state_client_name = *it;
std::string get_state_client_name = *it;
std::string device_namespace = config_->get_entry<std::string>(*it, "namespace").value();
device_namespace += "/";
device_namespace += *it;
std::string change_state_client_name = device_namespace;
std::string get_state_client_name = device_namespace;
get_state_client_name += "/get_state";
change_state_client_name += "/change_state";
RCLCPP_INFO(this->get_logger(), "Found %s (node_id=%hu)", it->c_str(), node_id);
Expand Down