MovePlatformToLandmark.cpp
Go to the documentation of this file.
2
4
5#include "util/PlatformUtil.h"
6
7namespace armarx::skills
8{
9
10 namespace
11 {
12 platform_control::arondto::MovePlatformToLandmarkAcceptedType
13 GetDefaultParameterization()
14 {
15 platform_control::arondto::MovePlatformToLandmarkAcceptedType ret;
16 ret.orientationalAccuracy = 0.1;
17 ret.positionalAccuracy = 100;
18 return ret;
19 }
20 } // namespace
21
23 {"MovePlatformToLandmark"},
24 "Move a platform unit to target landmark. Uses a navigation memory to resolve the "
25 "landmark.",
26 GetDefaultParameterization().toAron(),
28 platform_control::arondto::MovePlatformToLandmarkAcceptedType::ToAronType());
29
37
39 MovePlatformToLandmark::main(const SpecializedMainInput& in)
40 {
41 auto navigationReader = armarx::armem::locations::client::Reader();
42 navigationReader.connect(mns);
43
44 // convert landmark
45 auto conversion =
46 convertLandmarkToPose(in.parameters.graph, in.parameters.landmark, navigationReader);
47
48 // create params to reuse skill
49 platform_control::arondto::MovePlatformToPoseAcceptedType args;
50 args.robotName = in.parameters.robotName;
51 args.orientationalAccuracy = in.parameters.orientationalAccuracy;
52 args.positionalAccuracy = in.parameters.positionalAccuracy;
53 args.pose = conversion;
54
56 return {prx.executeSkill(getSkillId().toString(), args.toAron()).status, nullptr};
57 }
58} // namespace armarx::skills
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition Duration.cpp:48
The memory name system (MNS) client.
platform_control::arondto::MovePlatformToLandmarkAcceptedType ArgType
MovePlatformToLandmark(armem::client::MemoryNameSystem &mns, armarx::viz::Client &arviz, PlatformControlSkillContext &context)
PlatformControlSkillContext & context
PlatformControlSkill(armem::client::MemoryNameSystem &mns, armarx::viz::Client &arviz, const std::string &layerName, PlatformControlSkillContext &c)
manager::dti::SkillManagerInterfacePrx manager
Definition Skill.h:363
virtual MainResult main()
Override this method with the actual implementation.
Definition Skill.cpp:542
SkillID getSkillId() const
Get the id of the skill.
Definition Skill.cpp:587
This file is part of ArmarX.
A result struct for th main method of a skill.
Definition Skill.h:62
armem::client::MemoryNameSystem mns