YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IMotorEncodersTest.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef IMOTORENCODERSTEST_H
7#define IMOTORENCODERSTEST_H
8
11#include <catch2/catch_amalgamated.hpp>
12
13using namespace yarp::dev;
14using namespace yarp::os;
15
16namespace yarp::dev::tests
17{
19 {
20 REQUIRE(imotenc != nullptr);
21
22 bool b = false;
23 double value = 0;
24 double time = 0;
25 int axis =0;
26 b = imotenc->getNumberOfMotorEncoders(&axis);
27 CHECK(b);
28 CHECK(axis!=0);
29
30 b = imotenc->getMotorEncoder(0, &value);
31 CHECK(b);
32 b = imotenc->getMotorEncoderAcceleration(0, &value);
33 CHECK(b);
34 b = imotenc->getMotorEncoderSpeed(0, &value);
35 CHECK(b);
36 b = imotenc->getMotorEncoderTimed(0,&value,&time);
37 }
38}
39
40#endif
Control board, encoder interface.
A mini-server for performing network communication in the background.
void exec_iMotorEncoders_test_1(IMotorEncoders *imotenc)
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
An interface to the operating system, including Port based communication.