Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpRobotUniversalRobots.h
1
/*
2
* ViSP, open source Visual Servoing Platform software.
3
* Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4
*
5
* This software is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
* See the file LICENSE.txt at the root directory of this source
10
* distribution for additional information about the GNU GPL.
11
*
12
* For using ViSP with software that can not be combined with the GNU
13
* GPL, please contact Inria about acquiring a ViSP Professional
14
* Edition License.
15
*
16
* See https://visp.inria.fr for more information.
17
*
18
* This software was developed at:
19
* Inria Rennes - Bretagne Atlantique
20
* Campus Universitaire de Beaulieu
21
* 35042 Rennes Cedex
22
* France
23
*
24
* If you have questions regarding the use of this file, please contact
25
* Inria at visp@inria.fr
26
*
27
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
*
30
* Description:
31
* Interface for Universal Robot.
32
*/
33
34
#ifndef VP_ROBOT_UNIVERSAL_ROBOTS_H
35
#define VP_ROBOT_UNIVERSAL_ROBOTS_H
36
37
#include <visp3/core/vpConfig.h>
38
39
#if defined(VISP_HAVE_UR_RTDE)
40
41
#include <memory>
42
43
#include <visp3/robot/vpRobot.h>
44
#include <visp3/robot/vpRobotException.h>
45
46
#include <ur_rtde/dashboard_client.h>
47
#include <ur_rtde/rtde_control_interface.h>
48
#include <ur_rtde/rtde_receive_interface.h>
49
50
BEGIN_VISP_NAMESPACE
64
class
VISP_EXPORT vpRobotUniversalRobots :
public
vpRobot
65
{
66
private
:
// Not allowed functions
70
vpRobotUniversalRobots(
const
vpRobotUniversalRobots &robot);
71
72
public
:
73
vpRobotUniversalRobots();
74
vpRobotUniversalRobots(
const
std::string &ur_address);
75
virtual
~vpRobotUniversalRobots();
76
77
void
connect
(
const
std::string &ur_address);
78
void
disconnect
();
79
83
std::shared_ptr<ur_rtde::RTDEReceiveInterface>
getRTDEReceiveInterfaceHandler
()
const
{
return
m_rtde_receive
; }
84
88
std::shared_ptr<ur_rtde::RTDEControlInterface>
getRTDEControlInterfaceHandler
()
const
{
return
m_rtde_control
; }
89
93
std::shared_ptr<ur_rtde::DashboardClient>
getDashboardClientHandler
()
const
{
return
m_db_client
; }
94
95
vpHomogeneousMatrix
get_fMe();
96
vpHomogeneousMatrix
get_fMe(
const
vpColVector
&q);
97
vpHomogeneousMatrix
get_fMc();
98
vpHomogeneousMatrix
get_eMc()
const
;
99
100
void
getForceTorque(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&force);
101
std::string getPolyScopeVersion();
102
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpColVector
&position) VP_OVERRIDE;
103
void
getPosition
(
const
vpRobot::vpControlFrameType
frame,
vpPoseVector
&pose);
104
int
getRobotMode()
const
;
105
std::string getRobotModel()
const
;
106
107
void
move(
const
std::string &filename,
double
velocity_percentage = 10.);
108
109
bool
readPosFile(
const
std::string &filename,
vpColVector
&q);
110
bool
savePosFile(
const
std::string &filename,
const
vpColVector
&q);
111
112
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&position) VP_OVERRIDE;
113
void
setPosition
(
const
vpRobot::vpControlFrameType
frame,
const
vpPoseVector
&pose);
114
void
setPositioningVelocity(
double
velocity);
115
116
vpRobot::vpRobotStateType
setRobotState
(
vpRobot::vpRobotStateType
newState);
117
void
setVelocity
(
const
vpRobot::vpControlFrameType
frame,
const
vpColVector
&vel) VP_OVERRIDE;
118
119
void
set_eMc(
const
vpHomogeneousMatrix
&eMc);
120
121
void
stopMotion();
122
123
private
:
124
// Not implemented yet
125
void
get_eJe
(
vpMatrix
&) VP_OVERRIDE { }
126
void
get_fJe
(vpMatrix &) VP_OVERRIDE { }
127
void
getDisplacement
(
const
vpRobot::vpControlFrameType
, vpColVector &) VP_OVERRIDE { }
128
129
protected
:
130
void
init
();
131
132
std::shared_ptr<ur_rtde::RTDEReceiveInterface>
m_rtde_receive
;
133
std::shared_ptr<ur_rtde::RTDEControlInterface>
m_rtde_control
;
134
std::shared_ptr<ur_rtde::DashboardClient>
m_db_client
;
135
vpHomogeneousMatrix
m_eMc
;
136
double
m_positioningVelocity
;
137
double
m_max_joint_speed
;
138
double
m_max_joint_acceleration
;
139
double
m_max_linear_speed
;
140
double
m_max_linear_acceleration
;
141
vpRobot::vpControlFrameType
m_vel_control_frame
;
142
};
143
END_VISP_NAMESPACE
144
#endif
145
#endif
vpColVector
Implementation of column vector and the associated operations.
Definition
vpColVector.h:191
vpHomogeneousMatrix
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition
vpHomogeneousMatrix.h:221
vpMatrix
Implementation of a matrix and operations on matrices.
Definition
vpMatrix.h:175
vpPoseVector
Implementation of a pose vector and operations on poses.
Definition
vpPoseVector.h:203
vpRobotUniversalRobots::m_max_joint_acceleration
double m_max_joint_acceleration
Definition
vpRobotUniversalRobots.h:138
vpRobotUniversalRobots::m_eMc
vpHomogeneousMatrix m_eMc
Definition
vpRobotUniversalRobots.h:135
vpRobotUniversalRobots::m_positioningVelocity
double m_positioningVelocity
Definition
vpRobotUniversalRobots.h:136
vpRobotUniversalRobots::getRTDEControlInterfaceHandler
std::shared_ptr< ur_rtde::RTDEControlInterface > getRTDEControlInterfaceHandler() const
Definition
vpRobotUniversalRobots.h:88
vpRobotUniversalRobots::getDashboardClientHandler
std::shared_ptr< ur_rtde::DashboardClient > getDashboardClientHandler() const
Definition
vpRobotUniversalRobots.h:93
vpRobotUniversalRobots::getRTDEReceiveInterfaceHandler
std::shared_ptr< ur_rtde::RTDEReceiveInterface > getRTDEReceiveInterfaceHandler() const
Definition
vpRobotUniversalRobots.h:83
vpRobotUniversalRobots::m_max_linear_speed
double m_max_linear_speed
Definition
vpRobotUniversalRobots.h:139
vpRobotUniversalRobots::m_max_joint_speed
double m_max_joint_speed
Definition
vpRobotUniversalRobots.h:137
vpRobotUniversalRobots::connect
void connect(const std::string &ur_address)
Definition
vpRobotUniversalRobots.cpp:80
vpRobotUniversalRobots::m_max_linear_acceleration
double m_max_linear_acceleration
Definition
vpRobotUniversalRobots.h:140
vpRobotUniversalRobots::disconnect
void disconnect()
Definition
vpRobotUniversalRobots.cpp:114
vpRobotUniversalRobots::m_db_client
std::shared_ptr< ur_rtde::DashboardClient > m_db_client
Definition
vpRobotUniversalRobots.h:134
vpRobotUniversalRobots::m_vel_control_frame
vpRobot::vpControlFrameType m_vel_control_frame
Definition
vpRobotUniversalRobots.h:141
vpRobotUniversalRobots::m_rtde_receive
std::shared_ptr< ur_rtde::RTDEReceiveInterface > m_rtde_receive
Definition
vpRobotUniversalRobots.h:132
vpRobotUniversalRobots::m_rtde_control
std::shared_ptr< ur_rtde::RTDEControlInterface > m_rtde_control
Definition
vpRobotUniversalRobots.h:133
vpRobot::vpControlFrameType
vpControlFrameType
Definition
vpRobot.h:74
vpRobot::get_eJe
virtual void get_eJe(vpMatrix &_eJe)=0
Get the robot Jacobian expressed in the end-effector frame.
vpRobot::setVelocity
virtual void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)=0
vpRobot::getPosition
virtual void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &position)=0
Get the robot position (frame has to be specified).
vpRobot::vpRobotStateType
vpRobotStateType
Definition
vpRobot.h:62
vpRobot::setRobotState
virtual vpRobotStateType setRobotState(const vpRobot::vpRobotStateType newState)
Definition
vpRobot.cpp:200
vpRobot::init
virtual void init()=0
vpRobot::get_fJe
virtual void get_fJe(vpMatrix &_fJe)=0
vpRobot::getDisplacement
virtual void getDisplacement(const vpRobot::vpControlFrameType frame, vpColVector &q)=0
vpRobot::vpRobot
vpRobot(void)
Definition
vpRobot.cpp:49
vpRobot::setPosition
virtual void setPosition(const vpRobot::vpControlFrameType frame, const vpColVector &q)=0
Set a displacement (frame has to be specified) in position control.
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
robot
include
visp3
robot
vpRobotUniversalRobots.h
Generated by
1.17.0