diff --git a/Deps/cwiid/CMakeLists.txt b/Deps/cwiid/CMakeLists.txt deleted file mode 100644 index 38b8ffa02..000000000 --- a/Deps/cwiid/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -PKG_CHECK_MODULES(cwiid QUIET cwiid) -include_directories(${cwiid_INCLUDE_DIRS}) -link_directories(${cwiid_LIBRARY_DIRS}) -FIND_LIBRARY( with_cwiid NAMES cwiid PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib/cwiid) -IF(with_cwiid) - MESSAGE("*** CWIID LIBRARIES FOUND") - list(APPEND DEPS_DEV libcwiid-dev) -ELSE(with_cwiid) - MESSAGE("*** CWIID LIBRARIES NOT FOUND. Needed to wiimoteServer") -ENDIF(with_cwiid) diff --git a/src/drivers/evicam_driver/include/evicam_driver/interfaces/pantilti.hpp b/src/drivers/evicam_driver/include/evicam_driver/interfaces/pantilti.hpp index 6947aaf7b..bda5539ec 100644 --- a/src/drivers/evicam_driver/include/evicam_driver/interfaces/pantilti.hpp +++ b/src/drivers/evicam_driver/include/evicam_driver/interfaces/pantilti.hpp @@ -20,18 +20,19 @@ #ifndef _EVI_PANTILTI_H_ #define _EVI_PANTILTI_H_ -#include +#include #include #include namespace pantilt { - class PanTiltI: virtual public jderobot::PanTilt + class PanTiltI: virtual public jderobot::PTMotors { public: PanTiltI(EVI_D100P* cam); virtual ~PanTiltI(); - virtual Ice::Int setPanTiltData(jderobot::PanTiltDataPtr const & data, Ice::Current const & c); + virtual Ice::Int setPTMotorsData(const jderobot::PTMotorsDataPtr& data, const Ice::Current& c); + virtual jderobot::PTMotorsParamsPtr getPTMotorsParams(Ice::Current const&); private: EVI_D100P* cam; diff --git a/src/drivers/evicam_driver/src/interfaces/pantilti.cpp b/src/drivers/evicam_driver/src/interfaces/pantilti.cpp index 35931f03b..d4e25eb72 100644 --- a/src/drivers/evicam_driver/src/interfaces/pantilti.cpp +++ b/src/drivers/evicam_driver/src/interfaces/pantilti.cpp @@ -33,16 +33,16 @@ namespace pantilt } - Ice::Int PanTiltI::setPanTiltData(jderobot::PanTiltDataPtr const & data, Ice::Current const & c) + Ice::Int PanTiltI::setPTMotorsData(const jderobot::PTMotorsDataPtr& data, const Ice::Current& c) { - int pp = data->panPos; + int pp = data->pan; if (pp< EVILIB_minpan){ pp = EVILIB_minpan; } if (pp > EVILIB_maxpan){ pp = EVILIB_maxpan; } - int tp = data->tiltPos; + int tp = data->tilt; if (tp< EVILIB_mintilt){ tp = EVILIB_mintilt; } @@ -55,4 +55,21 @@ namespace pantilt return 0; } + + jderobot::PTMotorsParamsPtr PanTiltI::getPTMotorsParams(Ice::Current const&){ + jderobot::PTMotorsParams * data = new jderobot::PTMotorsParams(); + data->maxPan = EVILIB_maxpan; + data->minPan = EVILIB_minpan; + data->maxTilt = EVILIB_maxtilt; + data->minTilt = EVILIB_mintilt; + data->maxPanSpeed = EVILIB_max_pspeed; + data->maxTiltSpeed = EVILIB_max_tspeed; + + jderobot::PTMotorsParamsPtr dataptr (data); + + return dataptr; + + + + } } \ No newline at end of file diff --git a/src/drivers/evicam_driver/src/test.cpp b/src/drivers/evicam_driver/src/test.cpp index 18c4e1b75..f2fb4804e 100644 --- a/src/drivers/evicam_driver/src/test.cpp +++ b/src/drivers/evicam_driver/src/test.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "easyiceconfig/EasyIce.h" @@ -45,28 +45,28 @@ int main(int argc, char** argv){ throw "Could not create proxy to Pan Tilt"; /*cast to JointMotorPrx*/ - jderobot::PanTiltPrx ptprx = jderobot::PanTiltPrx::checkedCast(base1); + jderobot::PTMotorsPrx ptprx = jderobot::PTMotorsPrx::checkedCast(base1); if (0==ptprx) throw "Invalid proxy"; while(true){ - jderobot::PanTiltDataPtr data=new jderobot::PanTiltData(); + jderobot::PTMotorsDataPtr data=new jderobot::PTMotorsData(); data->panSpeed = 10; - data->panPos = 100; + data->pan = 100; data->tiltSpeed = 10; - data->tiltPos= 30 ; + data->tilt= 30 ; - ptprx->setPanTiltData(data); + ptprx->setPTMotorsData(data); usleep(1000000); data->panSpeed = 10; - data->panPos = -100; + data->pan = -100; data->tiltSpeed = 10; - data->tiltPos= -30 ; + data->tilt = -30 ; - ptprx->setPanTiltData(data); + ptprx->setPTMotorsData(data); usleep(10000000); } diff --git a/src/interfaces/slice/jderobot/body.ice b/src/interfaces/slice/jderobot/body.ice deleted file mode 100644 index 0f85fbb7c..000000000 --- a/src/interfaces/slice/jderobot/body.ice +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 1997-2010 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Authors : Jose María Cañas - * Francisco Miguel Rivas Montero - */ - -#ifndef BODY_ICE -#define BODY_ICE - -#include - -module jderobot{ - - enum BodySide { Left, Right}; - enum CameraBody { Top, Bottom}; - enum MotorsName { HipYawPitch, HipPitch, HipRoll, KneePitch, AnklePitch, AnkleRoll, ShoulderPitch, ShoulderRoll, ElbowYaw, ElbowRoll}; - - /** - * simply body motor - */ - struct BodyMotor{ - float pitch; - float yaw; - float roll; - }; -}; -#endif diff --git a/src/interfaces/slice/jderobot/bodyencoders.ice b/src/interfaces/slice/jderobot/bodyencoders.ice deleted file mode 100644 index 1501849c2..000000000 --- a/src/interfaces/slice/jderobot/bodyencoders.ice +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 1997-2010 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Authors : Jose María Cañas - * Francisco Miguel Rivas Montero - */ - -#ifndef BODYENCODERS_ICE -#define BODYENCODERS_ICE - -#include -#include - -module jderobot{ - - /** - * Arm - */ - class ArmEncodersData{ - BodyMotor shoulder; - BodyMotor elbow; - int clock; - }; - - /** - * Leg - */ - class LegEncodersData{ - BodyMotor hip; - BodyMotor knee; - BodyMotor ankle; - int clock; - }; - - /** - * camera odometry - */ - class OdometryData{ - seqFloat odometry; - }; - - /** - * Interface to the Humanoid Body Encoders. - */ - interface BodyEncoders - { - idempotent ArmEncodersData getArmEncodersData(BodySide side); - idempotent LegEncodersData getLegEncodersData(BodySide side); - idempotent OdometryData getOdometryData(CameraBody camera); - }; - -}; - -#endif diff --git a/src/interfaces/slice/jderobot/bodymotors.ice b/src/interfaces/slice/jderobot/bodymotors.ice deleted file mode 100644 index c0ba0f438..000000000 --- a/src/interfaces/slice/jderobot/bodymotors.ice +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 1997-2010 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Authors : Jose María Cañas - * Francisco Miguel Rivas Montero - */ - -#ifndef BODYMOTORS_ICE -#define BODYMOTORS_ICE - -#include -#include - -module jderobot{ - - /** - * BodyMotorsParam - */ - class BodyMotorsParam{ - float minAngle; - float maxAngle; - float maxSpeed; - }; - - - /** - * Interface to the Humanoid Body Motors. - */ - interface BodyMotors - { - idempotent BodyMotorsParam getBodyMotorsParam(MotorsName name, BodySide side); - int setBodyMotorsData(MotorsName name, BodySide side, float angle, float speed); - }; -}; - -#endif diff --git a/src/interfaces/slice/jderobot/bodymovements.ice b/src/interfaces/slice/jderobot/bodymovements.ice deleted file mode 100644 index bc76bb25a..000000000 --- a/src/interfaces/slice/jderobot/bodymovements.ice +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 1997-2010 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Authors : Jose María Cañas - * Francisco Miguel Rivas Montero - */ - -#ifndef BODYMOVEMENTS_ICE -#define BODYMOVEMENTS_ICE - -#include -#include - -module jderobot{ - - - /** - * simply Arm position - */ - struct ArmPosition{ - BodyMotor shoulder; - BodyMotor elbow; - }; - - /** - * simply leg position - */ - struct LegPosition{ - BodyMotor hip; - BodyMotor knee; - BodyMotor ankle; - }; - - /** - * BodyPosition - */ - struct BodyPosition{ - ArmPosition lArm; - ArmPosition rArm; - LegPosition rLeg; - LegPosition lLeg; - BodyMotor head; - float time; - }; - - sequence BodyMov; - - class BodyMovementsData{ - BodyMov mov; - }; - - interface BodyMovements{ - int doMovement(BodyMovementsData data); - idempotent BodyMovementsData getMovement(); - }; -}; -#endif diff --git a/src/interfaces/slice/jderobot/encoders.ice b/src/interfaces/slice/jderobot/encoders.ice deleted file mode 100644 index 6f5ae8c60..000000000 --- a/src/interfaces/slice/jderobot/encoders.ice +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (C) 1997-2010 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Author : Javier Vazquez Pereda - * - */ - -#ifndef ENCODERS_ICE -#define ENCODERS_ICE - -#include - - -module jderobot{ - - /* laser information */ - class EncodersData - { - float robotx; - float roboty; - float robottheta; - float robotcos; - float robotsin; - }; - - - /** - * Interface to the Gazebo encoders sensor. - */ - interface Encoders - { - idempotent EncodersData getEncodersData(); - }; - -}; //module - -#endif //ENCODERS_ICE diff --git a/src/interfaces/slice/jderobot/naofollowball.ice b/src/interfaces/slice/jderobot/naofollowball.ice deleted file mode 100644 index a80b139fc..000000000 --- a/src/interfaces/slice/jderobot/naofollowball.ice +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (C) 1997-2013 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Author : Borja Menéndez Moreno - * - */ - -#ifndef NAOFOLLOWBALL_ICE -#define NAOFOLLOWBALL_ICE - -#include - -module jderobot { - - /** - * Interface to the Nao follow-ball - */ - interface NaoFollowBall - { - void setParams ( int rMin, int rMax, int gMin, int gMax, int bMin, int bMax ); - void setMinParams ( int rMin, int gMin, int bMin ); - void setMaxParams ( int rMax, int gMax, int bMax ); - void start (); - void stop (); - }; -}; - -#endif // NAOFOLLOWBALL_ICE diff --git a/src/interfaces/slice/jderobot/naomotions.ice b/src/interfaces/slice/jderobot/naomotions.ice deleted file mode 100644 index a734cbe50..000000000 --- a/src/interfaces/slice/jderobot/naomotions.ice +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright (C) 1997-2013 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Author : Borja Menéndez Moreno - * - */ - -#ifndef NAOMOTIONS_ICE -#define NAOMOTIONS_ICE - -#include - -module jderobot { - - enum MotionType { RigthKick, LeftKick, StandupBack, StandupFront, Intercept, ChangeCamera, ResetNaoqi }; - - /** - * Interface to the Nao motions - */ - interface NaoMotions - { - int setMotion ( MotionType motion ); - }; -}; - -#endif // NAOMOTIONS_ICE diff --git a/src/interfaces/slice/jderobot/pantilt.ice b/src/interfaces/slice/jderobot/pantilt.ice deleted file mode 100644 index 45a49c119..000000000 --- a/src/interfaces/slice/jderobot/pantilt.ice +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 1997-2017 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * Authors : - * Aitor Martinez Fernandez - */ - -#ifndef PANTILT_ICE -#define PANTILT_ICE - -module jderobot{ - class PanTiltData - { - float panSpeed; - float panPos; - float tiltSpeed; - float tiltPos; - }; - - interface PanTilt{ - int setPanTiltData(PanTiltData data); - }; -}; - -#endif \ No newline at end of file diff --git a/src/interfaces/slice/jderobot/ptmotors.ice b/src/interfaces/slice/jderobot/ptmotors.ice index 2cfe471d0..866cd6c9b 100644 --- a/src/interfaces/slice/jderobot/ptmotors.ice +++ b/src/interfaces/slice/jderobot/ptmotors.ice @@ -31,10 +31,10 @@ module jderobot{ */ class PTMotorsData { - float latitude; - float latitudeSpeed; - float longitude; - float longitudeSpeed; + float pan; + float panSpeed; + float tilt; + float tiltSpeed; }; /** @@ -42,12 +42,12 @@ module jderobot{ */ class PTMotorsParams { - float maxLongitude; - float minLongitude; - float maxLatitude; - float minLatitude; - float maxLongitudeSpeed; - float maxLatitudeSpeed; + float maxPan; + float minPan; + float maxTilt; + float minTilt; + float maxPanSpeed; + float maxTiltSpeed; }; @@ -57,7 +57,6 @@ module jderobot{ interface PTMotors { int setPTMotorsData(PTMotorsData data); - idempotent PTMotorsData getPTMotorsData(); idempotent PTMotorsParams getPTMotorsParams(); }; diff --git a/src/interfaces/slice/jderobot/varcolor.ice b/src/interfaces/slice/jderobot/varcolor.ice deleted file mode 100644 index 160468b09..000000000 --- a/src/interfaces/slice/jderobot/varcolor.ice +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef VARCOLOR_ICE -#define VARCOLOR_ICE - - -#include - -module jderobot{ - - /** - * Interface to the image provider. - */ - interface VarColor - { - /** - * Returns the image source description. - */ - idempotent ImageDescription getDescription(); - - /** - * Returns the latest data. - */ - ["amd"] idempotent ImageData getData() - throws DataNotExistException, HardwareFailedException; - }; - -}; /*module*/ - -#endif /*VARCOLOR_ICE*/ diff --git a/src/interfaces/slice/jderobot/wiimote.ice b/src/interfaces/slice/jderobot/wiimote.ice deleted file mode 100644 index f6723d33c..000000000 --- a/src/interfaces/slice/jderobot/wiimote.ice +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 1997-2010 JDE Developers Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - * Authors : Jose María Cañas - * Maikel González Baile - * - */ - -#ifndef WIIMOTE_ICE -#define WIIMOTE_ICE - -#include - -module jderobot{ - - /* Wiimote information */ - class AccelerometerData - { - IntSeq accelerometer; - - }; - - class InfraredData{ - - IntSeq infrared1; - IntSeq infrared2; - IntSeq infrared3; - IntSeq infrared4; - int sourceDetected; - - }; - - class NunchukData{ - - int button; - IntSeq stick; - IntSeq acc; - - }; - - - /* - * Interface to the Wiimote interaction. - */ - interface wiiMote { - //SET DIFFERENT MODES - int setValue(int Value); - int changeRumbleMode(); - int changeIrMode(); - int changeAccMode(); - int changeButtonMode(); - int changeNunchukMode(); - int activateLed(int led); - - //GET DATA - int getButtonData(); - - idempotent NunchukData getNunchukData(); - idempotent AccelerometerData getAccData(); - idempotent InfraredData getIrData(); - int getBatteryStatus(); - }; - -}; //module - -#endif //WIIMOTE_ICE