18#include <yarp/os/all.h>
27using namespace yarp::os;
48 if (!options.check(
"CustomKinFile"))
50 cout<<
"Error: \"CustomKinFile\" option is missing!"<<endl;
54 string robot=options.check(
"robot",Value(
"fake_robot")).asString();
55 string part=
"fake_part";
60 optPart.put(
"device",
"fakeyClient");
61 optPart.put(
"remote",
"/"+robot+
"/"+part);
62 optPart.put(
"local",
"/"+
slvName+
"/"+part);
63 optPart.put(
"part",part);
66 Property linksOptions;
67 linksOptions.fromConfigFile(options.find(
"CustomKinFile").asString());
71 cout<<
"Error: invalid links parameters!"<<endl;
81 p->prp.push_back(optPart);
82 p->rvs.push_back(
false);
114 if (!rf.check(
"name"))
116 cout<<
"Error: \"name\" option is missing!"<<endl;
120 string solverName=rf.find(
"name").asString();
121 string pathToKin=rf.findFile(
"kinematics_file");
124 config.fromConfigFile(rf.findFile(
"from"));
125 config.put(
"CustomKinFile",pathToKin);
170int main(
int argc,
char *argv[])
173 if (!
yarp.checkNetwork())
175 cout<<
"Error: yarp server does not seem available"<<endl;
184 rf.setDefaultConfigFile(
"solver.ini");
185 rf.setDefault(
"kinematics_file",
"kinematics.ini");
186 rf.configure(argc,argv);
189 return solver.runModule(rf);
bool configure(ResourceFinder &rf)
This class inherits from the CartesianSolver super-class implementing the solver.
fakeRobotCartesianSolver(const string &name)
PartDescriptor * getPartDesc(Searchable &options)
This particular method serves to describe all the device drivers used by the solver to access the rob...
Abstract class defining the core of on-line solvers.
virtual bool open(yarp::os::Searchable &options)
Configure the solver and start it up.
virtual void interrupt()
Interrupt the open() method waiting for motor parts to be ready.
virtual bool & getTimeoutFlag()
To be called to check whether communication timeout has been detected.
virtual bool isClosed() const
To be called to check whether the solver has received a [quit] request.
A class for defining generic Limb.
iKinChain * asChain()
Returns a pointer to the Limb seen as Chain object.
bool isValid() const
Checks if the limb has been properly configured.
void registerFakeMotorDevices()
Register new yarp devices for fake motor handling.
Copyright (C) 2008 RobotCub Consortium.