3#ifndef __CARTESIAN_CONTROL_SERVER_HPP__
4#define __CARTESIAN_CONTROL_SERVER_HPP__
8#include <yarp/os/Bottle.h>
9#include <yarp/os/BufferedPort.h>
10#include <yarp/os/PeriodicThread.h>
11#include <yarp/os/RpcServer.h>
12#include <yarp/os/TypedReaderCallback.h>
14#include <yarp/dev/Drivers.h>
15#include <yarp/dev/WrapperSingle.h>
17#include "ICartesianControl.h"
18#include "CartesianControlMsgs.h"
19#include "KinematicRepresentation.hpp"
20#include "CartesianControlServer_ParamsParser.h"
32 class RpcTransformResponder;
33 class StreamResponder;
41 public yarp::dev::WrapperSingle,
42 public yarp::os::PeriodicThread,
50 bool open(yarp::os::Searchable & config)
override;
51 bool close()
override;
54 bool attach(yarp::dev::PolyDriver * poly)
override;
55 bool detach()
override;
61 yarp::os::RpcServer rpcServer, rpcTransformServer;
62 yarp::os::BufferedPort<yarp::os::Bottle> fkOutPort, commandPort;
84 { iCartesianControl = _iCartesianControl; }
87 { iCartesianControl =
nullptr; }
93inline ResponderBase::~ResponderBase() {}
103 return_get_state getState()
override;
104 return_solve_pose solvePose(
const std::vector<double> & xd)
override;
105 yarp::dev::ReturnValue moveJoint(
const std::vector<double> & xd)
override;
106 yarp::dev::ReturnValue moveLinear(
const std::vector<double> & xd)
override;
107 yarp::dev::ReturnValue moveVelocity(
const std::vector<double> & xdotd)
override;
108 yarp::dev::ReturnValue gravityCompensation()
override;
109 yarp::dev::ReturnValue forceControl(
const std::vector<double> & fd)
override;
110 yarp::dev::ReturnValue stopControl()
override;
111 yarp::dev::ReturnValue changeTool(
const std::vector<double> & x)
override;
115 yarp::dev::ReturnValue setParameters(
const std::map<roboticslab::ICartesianControl::Config, double> & params)
override;
116 return_get_parameters getParameters()
override;
119 using ResponderBase::iCartesianControl;
137 return_get_state getState()
override;
138 return_solve_pose solvePose(
const std::vector<double> & xd)
override;
139 yarp::dev::ReturnValue moveJoint(
const std::vector<double> & xd)
override;
140 yarp::dev::ReturnValue moveLinear(
const std::vector<double> & xd)
override;
141 yarp::dev::ReturnValue changeTool(
const std::vector<double> & x)
override;
144 bool transformIncomingData(
const std::vector<double> & vin, std::vector<double> & vout);
145 bool transformOutgoingData(
const std::vector<double> & vin, std::vector<double> & vout);
160 void onRead(yarp::os::Bottle & b)
override;
164 void handleConsumerCmdMsg(
const yarp::os::Bottle & in, ConsumerFun cmd);
Definition CartesianControlServer_ParamsParser.h:46
The CartesianControlServer class implements ICartesianControl server side.
Definition CartesianControlServer.hpp:44
Abstract base class for a cartesian controller.
Definition ICartesianControl.h:22
Actuator
Actuator control vocabs.
Definition ICartesianControl.h:90
Config
Controller configuration vocabs.
Definition ICartesianControl.h:104
Base class for all responders.
Definition CartesianControlServer.hpp:79
Responds to RPC command messages.
Definition CartesianControlServer.hpp:101
Responds to streaming command messages.
Definition CartesianControlServer.hpp:158
coordinate_system
Lists available translational representations.
Definition KinematicRepresentation.hpp:27
orientation_system
Lists available rotational representations.
Definition KinematicRepresentation.hpp:36
angular_units
Lists recognized angular units.
Definition KinematicRepresentation.hpp:48
The main, catch-all namespace for Robotics Lab UC3M.
Definition groups.dox:6