50 std::vector<Eigen::Vector3f>
57 const std::vector<Eigen::Vector3f> gazePositions{
67 ScanLocation::init(
const Base::SpecializedInitInput& in)
69 return ::armarx::skills::Skill::InitResult{
75 ScanLocation::main(
const Base::SpecializedMainInput& in)
78 const std::vector<std::string> directionNames{
"left",
"to the front",
"to the right"};
82 for (
size_t i = 0; i < gazePositions.size(); ++i)
90 if (in.parameters.keepCentralGazeTargetAfterScanning)
92 const float y = in.parameters.y;
93 const float z = in.parameters.z;
95 const Eigen::Vector3f gazePosition{0, y, z};
100 gazeTarget.duration = infinite;
102 ARMARX_INFO <<
"Spawning final gaze target at the center";
103 srv_.viewSelectionClient.commitGazeTarget(gazeTarget);
106 return ::armarx::skills::Skill::MainResult{
111 ScanLocation::onStopRequested()
116 armarx::skills::SkillDescription
120 defaults.agent =
"Armar7";
121 defaults.frame =
"root";
122 defaults.priority = 10;
123 defaults.gazeTargetName =
"ScanLocationTarget";
124 defaults.keepCentralGazeTargetAfterScanning =
false;
126 defaults.durationPerViewSeconds = 4;
127 defaults.xDelta = 200;
134 .rootProfileDefaults = defaults.toAron(),
136 .parametersType = Params::ToAronType(),
static void WaitFor(const Duration &duration)
Wait for a certain duration on the virtual clock.
static Duration Seconds(std::int64_t seconds)
Constructs a duration in seconds.
static Duration SecondsDouble(double seconds)
Constructs a duration in seconds.
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
The FramedPosition class.
static Duration Seconds(std::int64_t seconds)
Constructs a duration in seconds.
armarx::aron::data::DictPtr parameters
void commitGazeTarget(const gaze_targets::GazeTarget &target)
Business Object (BO) class of GazeTarget.
The Priority of a GazeTarget.
static gaze_targets::GazeTarget MakeGazeTarget(const Eigen::Vector3f &position, const arondto::ScanLocationParams ¶meters)
ScanLocation(const Services &srv)
::armarx::skills::SimpleSpecializedSkill< Params > Base
static std::vector< Eigen::Vector3f > MakeGazeTargetPositions(const arondto::ScanLocationParams ¶meters)
static armarx::skills::SkillDescription DefaultSkillDescription()
arondto::ScanLocationParams Params
#define ARMARX_INFO
The normal logging level.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
@ TaskDriven
Task-Driven attention has highest priority.
const armarx::skills::SkillID ScanLocation
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
A result struct for skill initialization.
A result struct for th main method of a skill.
client::ViewSelection & viewSelectionClient