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-2023 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
35#include <eigen3/Eigen/Dense>
36
37using namespace Eigen;
38
39namespace sas
40{
41
43{
44 std::string name;
45 VectorXd initial_joint_positions;
46 std::tuple<VectorXd,VectorXd> joint_limits;
47};
48
50{
51protected:
52 const RobotDriverExampleConfiguration configuration_;
53 VectorXd joint_positions_;
54
55public:
57 RobotDriverExample()=delete;
58
64 RobotDriverExample(const RobotDriverExampleConfiguration& configuration, std::atomic_bool* break_loops);
65
70 virtual VectorXd get_joint_positions() override;
71
76 virtual void set_target_joint_positions(const VectorXd& set_target_joint_positions_rad) override;
77
81 virtual void connect() override;
82
86 virtual void disconnect() override;
87
91 virtual void initialize() override;
92
96 virtual void deinitialize() override;
97};
98}
Definition sas_robot_driver_example.hpp:50
virtual void initialize() override
Initialize the example driver.
Definition sas_robot_driver_example.cpp:56
virtual void connect() override
Connect the example driver (establish resources)
Definition sas_robot_driver_example.cpp:46
virtual void disconnect() override
Disconnect the example driver (release resources)
Definition sas_robot_driver_example.cpp:51
virtual void deinitialize() override
Deinitialize the example driver.
Definition sas_robot_driver_example.cpp:62
virtual VectorXd get_joint_positions() override
Get the current joint positions.
Definition sas_robot_driver_example.cpp:34
virtual void set_target_joint_positions(const VectorXd &set_target_joint_positions_rad) override
Set target joint positions.
Definition sas_robot_driver_example.cpp:39
Definition sas_robot_driver.hpp:54
Abstract RobotDriver interface and watchdog support.
Definition sas_robot_driver_example.hpp:43