LookForObjectsWithKinematicUnit.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Fabian Reister ( fabian dot reister at kit dot edu )
17  * @date 2023
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
24 #include <VirtualRobot/VirtualRobot.h>
25 
26 #include <RobotAPI/interface/core/RobotState.h>
27 #include <RobotAPI/interface/speech/SpeechInterface.h>
28 #include <RobotAPI/interface/units/KinematicUnitInterface.h>
31 
32 #include <armarx/view_selection/skills/aron/LookForObjects.aron.generated.h>
33 
35 {
37  virtual public armarx::skills::SimpleSpecializedSkill<arondto::LookForObjectsParams>
38  {
39  public:
40  using Params = arondto::LookForObjectsParams;
42 
43  struct Services
44  {
45  KinematicUnitInterfacePrx kinematicUnit;
46 
48  armarx::TextListenerInterfacePrx textToSpeech;
50 
51  // armem::client::MemoryNameSystem& memoryNameSystem;
52  };
53 
55 
56  private:
59 
60  void onStopRequested() override;
61 
62 
63  public:
65 
66  std::optional<objpose::ObjectPose> findObject(const objpose::ObjectPoseSeq& objectPoses,
67  const armarx::ObjectID& objectID);
68  void setNeckJointAngles(float goal_yaw, float goal_pitch, int waypoints_num);
69  void speak(const std::string& text);
70 
71 
72  protected:
73  private:
74  std::optional<Services> srv_;
75 
76  // will be initialized in "init()"
77  };
78 
79 } // namespace armarx::view_selection::skills
armarx::view_selection::skills
This file is part of ArmarX.
Definition: constants.cpp:25
armarx::skills::SimpleSpecializedSkill< arondto::LookForObjectsParams >::init
Skill::InitResult init() final
Definition: SimpleSpecializedSkill.h:62
armarx::ObjectID
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
Definition: ObjectID.h:10
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::speak
void speak(const std::string &text)
Definition: LookForObjectsWithKinematicUnit.cpp:61
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::Services::kinematicUnit
KinematicUnitInterfacePrx kinematicUnit
Definition: LookForObjectsWithKinematicUnit.h:45
armarx::objpose::ObjectPoseSeq
std::vector< ObjectPose > ObjectPoseSeq
Definition: forward_declarations.h:20
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::Services::textToSpeech
armarx::TextListenerInterfacePrx textToSpeech
Definition: LookForObjectsWithKinematicUnit.h:48
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::LookForObjectsWithKinematicUnit
LookForObjectsWithKinematicUnit(const Services &srv)
Definition: LookForObjectsWithKinematicUnit.cpp:27
armarx::skills::SkillDescription
Definition: SkillDescription.h:17
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::DefaultSkillDescription
static armarx::skills::SkillDescription DefaultSkillDescription()
Definition: LookForObjectsWithKinematicUnit.cpp:196
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::findObject
std::optional< objpose::ObjectPose > findObject(const objpose::ObjectPoseSeq &objectPoses, const armarx::ObjectID &objectID)
armarx::objpose::ObjectPoseClient
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
Definition: ObjectPoseClient.h:17
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::Params
arondto::LookForObjectsParams Params
Definition: LookForObjectsWithKinematicUnit.h:40
SimpleSpecializedSkill.h
armarx::skills::SimpleSpecializedSkill::SpecializedMainInput
Definition: SimpleSpecializedSkill.h:24
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::Services::robotStateComponent
armarx::RobotStateComponentInterfacePrx robotStateComponent
Definition: LookForObjectsWithKinematicUnit.h:49
armarx::view_selection::skills::LookForObjectsWithKinematicUnit
Definition: LookForObjectsWithKinematicUnit.h:36
ObjectPoseClient.h
armarx::skills::SimpleSpecializedSkill
Definition: SimpleSpecializedSkill.h:10
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition: Skill.h:39
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::Services
Definition: LookForObjectsWithKinematicUnit.h:43
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::Services::objectPoseClient
objpose::ObjectPoseClient objectPoseClient
Definition: LookForObjectsWithKinematicUnit.h:47
armarx::skills::SimpleSpecializedSkill::SpecializedInitInput
Definition: SimpleSpecializedSkill.h:18
armarx::skills::SimpleSpecializedSkill< arondto::LookForObjectsParams >::main
Skill::MainResult main() final
Definition: SimpleSpecializedSkill.h:71
armarx::view_selection::skills::LookForObjectsWithKinematicUnit::setNeckJointAngles
void setNeckJointAngles(float goal_yaw, float goal_pitch, int waypoints_num)
Definition: LookForObjectsWithKinematicUnit.cpp:41
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
armarx::skills::Skill::InitResult
A result struct for skill initialization.
Definition: Skill.h:27