Skip to content

Commit

Permalink
Require YARP 3.8+
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Dec 8, 2023
1 parent 1d2d320 commit 78bfd95
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
robotology:
- { yarp: yarp-3.7, cmake: 3.16.x }
- { yarp: yarp-3.8, cmake: 3.16.x }
- { yarp: yarp-3.9, cmake: 3.16.x }
- { yarp: master, cmake: 3.16.x }
compiler:
- { cc: gcc, cxx: g++ }
Expand All @@ -51,16 +51,16 @@ jobs:

steps:
- name: Check out yarp-devices
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check out YCM
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: robotology/ycm
path: .deps/ycm

- name: Check out YARP
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: robotology/yarp
ref: ${{matrix.robotology.yarp}}
Expand All @@ -76,7 +76,7 @@ jobs:
run: wget -O- -q https://www.peak-system.com/fileadmin/media/linux/files/peak-linux-driver-$PEAK_DRIVER_VER.tar.gz | tar -C .deps -xzf -

- name: Check out jr3pci-linux
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: roboticslab-uc3m/jr3pci-linux
path: .deps/jr3pci-linux
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake

# Hard dependencies.
find_package(YCM 0.11 REQUIRED)
find_package(YARP 3.7 REQUIRED COMPONENTS os dev sig)
find_package(YARP 3.8 REQUIRED COMPONENTS os dev sig)

# Soft dependencies.
find_package(ARAVIS 0.4 QUIET)
Expand Down
2 changes: 1 addition & 1 deletion doc/yarp-devices-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
First install the dependencies:
- [Install CMake 3.16+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-cmake.md/)
- [Install YCM 0.11+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md/)
- [Install YARP 3.7+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-yarp.md/)
- [Install YARP 3.8+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-yarp.md/)

For unit testing, you'll need the googletest source package. Refer to [Install googletest](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-googletest.md/).

Expand Down
7 changes: 7 additions & 0 deletions libraries/YarpPlugins/LacqueyFetch/IAxisInfoRawImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ using namespace roboticslab;

// -----------------------------------------------------------------------------

bool LacqueyFetch::getAxes(int * ax)
{
return getNumberOfMotorsRaw(ax);
}

// -----------------------------------------------------------------------------

bool LacqueyFetch::getAxisNameRaw(int axis, std::string & name)
{
yCITrace(LCQ, id(), "%d", axis);
Expand Down
6 changes: 1 addition & 5 deletions libraries/YarpPlugins/LacqueyFetch/LacqueyFetch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <string>

#include <yarp/conf/numeric.h>
#include <yarp/conf/version.h>

#include <yarp/dev/DeviceDriver.h>
#include <yarp/dev/IAxisInfo.h>
Expand Down Expand Up @@ -60,10 +59,7 @@ class LacqueyFetch : public yarp::dev::DeviceDriver,

// --------- IAxisInfoRaw declarations. Implementation in IAxisInfoRawImpl.cpp ---------

#if YARP_VERSION_COMPARE(>=, 3, 8, 0)
bool getAxes(int * ax) override
{ return getNumberOfMotorsRaw(ax); }
#endif
bool getAxes(int * ax) override;
bool getAxisNameRaw(int j, std::string & name) override;
bool getJointTypeRaw(int j, yarp::dev::JointTypeEnum & type) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ bool TechnosoftIposBase::getMotorTorqueParamsRaw(int j, yarp::dev::MotorTorquePa
params->viscousNeg = 0.0;
params->coulombPos = 0.0;
params->coulombNeg = 0.0;
#if YARP_VERSION_COMPARE(>=, 3, 9, 0)
params->velocityThres = 0.0;
#endif

return true;
}
Expand Down

0 comments on commit 78bfd95

Please sign in to comment.