RobotsIO
Loading...
Searching...
No Matches
SpatialVelocityYarpPort.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_SPATIALVELOCITYYARPVECTOR_H
9#define ROBOTSIO_SPATIALVELOCITYYARPVECTOR_H
10
11#include <RobotsIO/Utils/SpatialVelocity.h>
12#include <RobotsIO/Utils/YarpVectorOfProbe.hpp>
13
14#include <Eigen/Dense>
15
16#include <chrono>
17
18namespace RobotsIO {
19 namespace Utils {
20 class SpatialVelocityYarpPort;
21 }
22}
23
26{
27public:
28 SpatialVelocityYarpPort(const std::string& port_name);
29
31
32 bool freeze(const bool blocking = false) override;
33
34 double elapsed_time() override;
35
36protected:
37 Eigen::VectorXd twist() override;
38
39private:
40 std::chrono::steady_clock::time_point last_time_;
41
42 double elapsed_time_;
43
44 bool last_time_initialized_ = false;
45
46 Eigen::VectorXd twist_;
47};
48
49#endif /* ROBOTSIO_SPATIALVELOCITYYARPVECTOR_H */