sas
Modularised monitoring, logging, and control of robots.
Loading...
Searching...
No Matches
sas_robot_driver_example.hpp
Go to the documentation of this file.
1/*
2# Copyright (c) 2016-2026 Murilo Marques Marinho
3#
4# This file is part of sas_core.
5#
6# sas_core is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Lesser General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# sas_core is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with sas_core. If not, see <https://www.gnu.org/licenses/>.
18#
19# ################################################################
20#
21# Author: Murilo M. Marinho, email: murilomarinho@ieee.org
22#
23# ################################################################*/
32#pragma once
33
36#include <eigen3/Eigen/Dense>
37
38using namespace Eigen;
39
40namespace sas
41{
49{
50 std::string name;
51 VectorXd initial_joint_positions;
52 std::tuple<VectorXd,VectorXd> joint_limits;
53};
54
62 class RobotDriverExample: public RobotDriver
63{
64protected:
65 const RobotDriverExampleConfiguration configuration_;
66 VectorXd joint_positions_;
67
68public:
69 RobotDriverExample(RobotDriverExample&) = delete;
70 RobotDriverExample()=delete;
71
77 RobotDriverExample(const RobotDriverExampleConfiguration& configuration, const std::shared_ptr<ShutdownSignaler>& shutdown_signaler_);
78 [[deprecated("Use RobotDriverExample(const RobotDriverExampleConfiguration& configuration, const std::shared_ptr<ShutdownSignaler>& shutdown_signaler_) instead.")]]
79 RobotDriverExample(const RobotDriverExampleConfiguration& configuration, std::atomic_bool* break_loops);
80
85 virtual VectorXd get_joint_positions() override;
86
92 virtual void set_target_joint_positions(const VectorXd& set_target_joint_positions_rad) override;
93
97 virtual void connect() override;
98
102 virtual void disconnect() override;
103
107 virtual void initialize() override;
108
112 virtual void deinitialize() override;
113};
114}
virtual void initialize() override
Initialize the example driver.
Definition sas_robot_driver_example.cpp:68
virtual void connect() override
Connect the example driver (establish resources).
Definition sas_robot_driver_example.cpp:58
virtual void disconnect() override
Disconnect the example driver (release resources).
Definition sas_robot_driver_example.cpp:63
virtual void deinitialize() override
Deinitialize the example driver.
Definition sas_robot_driver_example.cpp:74
virtual VectorXd get_joint_positions() override
Get the current joint positions.
Definition sas_robot_driver_example.cpp:46
virtual void set_target_joint_positions(const VectorXd &set_target_joint_positions_rad) override
Set target joint positions.
Definition sas_robot_driver_example.cpp:51
Abstract RobotDriver interface and watchdog support.
Cross-module shutdown signaling class.
Configuration for the RobotDriverExample.
Definition sas_robot_driver_example.hpp:49