Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
urcl::control::TrajectoryPointInterface Class Reference

The TrajectoryPointInterface class handles trajectory forwarding to the robot. Full trajectories are forwarded to the robot controller and are executed there. More...

#include <trajectory_point_interface.h>

Inheritance diagram for urcl::control::TrajectoryPointInterface:
Inheritance graph
[legend]

Public Member Functions

void setTrajectoryEndCallback (std::function< void(TrajectoryResult)> callback)
 
 TrajectoryPointInterface ()=delete
 
 TrajectoryPointInterface (uint32_t port)
 Creates a TrajectoryPointInterface object including a TCPServer. More...
 
bool writeTrajectoryPoint (const vector6d_t *positions, const float goal_time, const float blend_radius, const bool cartesian)
 Writes needed information to the robot to be read by the URScript program. More...
 
bool writeTrajectorySplinePoint (const vector6d_t *positions, const vector6d_t *velocities, const vector6d_t *accelerations, const float goal_time)
 Writes needed information to the robot to be read by the URScript program including velocity and acceleration information. Depending on the information given the robot will do quadratic (positions only), cubic (positions and velocities) or quintic (positions, velocities and accelerations) interpolation. More...
 
virtual ~TrajectoryPointInterface ()=default
 Disconnects possible clients so the reverse interface object can be safely destroyed. More...
 
- Public Member Functions inherited from urcl::control::ReverseInterface
 ReverseInterface ()=delete
 
 ReverseInterface (uint32_t port, std::function< void(bool)> handle_program_state)
 Creates a ReverseInterface object including a TCPServer. More...
 
virtual void setKeepaliveCount (const uint32_t &count)
 Set the Keepalive count. This will set the number of allowed timeout reads on the robot. More...
 
virtual bool write (const vector6d_t *positions, const comm::ControlMode control_mode=comm::ControlMode::MODE_IDLE)
 Writes needed information to the robot to be read by the URCaps program. More...
 
bool writeFreedriveControlMessage (const FreedriveControlMessage freedrive_action)
 Writes needed information to the robot to be read by the URScript program. More...
 
bool writeTrajectoryControlMessage (const TrajectoryControlMessage trajectory_action, const int point_number=0)
 Writes needed information to the robot to be read by the URScript program. More...
 
virtual ~ReverseInterface ()=default
 Disconnects possible clients so the reverse interface object can be safely destroyed. More...
 

Static Public Attributes

static const int32_t MULT_TIME = 1000
 
- Static Public Attributes inherited from urcl::control::ReverseInterface
static const int32_t MULT_JOINTSTATE = 1000000
 

Protected Member Functions

virtual void connectionCallback (const int filedescriptor) override
 
virtual void disconnectionCallback (const int filedescriptor) override
 
virtual void messageCallback (const int filedescriptor, char *buffer, int nbytesrecv) override
 
- Protected Member Functions inherited from urcl::control::ReverseInterface
template<typename T >
size_t append (uint8_t *buffer, T &val)
 

Private Attributes

std::function< void(TrajectoryResult)> handle_trajectory_end_
 

Static Private Attributes

static const int MESSAGE_LENGTH = 21
 

Additional Inherited Members

- Protected Attributes inherited from urcl::control::ReverseInterface
int client_fd_
 
std::function< void(bool)> handle_program_state_
 
uint32_t keepalive_count_
 
comm::TCPServer server_
 
- Static Protected Attributes inherited from urcl::control::ReverseInterface
static const int MAX_MESSAGE_LENGTH = 8
 

Detailed Description

The TrajectoryPointInterface class handles trajectory forwarding to the robot. Full trajectories are forwarded to the robot controller and are executed there.

Definition at line 75 of file trajectory_point_interface.h.

Constructor & Destructor Documentation

◆ TrajectoryPointInterface() [1/2]

urcl::control::TrajectoryPointInterface::TrajectoryPointInterface ( )
delete

◆ TrajectoryPointInterface() [2/2]

urcl::control::TrajectoryPointInterface::TrajectoryPointInterface ( uint32_t  port)

Creates a TrajectoryPointInterface object including a TCPServer.

Parameters
portPort the Server is started on

Definition at line 36 of file trajectory_point_interface.cpp.

◆ ~TrajectoryPointInterface()

virtual urcl::control::TrajectoryPointInterface::~TrajectoryPointInterface ( )
virtualdefault

Disconnects possible clients so the reverse interface object can be safely destroyed.

Member Function Documentation

◆ connectionCallback()

void urcl::control::TrajectoryPointInterface::connectionCallback ( const int  filedescriptor)
overrideprotectedvirtual

Reimplemented from urcl::control::ReverseInterface.

Definition at line 168 of file trajectory_point_interface.cpp.

◆ disconnectionCallback()

void urcl::control::TrajectoryPointInterface::disconnectionCallback ( const int  filedescriptor)
overrideprotectedvirtual

Reimplemented from urcl::control::ReverseInterface.

Definition at line 182 of file trajectory_point_interface.cpp.

◆ messageCallback()

void urcl::control::TrajectoryPointInterface::messageCallback ( const int  filedescriptor,
char *  buffer,
int  nbytesrecv 
)
overrideprotectedvirtual

Reimplemented from urcl::control::ReverseInterface.

Definition at line 188 of file trajectory_point_interface.cpp.

◆ setTrajectoryEndCallback()

void urcl::control::TrajectoryPointInterface::setTrajectoryEndCallback ( std::function< void(TrajectoryResult)>  callback)
inline

Definition at line 121 of file trajectory_point_interface.h.

◆ writeTrajectoryPoint()

bool urcl::control::TrajectoryPointInterface::writeTrajectoryPoint ( const vector6d_t positions,
const float  goal_time,
const float  blend_radius,
const bool  cartesian 
)

Writes needed information to the robot to be read by the URScript program.

Parameters
positionsA vector of joint or cartesian targets for the robot
goal_timeThe goal time to reach the target
blend_radiusThe radius to be used for blending between control points
cartesianTrue, if the written point is specified in cartesian space, false if in joint space
Returns
True, if the write was performed successfully, false otherwise.

Definition at line 40 of file trajectory_point_interface.cpp.

◆ writeTrajectorySplinePoint()

bool urcl::control::TrajectoryPointInterface::writeTrajectorySplinePoint ( const vector6d_t positions,
const vector6d_t velocities,
const vector6d_t accelerations,
const float  goal_time 
)

Writes needed information to the robot to be read by the URScript program including velocity and acceleration information. Depending on the information given the robot will do quadratic (positions only), cubic (positions and velocities) or quintic (positions, velocities and accelerations) interpolation.

Parameters
positionsA vector of joint or Cartesian target positions for the robot.
velocitiesA vector of joint or Cartesian target velocities for the robot.
accelerationsA vector of joint or Cartesian target accelerations for the robot.
goal_timeThe goal time to reach the target point.
Returns
True, if the write was performed successfully, false otherwise.

Definition at line 93 of file trajectory_point_interface.cpp.

Member Data Documentation

◆ handle_trajectory_end_

std::function<void(TrajectoryResult)> urcl::control::TrajectoryPointInterface::handle_trajectory_end_
private

Definition at line 135 of file trajectory_point_interface.h.

◆ MESSAGE_LENGTH

const int urcl::control::TrajectoryPointInterface::MESSAGE_LENGTH = 21
staticprivate

Definition at line 134 of file trajectory_point_interface.h.

◆ MULT_TIME

const int32_t urcl::control::TrajectoryPointInterface::MULT_TIME = 1000
static

Definition at line 78 of file trajectory_point_interface.h.


The documentation for this class was generated from the following files:


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Tue Jul 4 2023 02:09:47