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
rclcpp;
33
using namespace
DQ_robotics;
34
35
namespace
sas
36
{
46
class
ForceSensorServer:
private
sas::Object
47
{
48
private
:
49
std::shared_ptr<Node> node_;
50
51
const
std::string topic_prefix_;
52
53
Publisher<geometry_msgs::msg::WrenchStamped>::SharedPtr publisher_wrench_;
54
public
:
55
ForceSensorServer() =
delete
;
56
ForceSensorServer(
const
ForceSensorServer&) =
delete
;
57
65
ForceSensorServer(
const
std::shared_ptr<Node>& node,
const
std::string& topic_prefix=
"GET_FROM_NODE"
);
66
73
void
send_force_torque
(
const
DQ& force,
const
DQ& torque)
const
;
74
80
std::string
get_topic_prefix
()
const
;
81
};
82
83
}
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
sas::Object
Base class for SAS objects.
Definition
sas_object.hpp:40
sas_object.hpp
Base object class for identification and license utilities.
src
sas_force_sensor
include
sas_force_sensor
sas_force_sensor_server.hpp
Generated by
1.17.0