sas
Modularised monitoring, logging, and control of robots.
Toggle main menu visibility
Loading...
Searching...
No Matches
sas_force_sensor_server.hpp
1
#pragma once
2
/*
3
# Copyright (c) 2020-2026 Murilo Marques Marinho
4
#
5
# This file is part of sas_force_sensor.
6
#
7
# sas_force_sensor is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU Lesser General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# sas_force_sensor is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU Lesser General Public License for more details.
16
#
17
# You should have received a copy of the GNU Lesser General Public License
18
# along with sas_force_sensor. If not, see <https://www.gnu.org/licenses/>.
19
#
20
# ################################################################
21
#
22
# Author: Murilo M. Marinho, email: murilomarinho@ieee.org
23
#
24
# ################################################################*/
25
26
#include <dqrobotics/DQ.h>
27
28
#include <rclcpp/rclcpp.hpp>
29
#include <geometry_msgs/msg/wrench_stamped.hpp>
30
#include <sas_core/sas_object.hpp>
31
32
using namespace
DQ_robotics;
33
34
namespace
sas
35
{
45
class
ForceSensorServer:
private
sas::Object
46
{
47
private
:
48
std::shared_ptr<rclcpp::Node> node_;
49
50
const
std::string topic_prefix_;
51
52
rclcpp::Publisher<geometry_msgs::msg::WrenchStamped>::SharedPtr publisher_wrench_;
53
public
:
54
ForceSensorServer() =
delete
;
55
ForceSensorServer(
const
ForceSensorServer&) =
delete
;
56
64
ForceSensorServer(
const
std::shared_ptr<rclcpp::Node>& node,
const
std::string& topic_prefix=
"GET_FROM_NODE"
);
65
72
void
send_force_torque
(
const
DQ& force,
const
DQ& torque)
const
;
73
79
std::string
get_topic_prefix
()
const
;
80
};
81
82
}
marinholab::sas::core::Object
Base class for SAS objects.
Definition
sas_object.hpp:40
sas::ForceSensorServer::get_topic_prefix
std::string get_topic_prefix() const
Get the configured topic prefix.
Definition
sas_force_sensor_server.cpp:46
sas::ForceSensorServer::send_force_torque
void send_force_torque(const DQ &force, const DQ &torque) const
Publish the current force/torque reading.
Definition
sas_force_sensor_server.cpp:41
src
sas_force_sensor
include
sas_force_sensor
sas_force_sensor_server.hpp
Generated by
1.17.0