YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IJointBrakeTest.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef IJOINTBRAKETEST_H
7#define IJOINTBRAKETEST_H
8
10#include <catch2/catch_amalgamated.hpp>
11
12using namespace yarp::dev;
13using namespace yarp::os;
14
15namespace yarp::dev::tests
16{
18 {
19 REQUIRE(ibrake != nullptr);
20
21 bool b =false;
22 bool braked = false;
23 std::string message;
24 b = ibrake->isJointBraked(0,braked);
25 CHECK(b);
26 CHECK(braked == false);
27
28 b = ibrake->setManualBrakeActive(0, true);
29 CHECK(b);
30 b = ibrake->isJointBraked(0, braked);
31 CHECK(b);
32 CHECK(braked == true);
33 b = ibrake->setManualBrakeActive(0, false);
34 CHECK(b);
35 b = ibrake->isJointBraked(0, braked);
36 CHECK(b);
37 CHECK(braked == false);
38
39 bool enab = false;
40 b = ibrake->getAutoBrakeEnabled(0, enab);
41 CHECK(b);
42 CHECK(enab == false);
43
44 b = ibrake->setAutoBrakeEnabled(0, true);
45 CHECK(b);
46 b = ibrake->getAutoBrakeEnabled(0, enab);
47 CHECK(b);
48 CHECK(enab == true);
49 b = ibrake->setAutoBrakeEnabled(0, false);
50 CHECK(b);
51 b = ibrake->getAutoBrakeEnabled(0, enab);
52 CHECK(b);
53 CHECK(enab == false);
54 }
55}
56
57#endif
Interface for controlling a joint equipped with brakes (hardware or simulated).
Definition IJointBrake.h:23
A mini-server for performing network communication in the background.
void exec_iJointBrake_test1(IJointBrake *ibrake)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.