YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
robotDriver.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#include <yarp/os/Log.h>
7#include <yarp/os/LogStream.h>
8
10#include <yarp/dev/PolyDriver.h>
11
12#include <string>
13
14#ifndef ROBOTDRIVER_H
15#define ROBOTDRIVER_H
16
17// ******************** ROBOT DRIVER CLASS
19{
20 friend class BroadcastingThread;
21private:
22 int n_joints=0;
23 bool verbose=true;
24 yarp::os::Property drvOptions_ll;
26 yarp::dev::IPositionControl *ipos_ll=nullptr;
27 yarp::dev::IPositionDirect *iposdir_ll=nullptr;
28 yarp::dev::IPidControl *ipid_ll=nullptr;
29 yarp::dev::IControlMode *icmd_ll=nullptr;
30 yarp::dev::IEncoders *ienc_ll=nullptr;
31 yarp::dev::IMotorEncoders *imotenc_ll=nullptr;
32
33public:
35 bool configure(const yarp::os::Property &copt);
36 bool init();
38 size_t getNJoints();
39 bool setControlMode(const int j, const int mode);
40 bool setPosition(int j, double ref);
41 bool getEncoder(int j, double *v);
42 bool positionMove(int j, double ref);
43};
44
45#endif
define control board standard interfaces
bool setPosition(int j, double ref)
size_t getNJoints()
bool configure(const yarp::os::Property &copt)
bool setControlMode(const int j, const int mode)
bool getEncoder(int j, double *v)
bool positionMove(int j, double ref)
Interface for setting control mode in control board.
Control board, encoder interface.
Definition IEncoders.h:116
Control board, encoder interface.
Interface for a generic control board device implementing a PID controller, with scaled arguments.
Interface for a generic control board device implementing position control.
Interface for a generic control board device implementing position control.
A container for a device driver.
Definition PolyDriver.h:23
A class for storing options and configuration information.
Definition Property.h:33