franka_combined_hw.h
Go to the documentation of this file.
1 // Copyright (c) 2019 Franka Emika GmbH
2 // Use of this source code is governed by the Apache-2.0 license, see LICENSE
3 #pragma once
4 
7 #include <franka_msgs/ErrorRecoveryAction.h>
8 
10 #include <ros/node_handle.h>
11 #include <ros/time.h>
12 
13 #include <memory>
14 
15 namespace franka_hw {
16 
18  public:
23 
24  ~FrankaCombinedHW() override = default; // NOLINT (clang-analyzer-optin.cplusplus.VirtualCall)
25 
35  bool init(ros::NodeHandle& root_nh, ros::NodeHandle& robot_hw_nh) override;
36 
43  void read(const ros::Time& time, const ros::Duration& period) override;
44 
50  bool controllerNeedsReset();
51 
55  void connect();
56 
61  bool disconnect();
62 
67  bool hasError();
68 
69  protected:
70  std::unique_ptr<actionlib::SimpleActionServer<franka_msgs::ErrorRecoveryAction>>
74 
75  private:
76  void handleError();
77  void triggerError();
78  bool is_recovering_{false};
79 };
80 
81 } // namespace franka_hw
~FrankaCombinedHW() override=default
ros::ServiceServer disconnect_server_
bool hasError()
Checks whether the robots are in error or reflex mode.
bool controllerNeedsReset()
Checks whether the controller needs to be reset.
ros::ServiceServer connect_server_
bool init(ros::NodeHandle &root_nh, ros::NodeHandle &robot_hw_nh) override
The init function is called to initialize the CombinedFrankaHW from a non-realtime thread...
void connect()
Calls connect on all hardware classes that are of type FrankaCombinableHW.
FrankaCombinedHW()
Creates an instance of CombinedFrankaHW.
std::unique_ptr< actionlib::SimpleActionServer< franka_msgs::ErrorRecoveryAction > > combined_recovery_action_server_
bool disconnect()
Tries to disconnect on all hardware classes that are of type FrankaCombinableHW.
void read(const ros::Time &time, const ros::Duration &period) override
Reads data from the robot HW.


franka_hw
Author(s): Franka Emika GmbH
autogenerated on Mon Sep 19 2022 03:05:56