franka_state_controller.h
Go to the documentation of this file.
1 // Copyright (c) 2017 Franka Emika GmbH
2 // Use of this source code is governed by the Apache-2.0 license, see LICENSE
3 #pragma once
4 
5 #include <cstdint>
6 #include <memory>
7 #include <vector>
8 
11 #include <franka_hw/trigger_rate.h>
12 #include <franka_msgs/FrankaState.h>
13 #include <geometry_msgs/WrenchStamped.h>
15 #include <sensor_msgs/JointState.h>
16 #include <tf2_msgs/TFMessage.h>
17 
18 namespace franka_control {
19 
24  : public controller_interface::MultiInterfaceController<franka_hw::FrankaStateInterface> {
25  public:
29  FrankaStateController() = default;
30 
38  bool init(hardware_interface::RobotHW* robot_hardware,
39  ros::NodeHandle& root_node_handle,
40  ros::NodeHandle& controller_node_handle) override;
41 
48  void update(const ros::Time& time, const ros::Duration& period) override;
49 
50  private:
51  void publishFrankaStates(const ros::Time& time);
52  void publishJointStates(const ros::Time& time);
53  void publishTransforms(const ros::Time& time);
54  void publishExternalWrench(const ros::Time& time);
55 
56  std::string arm_id_;
57 
59  std::unique_ptr<franka_hw::FrankaStateHandle> franka_state_handle_{};
60 
68  uint64_t sequence_number_ = 0;
69  std::vector<std::string> joint_names_;
70 };
71 
72 } // namespace franka_control
std::unique_ptr< franka_hw::FrankaStateHandle > franka_state_handle_
realtime_tools::RealtimePublisher< sensor_msgs::JointState > publisher_joint_states_desired_
Controller to publish the robot state as ROS topics.
void update(const ros::Time &time, const ros::Duration &period) override
Reads the current robot state from the franka_hw::FrankaStateInterface and publishes it...
FrankaStateController()=default
Creates an instance of a FrankaStateController.
void publishExternalWrench(const ros::Time &time)
bool init(hardware_interface::RobotHW *robot_hardware, ros::NodeHandle &root_node_handle, ros::NodeHandle &controller_node_handle) override
Initializes the controller with interfaces and publishers.
realtime_tools::RealtimePublisher< sensor_msgs::JointState > publisher_joint_states_
realtime_tools::RealtimePublisher< tf2_msgs::TFMessage > publisher_transforms_
franka_hw::FrankaStateInterface * franka_state_interface_
realtime_tools::RealtimePublisher< franka_msgs::FrankaState > publisher_franka_states_
realtime_tools::RealtimePublisher< geometry_msgs::WrenchStamped > publisher_external_wrench_


franka_control
Author(s): Franka Emika GmbH
autogenerated on Fri Oct 23 2020 03:47:10