RobotsIO
Loading...
Searching...
No Matches
TransformWithVelocityYarpPort.h
1/*
2 * Copyright (C) 2019 Istituto Italiano di Tecnologia (IIT)
3 *
4 * This software may be modified and distributed under the terms of the
5 * BSD 3-Clause license. See the accompanying LICENSE file for details.
6 */
7
8#ifndef ROBOTSIO_TRANSFORMWITHVELOCITYYARPPORT_H
9#define ROBOTSIO_TRANSFORMWITHVELOCITYYARPPORT_H
10
11#include <RobotsIO/Utils/TransformWithVelocity.h>
12#include <RobotsIO/Utils/YarpBufferedPort.hpp>
13
14#include <yarp/sig/Vector.h>
15
16#include <Eigen/Dense>
17
18namespace RobotsIO {
19 namespace Utils {
20 class TransformWithVelocityYarpPort;
21 }
22}
23
25 public RobotsIO::Utils::YarpBufferedPort<yarp::sig::Vector>
26{
27public:
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29
30 TransformWithVelocityYarpPort(const std::string& port_name);
31
33
34 Eigen::Transform<double, 3, Eigen::Affine> transform() override;
35
36 Eigen::Vector3d linear_velocity() override;
37
38 Eigen::Vector3d angular_velocity() override;
39
40 bool freeze(const bool blocking = false) override;
41
42private:
43 Eigen::Transform<double, 3, Eigen::Affine> transform_;
44
45 Eigen::Vector3d linear_velocity_;
46
47 Eigen::Vector3d angular_velocity_;
48};
49
50#endif /* ROBOTSIO_TRANSFORMWITHVELOCITYYARPPORT_H */