Page MenuHomec4science

SupervisorL4.h
No OneTemporary

File Metadata

Created
Fri, Jun 28, 17:48

SupervisorL4.h

/**
* \file SupervisorL4.h
*
* \date Jan 22, 2013
* \author tuleu
*/
#ifndef LIBONCILLA_WEBOTS_SUPERVISORL4_H_
#define LIBONCILLA_WEBOTS_SUPERVISORL4_H_
#include <liboncilla/nodes/SupervisorL4.h>
#include "NodeAdapter.h"
#include <liboncilla-webots/Common.h>
#include <libwebots/plugin/modules/contact/contact.pb.h>
#include <webots/Supervisor.hpp>
#include <liboncilla-webots/Config.h>
namespace liboncilla {
namespace webots {
class SupervisorL4 : public rci::oncilla::SupervisorL4,
public NodeAdapter {
public:
SupervisorL4(const std::string & name,
::webots::Supervisor & supervisor,
const liboncilla::webots::config::ContactSection & config,
const std::string & footNodeName);
virtual ~SupervisorL4();
void PreStep(double ts);
void PostStep(double ts);
private :
class ContactManager {
public :
typedef ::libwebots::plugin::modules::messages::contact::Monitor MonitorMessage;
ContactManager();
~ContactManager();
void Handler(MonitorMessage const & m);
void RegisterNewContact(const std::string & name,
const liboncilla::webots::config::ContactSection & config,
liboncilla::webots::SupervisorL4 * node);
void Unregister(liboncilla::webots::SupervisorL4 * node);
static const char * GROUND_NAME;
private :
typedef std::map<std::string,liboncilla::webots::SupervisorL4 * > NodeByName;
typedef std::map<liboncilla::webots::SupervisorL4 *, std::string > NameByNode;
NodeByName d_nodes;
NameByNode d_names;
};
friend class ContactManager;
static ContactManager * s_contactManager;
::webots::Node * d_node;
Eigen::Vector3d d_force;
};
} /* namespace webots */
} /* namespace liboncilla */
#endif /* LIBONCILLA_WEBOTS_SUPERVISORL4_H_ */

Event Timeline