Skip to content

Commit d020e54

Browse files
committed
upgrade to yarp-3.5.1
1 parent c4b925a commit d020e54

6 files changed

Lines changed: 73 additions & 73 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set(CMAKE_CXX_STANDARD 11)
1010
set(CMAKE_CXX_STANDARD_REQUIRED 11)
1111

1212
find_package(ICUBcontrib REQUIRED)
13-
find_package(YARP 3.3.0 REQUIRED COMPONENTS os sig dev math gsl idl_tools)
13+
find_package(YARP 3.5.1 REQUIRED COMPONENTS os sig dev math gsl idl_tools)
1414
list(APPEND CMAKE_MODULE_PATH ${ICUBCONTRIB_MODULE_PATH})
1515

1616
include(ICUBcontribHelpers)

modules/funnyPostures/main.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ class PosturesModule : public RFModule
552552
return true;
553553

554554
Bottle cmd,reply;
555-
cmd.addVocab(Vocab::encode("status"));
555+
cmd.addVocab32("status");
556556
if (iolPortStatus.write(cmd,reply))
557557
{
558558
if (reply.size()>1)
@@ -561,7 +561,7 @@ class PosturesModule : public RFModule
561561
(reply.get(1).asString()=="idle"))
562562
{
563563
cmd.clear();
564-
cmd.addVocab(Vocab::encode("attention"));
564+
cmd.addVocab32("attention");
565565
cmd.addString("stop");
566566
printf("sending: %s\n",cmd.toString().c_str());
567567
bool ok=iolPortHuman.write(cmd,reply);
@@ -582,7 +582,7 @@ class PosturesModule : public RFModule
582582
return true;
583583

584584
Bottle cmd,reply;
585-
cmd.addVocab(Vocab::encode("attention"));
585+
cmd.addVocab32("attention");
586586
cmd.addString("start");
587587
printf("sending: %s\n",cmd.toString().c_str());
588588
bool ok=iolPortHuman.write(cmd,reply);
@@ -599,7 +599,7 @@ class PosturesModule : public RFModule
599599
if (iolPortHuman.getOutputCount()>0)
600600
{
601601
Bottle cmd,reply;
602-
cmd.addVocab(Vocab::encode("say"));
602+
cmd.addVocab32("say");
603603
cmd.addString(sentence.c_str());
604604
if (iolPortHuman.write(cmd,reply))
605605
return (reply.get(0).asString()=="ack");
@@ -635,7 +635,7 @@ class PosturesModule : public RFModule
635635
/*********************************************/
636636
void configureEmotions(ResourceFinder &rf)
637637
{
638-
int numEmotions=rf.check("num_emotions",Value(0)).asInt();
638+
int numEmotions=rf.check("num_emotions",Value(0)).asInt32();
639639
for (int i=0; i<numEmotions; i++)
640640
{
641641
ostringstream tag;
@@ -735,8 +735,8 @@ class PosturesModule : public RFModule
735735
/*********************************************/
736736
bool respond(const Bottle &cmd, Bottle &reply)
737737
{
738-
int ack=Vocab::encode("ack");
739-
int nack=Vocab::encode("nack");
738+
int ack=Vocab32::encode("ack");
739+
int nack=Vocab32::encode("nack");
740740

741741
Value item=cmd.get(0);
742742
if (item.isString())
@@ -747,10 +747,10 @@ class PosturesModule : public RFModule
747747
{
748748
posture("foo","home");
749749
giveGrant();
750-
reply.addVocab(ack);
750+
reply.addVocab32(ack);
751751
}
752752
else
753-
reply.addVocab(nack);
753+
reply.addVocab32(nack);
754754

755755
return true;
756756
}
@@ -768,7 +768,7 @@ class PosturesModule : public RFModule
768768
if (cmd.size()>1)
769769
if (Bottle *where=cmd.get(1).asList())
770770
for (int i=0; i<where->size(); i++)
771-
x[i]=where->get(i).asDouble();
771+
x[i]=where->get(i).asFloat64();
772772

773773
if (getGrant())
774774
{
@@ -782,11 +782,11 @@ class PosturesModule : public RFModule
782782

783783
Bottle rep;
784784
if (ans==ack)
785-
reply.addVocab(ack);
785+
reply.addVocab32(ack);
786786
else if (RFModule::respond(cmd,rep))
787787
reply=rep;
788788
else
789-
reply.addVocab(nack);
789+
reply.addVocab32(nack);
790790

791791
return true;
792792
}

modules/iCubBlinker/main.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -325,17 +325,17 @@ class Blinker: public RFModule, public iCubBlinker_IDL
325325
bool retrieveInteractionMode_params(Bottle &int_mode)
326326
{
327327
// If the parameters are not found, it will default to the idle mode
328-
blinkper_nrm = int_mode.check("blinkper_nrm",Value(5.2)).asDouble();
329-
blinkper_sgm = int_mode.check("blinkper_sgm",Value(3.7)).asDouble();
328+
blinkper_nrm = int_mode.check("blinkper_nrm",Value(5.2)).asFloat64();
329+
blinkper_sgm = int_mode.check("blinkper_sgm",Value(3.7)).asFloat64();
330330

331-
closure_nrm = int_mode.check("closure_nrm",Value(0.111)).asDouble();
332-
closure_sgm = int_mode.check("closure_sgm",Value(0.031)).asDouble();
331+
closure_nrm = int_mode.check("closure_nrm",Value(0.111)).asFloat64();
332+
closure_sgm = int_mode.check("closure_sgm",Value(0.031)).asFloat64();
333333

334-
sustain_nrm = int_mode.check("sustain_nrm",Value(0.020)).asDouble();
335-
sustain_sgm = int_mode.check("sustain_sgm",Value(0.005)).asDouble();
334+
sustain_nrm = int_mode.check("sustain_nrm",Value(0.020)).asFloat64();
335+
sustain_sgm = int_mode.check("sustain_sgm",Value(0.005)).asFloat64();
336336

337-
opening_nrm = int_mode.check("opening_nrm",Value(0.300)).asDouble();
338-
opening_sgm = int_mode.check("opening_sgm",Value(0.123)).asDouble();
337+
opening_nrm = int_mode.check("opening_nrm",Value(0.300)).asFloat64();
338+
opening_sgm = int_mode.check("opening_sgm",Value(0.123)).asFloat64();
339339

340340
return true;
341341
}
@@ -393,7 +393,7 @@ class Blinker: public RFModule, public iCubBlinker_IDL
393393
robot=rf->check("robot",Value("icub")).asString().c_str();
394394
blinkingBehavior=rf->check("blinkingBehavior",Value("fast")).asString().c_str();
395395
blinkingPeriod=rf->check("blinkingPeriod",Value("fixed")).asString().c_str();
396-
fixed_blinkper=rf->check("fixedBlinkPer",Value(5.0)).asDouble();
396+
fixed_blinkper=rf->check("fixedBlinkPer",Value(5.0)).asFloat64();
397397

398398
isBlinking=rf->check("autoStart");
399399

@@ -451,8 +451,8 @@ class Blinker: public RFModule, public iCubBlinker_IDL
451451

452452
if (calib.size() > 0)
453453
{
454-
sMin = calib.check("sMin",Value(00)).asInt();
455-
sMax = calib.check("sMax",Value(70)).asInt();
454+
sMin = calib.check("sMin",Value(00)).asInt32();
455+
sMax = calib.check("sMax",Value(70)).asInt32();
456456

457457
yInfo("[iCubBlinker] Eyelid calibs loaded: (%i %i)", sMin, sMax);
458458
}
@@ -605,8 +605,8 @@ class Blinker: public RFModule, public iCubBlinker_IDL
605605

606606
if (calib.size() > 0)
607607
{
608-
sMin = calib.check("sMin",Value(00)).asInt();
609-
sMax = calib.check("sMax",Value(70)).asInt();
608+
sMin = calib.check("sMin",Value(00)).asInt32();
609+
sMax = calib.check("sMax",Value(70)).asInt32();
610610

611611
yInfo("[iCubBlinker::load] Eyelid calibs loaded: (%i %i)", sMin, sMax);
612612

modules/iCubBreather/iCubBreatherModule.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,37 +112,37 @@ class iCubBreather: public RFModule
112112

113113
bool respond(const Bottle &command, Bottle &reply)
114114
{
115-
int ack =Vocab::encode("ack");
116-
int nack=Vocab::encode("nack");
115+
int ack =Vocab32::encode("ack");
116+
int nack=Vocab32::encode("nack");
117117

118118
if (command.size()>0)
119119
{
120-
switch (command.get(0).asVocab())
120+
switch (command.get(0).asVocab32())
121121
{
122-
case createVocab('s','t','a','r'):
122+
case createVocab32('s','t','a','r'):
123123
{
124-
int res=Vocab::encode("started");
124+
int res=Vocab32::encode("started");
125125
if (iCubBreatherThrd -> startBreathing())
126126
{
127-
reply.addVocab(ack);
127+
reply.addVocab32(ack);
128128
}
129129
else
130-
reply.addVocab(nack);
130+
reply.addVocab32(nack);
131131

132-
reply.addVocab(res);
132+
reply.addVocab32(res);
133133
return true;
134134
}
135-
case createVocab('s','t','o','p'):
135+
case createVocab32('s','t','o','p'):
136136
{
137-
int res=Vocab::encode("stopped");
137+
int res=Vocab32::encode("stopped");
138138
if (iCubBreatherThrd -> stopBreathing())
139139
{
140-
reply.addVocab(ack);
140+
reply.addVocab32(ack);
141141
}
142142
else
143-
reply.addVocab(nack);
143+
reply.addVocab32(nack);
144144

145-
reply.addVocab(res);
145+
reply.addVocab32(res);
146146
return true;
147147
}
148148
//-----------------
@@ -151,7 +151,7 @@ class iCubBreather: public RFModule
151151
}
152152
}
153153

154-
reply.addVocab(nack);
154+
reply.addVocab32(nack);
155155
return true;
156156
}
157157

@@ -179,31 +179,31 @@ class iCubBreather: public RFModule
179179
//****************** rate ******************
180180
if (rf.check("rate"))
181181
{
182-
rate = rf.find("rate").asInt();
182+
rate = rf.find("rate").asInt32();
183183
yInfo(("*** "+name+": thread working at %i ms").c_str(), rate);
184184
}
185185
else yInfo(("*** "+name+": could not find rate in the config file; using %i ms as default").c_str(), rate);
186186

187187
//******************* VERBOSE ******************
188188
if (rf.check("verbosity"))
189189
{
190-
verbosity = rf.find("verbosity").asInt();
190+
verbosity = rf.find("verbosity").asInt32();
191191
yInfo(("*** "+name+": verbosity set to %i").c_str(),verbosity);
192192
}
193193
else yInfo(("*** "+name+": could not find verbosity option in the config file; using %i as default").c_str(),verbosity);
194194

195195
//******************* NOISESTD ******************
196196
if (rf.check("noiseStd"))
197197
{
198-
noiseStd = rf.find("noiseStd").asDouble();
198+
noiseStd = rf.find("noiseStd").asFloat64();
199199
yInfo(("*** "+name+": noiseStd set to %g").c_str(),noiseStd);
200200
}
201201
else yInfo(("*** "+name+": could not find noiseStd option in the config file; using %g as default").c_str(),noiseStd);
202202

203203
//******************* REFPEEDS ******************
204204
if (rf.check("refSpeeds"))
205205
{
206-
refSpeeds = rf.find("refSpeeds").asDouble();
206+
refSpeeds = rf.find("refSpeeds").asFloat64();
207207
yInfo(("*** "+name+": refSpeeds set to %g").c_str(),refSpeeds);
208208
}
209209
else yInfo(("*** "+name+": could not find refSpeeds option in the config file; using %g as default").c_str(),refSpeeds);

modules/iCubBreather/iCubBreatherThread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ bool iCubBreatherThread::threadInit()
5656

5757
for (int i = 0; i < jnts; i++)
5858
{
59-
noiseStDvtns.push_back(bns->get(i).asDouble());
60-
refSpeeds.push_back(brf->get(i).asDouble());
59+
noiseStDvtns.push_back(bns->get(i).asFloat64());
60+
refSpeeds.push_back(brf->get(i).asFloat64());
6161
}
6262
}
6363
else

0 commit comments

Comments
 (0)