Robot.cpp
Go to the documentation of this file.
1 #include "Robot.h"
2 
4 {
5 
6  void
7  TCPInfo::fromIce(const dto::TCPInfo& r)
8  {
9  name = r.name;
10  ft_name = r.ft_name;
11  handUnitInterface = r.handUnitInterface;
12  }
13 
14  dto::TCPInfo
16  {
17  dto::TCPInfo r;
18  r.name = name;
19  r.ft_name = ft_name;
20  r.handUnitInterface = handUnitInterface;
21  return r;
22  }
23 
24  void
25  ArmInfo::fromIce(const dto::ArmInfo& r)
26  {
27  kinematicChainName = r.kinematicChainName;
28  hand.fromIce(r.tcpInfo);
29  }
30 
31  dto::ArmInfo
33  {
34  dto::ArmInfo r;
35  r.kinematicChainName = kinematicChainName;
36  r.tcpInfo = hand.toIce();
37  return r;
38  }
39 
40  void
41  RobotInfo::fromIce(const dto::RobotInfo& r)
42  {
43  name = r.name;
44  xmlPackagePath = r.xmlPackagePath;
46  skillManager = r.skillManager;
47 
48  armInfos.clear();
49  for (const auto& [k, a] : r.armInfos)
50  {
51  armInfos[k].fromIce(a);
52  }
53 
54  robotUnit = r.robotUnit;
55  }
56 
57  dto::RobotInfo
59  {
60  dto::RobotInfo r;
61  r.name = name;
62  r.xmlPackagePath = xmlPackagePath;
63  r.memoryNameSystem = memoryNameSystem.getMemoryNameSystem();
64  r.skillManager = skillManager;
65 
66  for (const auto& [k, a] : armInfos)
67  {
68  r.armInfos[k] = a.toIce();
69  }
70 
71  r.robotUnit = robotUnit;
72  return r;
73  }
74 
75 } // namespace armarx::robot_name_service::core
armarx::robot_name_service::core::RobotInfo::toIce
armarx::robot_name_service::dto::RobotInfo toIce() const
Definition: Robot.cpp:58
armarx::robot_name_service::core::RobotInfo::skillManager
armarx::skills::manager::dti::SkillManagerInterfacePrx skillManager
Definition: Robot.h:49
armarx::robot_name_service::core
Definition: aron_conversions.cpp:3
armarx::robot_name_service::core::TCPInfo::fromIce
void fromIce(const armarx::robot_name_service::dto::TCPInfo &r)
Definition: Robot.cpp:7
armarx::robot_name_service::core::TCPInfo::toIce
armarx::robot_name_service::dto::TCPInfo toIce() const
Definition: Robot.cpp:15
armarx::robot_name_service::core::ArmInfo::toIce
armarx::robot_name_service::dto::ArmInfo toIce() const
Definition: Robot.cpp:32
armarx::robot_name_service::core::TCPInfo::handUnitInterface
armarx::HandUnitInterfacePrx handUnitInterface
Definition: Robot.h:22
armarx::robot_name_service::core::RobotInfo::robotUnit
armarx::RobotUnitInterfacePrx robotUnit
Definition: Robot.h:55
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
armarx::robot_name_service::core::RobotInfo::memoryNameSystem
armarx::armem::client::MemoryNameSystem memoryNameSystem
Definition: Robot.h:48
armarx::robot_name_service::core::RobotInfo::name
std::string name
Definition: Robot.h:44
armarx::robot_name_service::core::ArmInfo::fromIce
void fromIce(const armarx::robot_name_service::dto::ArmInfo &r)
Definition: Robot.cpp:25
armarx::robot_name_service::core::TCPInfo::ft_name
std::string ft_name
Definition: Robot.h:21
armarx::robot_name_service::core::RobotInfo::xmlPackagePath
armarx::data::PackagePath xmlPackagePath
Definition: Robot.h:45
armarx::robot_name_service::core::TCPInfo::name
std::string name
Definition: Robot.h:20
Robot.h
armarx::armem::client::MemoryNameSystem::getMemoryNameSystem
mns::MemoryNameSystemInterfacePrx getMemoryNameSystem() const
Definition: MemoryNameSystem.cpp:428
armarx::robot_name_service::core::ArmInfo::hand
TCPInfo hand
Definition: Robot.h:33
armarx::robot_name_service::core::RobotInfo::fromIce
void fromIce(const armarx::robot_name_service::dto::RobotInfo &r)
Definition: Robot.cpp:41
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition: MemoryNameSystem.h:69
armarx::robot_name_service::core::ArmInfo::kinematicChainName
std::string kinematicChainName
Definition: Robot.h:32
armarx::robot_name_service::core::RobotInfo::armInfos
std::map< std::string, ArmInfo > armInfos
Definition: Robot.h:52