Skip to content

Commit

Permalink
non transmit time from bus.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-vsp committed Nov 3, 2023
1 parent e6fcd6d commit 3e53a2f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ void NodeCanopenBaseDriver<NODETYPE>::init(bool called_from_base)
template <>
void NodeCanopenBaseDriver<rclcpp_lifecycle::LifecycleNode>::configure(bool called_from_base)
{
try
{
this->non_transmit_timeout_ =
std::chrono::milliseconds(this->config_["non_transmit_timeout"].as<int>());
}
catch (...)
{
}
RCLCPP_INFO(
this->node_->get_logger(), "Non transmit timeout %d", this->non_transmit_timeout_.count());

try
{
polling_ = this->config_["polling"].as<bool>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class NodeCanopenMaster : public NodeCanopenMasterInterface
std::string master_bin_;
std::string can_interface_name_;
uint32_t timeout_;

std::thread spinner_;

public:
Expand Down Expand Up @@ -167,14 +167,14 @@ class NodeCanopenMaster : public NodeCanopenMasterInterface
this->configured_.store(true);
}

virtual void configure(bool called_from_base)
virtual void configure(bool called_from_base)
{
std::optional<int> timeout;
try
{
timeout = this->config_["boot_timeout"].as<int>();
}
catch(...)
catch (...)
{
RCLCPP_WARN(
this->node_->get_logger(),
Expand Down

0 comments on commit 3e53a2f

Please sign in to comment.