dummy-sot-external-interface.cc 1.69 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * Copyright 2011,
 * Olivier Stasse,
 *
 * CNRS
 *
 */
/* -------------------------------------------------------------------------- */
/* --- INCLUDES ------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

#include <iostream>
#include <sot/core/debug.hh>

#include "dummy-sot-external-interface.hh"

using namespace std;
using namespace dynamicgraph::sot;

void DummySotExternalInterface::setupSetSensors(
    std::map<std::string, dynamicgraph::sot::SensorValues> &sensorsIn) {
  nominalSetSensors(sensorsIn);
  return;
}

void DummySotExternalInterface::nominalSetSensors(
    std::map<std::string, dynamicgraph::sot::SensorValues> &/*sensorsIn*/) {
  return;
}

void DummySotExternalInterface::cleanupSetSensors(
    std::map<std::string, dynamicgraph::sot::SensorValues> &sensorsIn) {
  nominalSetSensors(sensorsIn);
  return;
}

void DummySotExternalInterface::getControl(
    std::map<std::string, dynamicgraph::sot::ControlValues> &controlOut) {
  controlOut["ctrl_map_name"] = dynamicgraph::sot::ControlValues();
  controlOut["ctrl_map_name"].setName("ctrl_value_name");
  controlOut["ctrl_map_name"].setValues(std::vector<double>(5, 3.1415));
  return;
}

void DummySotExternalInterface::setSecondOrderIntegration(void) {
  second_integration_ = true;
  return;
}

void DummySotExternalInterface::setNoIntegration(void) {
  second_integration_ = false;
  return;
}

extern "C" {
dynamicgraph::sot::AbstractSotExternalInterface *createSotExternalInterface() {
  return new DummySotExternalInterface();
}
}

extern "C" {
void destroySotExternalInterface(
    dynamicgraph::sot::AbstractSotExternalInterface *p) {
  delete p;
}
}