-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added virtual ft broadcaster template
- Loading branch information
Showing
5 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
lbr_ros2_control/include/lbr_ros2_control/lbr_virtual_ft_broadcaster.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#ifndef LBR_ROS2_CONTROL__LBR_VIRTUAL_FT_BROADCASTER_HPP_ | ||
#define LBR_ROS2_CONTROL__LBR_VIRTUAL_FT_BROADCASTER_HPP_ | ||
|
||
#include <limits> | ||
#include <memory> | ||
#include <stdexcept> | ||
|
||
#include "controller_interface/controller_interface.hpp" | ||
#include "geometry_msgs/msg/wrench_stamped.hpp" | ||
#include "hardware_interface/types/hardware_interface_type_values.hpp" | ||
#include "rclcpp/rclcpp.hpp" | ||
#include "realtime_tools/realtime_publisher.h" | ||
|
||
#include "friClientIf.h" | ||
|
||
#include "lbr_ros2_control/lbr_system_interface_type_values.hpp" | ||
|
||
namespace lbr_ros2_control { | ||
class LBRVirtualFTBroadcaster : public controller_interface::ControllerInterface { | ||
public: | ||
LBRVirtualFTBroadcaster() = default; | ||
|
||
controller_interface::InterfaceConfiguration command_interface_configuration() const override; | ||
|
||
controller_interface::InterfaceConfiguration state_interface_configuration() const override; | ||
|
||
controller_interface::CallbackReturn on_init() override; | ||
|
||
controller_interface::return_type update(const rclcpp::Time &time, | ||
const rclcpp::Duration &period) override; | ||
|
||
controller_interface::CallbackReturn | ||
on_configure(const rclcpp_lifecycle::State &previous_state) override; | ||
|
||
controller_interface::CallbackReturn | ||
on_activate(const rclcpp_lifecycle::State &previous_state) override; | ||
|
||
controller_interface::CallbackReturn | ||
on_deactivate(const rclcpp_lifecycle::State &previous_state) override; | ||
|
||
protected: | ||
rclcpp::Publisher<geometry_msgs::msg::WrenchStamped>::SharedPtr wrench_stamped_publisher_ptr_; | ||
std::shared_ptr<realtime_tools::RealtimePublisher<geometry_msgs::msg::WrenchStamped>> | ||
rt_wrench_stamped_publisher_ptr_; | ||
}; | ||
} // end of namespace lbr_ros2_control | ||
#endif // LBR_ROS2_CONTROL__LBR_VIRTUAL_FT_BROADCASTER_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "lbr_ros2_control/lbr_virtual_ft_broadcaster.hpp" | ||
|
||
namespace lbr_ros2_control { | ||
controller_interface::InterfaceConfiguration | ||
LBRVirtualFTBroadcaster::command_interface_configuration() const override; | ||
|
||
controller_interface::InterfaceConfiguration | ||
LBRVirtualFTBroadcaster::state_interface_configuration() const override; | ||
|
||
controller_interface::CallbackReturn LBRVirtualFTBroadcaster::on_init() override; | ||
|
||
controller_interface::return_type | ||
LBRVirtualFTBroadcaster::update(const rclcpp::Time &time, const rclcpp::Duration &period) override; | ||
|
||
controller_interface::CallbackReturn | ||
LBRVirtualFTBroadcaster::on_configure(const rclcpp_lifecycle::State &previous_state) override; | ||
|
||
controller_interface::CallbackReturn | ||
LBRVirtualFTBroadcaster::on_activate(const rclcpp_lifecycle::State &previous_state) override; | ||
|
||
controller_interface::CallbackReturn | ||
LBRVirtualFTBroadcaster::on_deactivate(const rclcpp_lifecycle::State &previous_state) override; | ||
} // end of namespace lbr_ros2_control |