CoordinatorBase.cpp
Go to the documentation of this file.
1
#include "
CoordinatorBase.h
"
2
3
// #include <VirtualRobot/Nodes/RobotNode.h>
4
// #include <VirtualRobot/RobotNodeSet.h>
5
//
6
// #include <simox/control/environment/CollisionRobot.h>
7
// #include <simox/control/impl/simox/robot/Robot.h>
8
//
9
#include <
ArmarXCore/core/logging/Logging.h
>
10
11
// #include <ArmarXCore/util/CPPUtility/trace.h>
12
13
namespace
armarx::control::njoint_controller::core
14
{
15
16
CoordinatorBase::CoordinatorBase
()
17
{
18
ARMARX_INFO
<<
"coordinator constructed"
;
19
}
20
21
CoordinatorBase::~CoordinatorBase
()
22
{
23
ARMARX_IMPORTANT
<<
"destruction of coordinator"
;
24
}
25
26
// void
27
// CoordinatorBase::useCoordinator(const std::string& type,
28
// const ::armarx::aron::data::dto::DictPtr& dto,
29
// const Ice::Current& /*unused*/)
30
// {
31
// ARMARX_INFO << "Adding coordinator of type " << type;
32
// /// TODO think about other types of coordinators
33
// if (!coordinator)
34
// {
35
// /// TODO add check if the current controller has all robotNodeSets
36
// /// that the coordinator requires. currently, use check below.
37
// coordinator = std::make_shared<common::coordination::SyncCoordination>(dto);
38
// }
39
// else
40
// {
41
// coordinator->updateConfig(dto);
42
// }
43
44
// for (const auto& nodeset : coordinator->getNodesetList())
45
// {
46
// if (limb.find(nodeset) == limb.end())
47
// {
48
// coordinatorEnabled.store(false);
49
// ARMARX_WARNING << "The requested nodeset by coordinator " << nodeset
50
// << " does not exist in the current controller, disable coordinator";
51
// return;
52
// }
53
// }
54
// coordinatorEnabled.store(true);
55
// // std::map<std::string, Eigen::Matrix4f> initPose;
56
// // for (const auto& nodeset: coord->getNodesetList())
57
// // {
58
// // auto buff = limb.at(nodeset)->bufferConfigRtToUser.getUpToDateReadBuffer();
59
// // initPose[nodeset] = buff.desiredPose;
60
// // ARMARX_INFO << "using node set " << nodeset << " with pose " << buff.desiredPose;
61
// // }
62
// // coord->reset(initPose);
63
// }
64
65
// void
66
// CoordinatorBase::disableCoordinator(const Ice::Current&)
67
// {
68
// for (const auto& nodeset : coordinator->getNodesetList())
69
// {
70
// auto& arm = limb.at(nodeset);
71
// auto& cfgRT = arm->bufferConfigRtToUser.getUpToDateReadBuffer();
72
// arm->bufferConfigUserToNonRt.getWriteBuffer().desiredPose = cfgRT.desiredPose;
73
// arm->bufferConfigUserToNonRt.commitWrite();
74
// usleep(2000);
75
// }
76
// coordinatorEnabled.store(false);
77
// ARMARX_INFO << "Coordinator is disabled!!";
78
// }
79
80
}
// namespace armarx::control::njoint_controller::core
CoordinatorBase.h
Logging.h
armarx::control::njoint_controller::core::CoordinatorBase::CoordinatorBase
CoordinatorBase()
Definition
CoordinatorBase.cpp:16
armarx::control::njoint_controller::core::CoordinatorBase::~CoordinatorBase
~CoordinatorBase()
Definition
CoordinatorBase.cpp:21
ARMARX_INFO
#define ARMARX_INFO
The normal logging level.
Definition
Logging.h:181
ARMARX_IMPORTANT
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
Definition
Logging.h:190
armarx::control::njoint_controller::core
This file is part of ArmarX.
Definition
CollisionAvoidanceCore.cpp:14
armarx
control
njoint_controller
core
CoordinatorBase.cpp
Generated by
1.13.2