Class TrajectoryPointInterface

Inheritance Relationships

Base Type

Class Documentation

class TrajectoryPointInterface : public urcl::control::ReverseInterface

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

Public Functions

TrajectoryPointInterface() = delete
TrajectoryPointInterface(uint32_t port)

Creates a TrajectoryPointInterface object including a TCPServer.

Parameters:

port – Port the Server is started on

virtual ~TrajectoryPointInterface() = default

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

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.

Parameters:
  • positions – A vector of joint or cartesian targets for the robot

  • goal_time – The goal time to reach the target

  • blend_radius – The radius to be used for blending between control points

  • cartesian – True, if the written point is specified in cartesian space, false if in joint space

Returns:

True, if the write was performed successfully, false otherwise.

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.

Parameters:
  • positions – A vector of joint or Cartesian target positions for the robot.

  • velocities – A vector of joint or Cartesian target velocities for the robot.

  • accelerations – A vector of joint or Cartesian target accelerations for the robot.

  • goal_time – The goal time to reach the target point.

Returns:

True, if the write was performed successfully, false otherwise.

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

Public Static Attributes

static const int32_t MULT_TIME = 1000

Protected 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