Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90813707
WebotsSynchronizer.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 5, 00:16
Size
1 KB
Mime Type
text/x-c++
Expires
Thu, Nov 7, 00:16 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22139305
Attached To
R6622 liboncilla
WebotsSynchronizer.h
View Options
/**
* \file WebotsSynchronizer.h
*
* \date Aug 22, 2010
* \author tuleu
* \author anordman
*/
#pragma once
#include <boost/smart_ptr/shared_ptr.hpp>
#include <rci/processing/Synchronizer.h>
#include <libamarsi-quad/libamarsi-quad.h>
#include "libamarsi-quad/controller/internals/ControllerPrimpleAmarsi.h"
#include <rcioncilla/QuadTrunkNode.h>
#include <rcioncilla/QuadHipNode.h>
#include <rcioncilla/QuadKneeNode.h>
#include <rcioncilla/QuadAnkleNode.h>
namespace cca {
namespace rci {
namespace driver {
class WebotsSynchronizer;
typedef boost::shared_ptr<WebotsSynchronizer> WebotsSynchronizerPtr;
/**
* @todo Use amarsi::Clock?
*/
class WebotsSynchronizer: public Synchronizer, public amarsi::Controller {
public:
WebotsSynchronizer(int &argc, char** argv);
virtual ~WebotsSynchronizer();
virtual int run();
virtual void userInitSimulation();
virtual void userInitEnvironment();
/* CCA-specific */
static CCANodePtr create(int &argc, char** argv);
virtual std::string print() const;
virtual void send();
virtual void receive();
void registerQuadNode(CCANodePtr node, amarsi::ActuatorID index);
bool _running;
protected:
amarsi::ControllerPrimpleAmarsi *_primpleAmarsi;
private:
//amplitude of oscillation for the Hip joints.
double d_amplitudeHip;
//offset of the oscillations for the Hip Joint.
double d_offsetHip;
//amplitude of the extension/contraction of the leg
double d_amplitudeKnee;
//offset of the knee command
double d_offsetKnee;
//frequency of the oscillations
double d_frequency;
// angle of the slope
double d_angle;
std::vector<std::string> _actuatorNames;
std::vector<std::string> _servoNames;
void prepareNodeWebotsMapping();
};
}
}
}
Event Timeline
Log In to Comment