libfranka
0.14.1
FCI C++ API
Toggle main menu visibility
Loading...
Searching...
No Matches
include
franka
exception.h
Go to the documentation of this file.
1
// Copyright (c) 2023 Franka Robotics GmbH
2
// Use of this source code is governed by the Apache-2.0 license, see LICENSE
3
#pragma once
4
5
#include <stdexcept>
6
#include <string>
7
8
#include <
franka/log.h
>
9
14
15
namespace
franka {
16
20
struct
Exception
:
public
std::runtime_error {
21
using
std::runtime_error::runtime_error;
22
};
23
27
struct
ModelException
:
public
Exception
{
28
using
Exception::Exception;
29
};
30
35
struct
NetworkException
:
public
Exception
{
36
using
Exception::Exception;
37
};
38
42
struct
ProtocolException
:
public
Exception
{
43
using
Exception::Exception;
44
};
45
49
struct
IncompatibleVersionException
:
public
Exception
{
55
IncompatibleVersionException
(uint16_t
server_version
, uint16_t
library_version
)
noexcept
;
56
60
const
uint16_t
server_version
;
64
const
uint16_t
library_version
;
65
};
66
73
struct
ControlException
:
public
Exception
{
80
explicit
ControlException
(
const
std::string& what, std::vector<franka::Record>
log
= {})
noexcept
;
81
85
const
std::vector<franka::Record>
log
;
86
};
87
91
struct
CommandException
:
public
Exception
{
92
using
Exception::Exception;
93
};
94
98
struct
RealtimeException
:
public
Exception
{
99
using
Exception::Exception;
100
};
101
105
struct
InvalidOperationException
:
public
Exception
{
106
using
Exception::Exception;
107
};
108
109
}
// namespace franka
log.h
Contains helper types for logging sent commands and received robot states.
franka::CommandException
CommandException is thrown if an error occurs during command execution.
Definition
exception.h:91
franka::ControlException::ControlException
ControlException(const std::string &what, std::vector< franka::Record > log={}) noexcept
Creates the exception with an explanatory string and a Log object.
franka::ControlException::log
const std::vector< franka::Record > log
Vector of states and commands logged just before the exception occurred.
Definition
exception.h:85
franka::Exception
Base class for all exceptions used by libfranka.
Definition
exception.h:20
franka::IncompatibleVersionException::server_version
const uint16_t server_version
Control's protocol version.
Definition
exception.h:60
franka::IncompatibleVersionException::IncompatibleVersionException
IncompatibleVersionException(uint16_t server_version, uint16_t library_version) noexcept
Creates the exception using the two different protocol versions.
franka::IncompatibleVersionException::library_version
const uint16_t library_version
libfranka protocol version.
Definition
exception.h:64
franka::InvalidOperationException
InvalidOperationException is thrown if an operation cannot be performed.
Definition
exception.h:105
franka::ModelException
ModelException is thrown if an error occurs when loading the model library.
Definition
exception.h:27
franka::NetworkException
NetworkException is thrown if a connection to the robot cannot be established, or when a timeout occu...
Definition
exception.h:35
franka::ProtocolException
ProtocolException is thrown if the robot returns an incorrect message.
Definition
exception.h:42
franka::RealtimeException
RealtimeException is thrown if realtime priority cannot be set.
Definition
exception.h:98
Generated by
1.17.0