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#include <vector>
14
15#ifndef ROBOTDRIVER_H
16#define ROBOTDRIVER_H
17
18// ******************** ROBOT DRIVER CLASS
20{
21 friend class BroadcastingThread;
22private:
23 int n_joints=0;
24 bool m_verbose=true;
25 std::vector<double> m_trajectoryTime; // default trajectory time in seconds
26
27 yarp::os::Property drvOptions_ll;
29 yarp::dev::IPositionControl *ipos_ll=nullptr;
30 yarp::dev::IPositionDirect *iposdir_ll=nullptr;
31 yarp::dev::IPidControl *ipid_ll=nullptr;
32 yarp::dev::IControlMode *icmd_ll=nullptr;
33 yarp::dev::IEncoders *ienc_ll=nullptr;
34 yarp::dev::IMotorEncoders *imotenc_ll=nullptr;
35
36public:
38 bool configure(const yarp::os::Property &copt);
39 bool init();
41 size_t getNJoints();
42 bool setControlMode(const int j, const int mode);
43 bool setPosition(int j, double ref);
44 bool getEncoder(int j, double *v);
45 bool positionMove(int j, double ref);
46 bool setTrajectoryTime(double t);
47 bool setTrajectoryTime(int j, double t);
48};
49
50#endif
define control board standard interfaces
FeatureMode mode
bool setTrajectoryTime(double t)
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