sas
Modularised monitoring, logging, and control of robots.
Toggle main menu visibility
Loading...
Searching...
No Matches
sas_robot_driver_kuka.hpp
1
#pragma once
2
/*
3
# Copyright (c) 2016-2024 Murilo Marques Marinho
4
#
5
# This file is part of sas_robot_driver_kuka.
6
#
7
# sas_robot_driver_kuka 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_robot_driver_kuka 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_robot_driver_kuka. If not, see <https://www.gnu.org/licenses/>.
19
#
20
# ################################################################
21
#
22
# Author: Murilo M. Marinho, email: murilomarinho@ieee.org
23
# Based on sas_robot_driver_denso.h
24
#
25
# ################################################################*/
26
27
#include <atomic>
28
#include <thread>
29
30
#include <
sas_core/sas_robot_driver.hpp
>
31
32
using namespace
Eigen;
33
34
namespace
sas
35
{
36
//Declared internally
37
class
DriverBcap;
38
39
struct
RobotDriverKukaConfiguration
40
{
41
std::string name;
42
std::tuple<VectorXd,VectorXd> joint_limits;
43
};
44
45
class
RobotDriverKuka:
public
RobotDriver
46
{
47
private
:
48
RobotDriverKukaConfiguration
configuration_;
49
std::thread fri_thread_;
50
51
//Implementation details that depend on FRI source files.
52
class
Impl;
53
std::unique_ptr<Impl> impl_;
54
public
:
55
56
RobotDriverKuka(
const
RobotDriverKuka&)=
delete
;
57
RobotDriverKuka()=
delete
;
58
~RobotDriverKuka();
59
60
RobotDriverKuka(
const
RobotDriverKukaConfiguration
& configuration, std::atomic_bool* break_loops);
61
62
VectorXd
get_joint_positions
()
override
;
63
void
set_target_joint_positions
(
const
VectorXd& desired_joint_positions_rad)
override
;
64
65
VectorXd
get_joint_torques
()
override
;
66
67
void
connect
()
override
;
68
void
disconnect
()
override
;
69
70
void
initialize
()
override
;
71
void
deinitialize
()
override
;
72
73
};
74
}
sas::RobotDriverKuka::set_target_joint_positions
void set_target_joint_positions(const VectorXd &desired_joint_positions_rad) override
Set target joint positions.
sas::RobotDriverKuka::get_joint_positions
VectorXd get_joint_positions() override
Get current joint positions.
sas::RobotDriverKuka::get_joint_torques
VectorXd get_joint_torques() override
Get current joint torques.
sas::RobotDriverKuka::connect
void connect() override
Connect to the underlying robot/hardware.
sas::RobotDriverKuka::deinitialize
void deinitialize() override
Deinitialize the driver resources.
sas::RobotDriverKuka::disconnect
void disconnect() override
Disconnect from the underlying robot/hardware.
sas::RobotDriverKuka::initialize
void initialize() override
Initialize the driver resources.
sas_robot_driver.hpp
Abstract RobotDriver interface and watchdog support.
sas::RobotDriverKukaConfiguration
Definition
sas_robot_driver_kuka.hpp:40
src
sas_robot_driver_kuka
include
sas_robot_driver_kuka
sas_robot_driver_kuka.hpp
Generated by
1.17.0