RobotHeadMovement.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 #include <optional>
6 
7 #include <ArmarXCore/interface/observers/ObserverInterface.h>
11 
13 
14 #include <RobotAPI/interface/observers/KinematicUnitObserverInterface.h>
15 #include <RobotAPI/interface/objectpose/ObjectPoseStorageInterface.h>
16 
17 
18 namespace armarx
19 {
20  class PropertyDefinitionContainer;
22 }
23 
25 {
27  {
28  public:
29 
30  void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string& prefix = "head.");
31 
32  void fetchDatafields();
33  bool isMoving() const;
34 
35  void movementStarts(long discardIntervalMs);
36  void movementStarts(const Duration& discardInterval);
37  void movementStops(long discardIntervalMs);
38  void movementStops(const Duration& discardInterval);
39 
40  objpose::SignalHeadMovementOutput signalHeadMovement(const objpose::SignalHeadMovementInput& input);
41 
42 
43  struct Discard
44  {
45  std::optional<DateTime> updatesUntil;
46  bool all = false;
47  };
49 
50 
51  public:
52 
53  bool checkHeadVelocity = true;
54 
55  std::string jointVelocitiesChannelName = "jointvelocities";
56  std::vector<std::string> jointNames = {"Neck_1_Yaw", "Neck_2_Pitch"};
57  float maxJointVelocity = 0.05f;
59 
60  KinematicUnitObserverInterfacePrx kinematicUnitObserver;
61  std::vector<DatafieldRefPtr> jointVelocitiesDatafields;
63 
65 
66 
67  struct RemoteGui
68  {
70 
74 
75  void setup(const RobotHeadMovement& rhm);
76  void update(RobotHeadMovement& rhm);
77  };
78 
79  };
80 
81 }
armarx::armem::server::obj::instance::RobotHeadMovement::getDiscard
Discard getDiscard()
Definition: RobotHeadMovement.cpp:123
armarx::armem::server::obj::instance::RobotHeadMovement::discardUpdatesUntil
DateTime discardUpdatesUntil
Definition: RobotHeadMovement.h:62
armarx::armem::server::obj::instance::RobotHeadMovement::RemoteGui::setup
void setup(const RobotHeadMovement &rhm)
Definition: RobotHeadMovement.cpp:148
armarx::armem::server::obj::instance::RobotHeadMovement::RemoteGui::maxJointVelocity
armarx::RemoteGui::Client::FloatSpinBox maxJointVelocity
Definition: RobotHeadMovement.h:72
armarx::armem::server::obj::instance::RobotHeadMovement::maxJointVelocity
float maxJointVelocity
Definition: RobotHeadMovement.h:57
DateTime.h
armarx::armem::server::obj::instance::RobotHeadMovement::kinematicUnitObserver
KinematicUnitObserverInterfacePrx kinematicUnitObserver
Definition: RobotHeadMovement.h:60
armarx::armem::server::obj::instance::RobotHeadMovement::Discard::all
bool all
Definition: RobotHeadMovement.h:46
armarx::armem::server::obj::instance::RobotHeadMovement::movementStops
void movementStops(long discardIntervalMs)
Definition: RobotHeadMovement.cpp:83
armarx::armem::server::obj::instance::RobotHeadMovement::fetchDatafields
void fetchDatafields()
Definition: RobotHeadMovement.cpp:21
armarx::armem::server::obj::instance::RobotHeadMovement::jointNames
std::vector< std::string > jointNames
Definition: RobotHeadMovement.h:56
armarx::armem::server::obj::instance::RobotHeadMovement::defineProperties
void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="head.")
Definition: RobotHeadMovement.cpp:11
armarx::armem::server::obj::instance
Definition: ArticulatedObjectVisu.cpp:16
armarx::armem::server::obj::instance::RobotHeadMovement::RemoteGui::group
armarx::RemoteGui::Client::GroupBox group
Definition: RobotHeadMovement.h:69
armarx::armem::server::obj::instance::RobotHeadMovement::RemoteGui::update
void update(RobotHeadMovement &rhm)
Definition: RobotHeadMovement.cpp:179
armarx::armem::server::obj::instance::RobotHeadMovement::movementStarts
void movementStarts(long discardIntervalMs)
Definition: RobotHeadMovement.cpp:75
DatafieldRef.h
armarx::armem::server::obj::instance::RobotHeadMovement::RemoteGui::discardIntervalAfterMoveMS
armarx::RemoteGui::Client::IntSpinBox discardIntervalAfterMoveMS
Definition: RobotHeadMovement.h:73
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:19
armarx::armem::server::obj::instance::RobotHeadMovement::Discard
Definition: RobotHeadMovement.h:43
armarx::RemoteGui::Client::GroupBox
Definition: Widgets.h:193
armarx::armem::server::obj::instance::RobotHeadMovement::isMoving
bool isMoving() const
Definition: RobotHeadMovement.cpp:58
armarx::armem::server::obj::instance::RobotHeadMovement::Discard::updatesUntil
std::optional< DateTime > updatesUntil
Definition: RobotHeadMovement.h:45
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
armarx::Logging
Base Class for all Logging classes.
Definition: Logging.h:232
armarx::armem::server::obj::instance::RobotHeadMovement
Definition: RobotHeadMovement.h:26
armarx::armem::server::obj::instance::RobotHeadMovement::RemoteGui
Definition: RobotHeadMovement.h:67
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::armem::server::obj::instance::RobotHeadMovement::discardIntervalAfterMoveMS
int discardIntervalAfterMoveMS
Definition: RobotHeadMovement.h:58
armarx::core::time::Duration
Represents a duration.
Definition: Duration.h:17
IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface >
armarx::RemoteGui::Client::IntSpinBox
Definition: Widgets.h:69
armarx::RemoteGui::Client::CheckBox
Definition: Widgets.h:129
Widgets.h
armarx::armem::server::obj::instance::RobotHeadMovement::signalHeadMovement
objpose::SignalHeadMovementOutput signalHeadMovement(const objpose::SignalHeadMovementInput &input)
Definition: RobotHeadMovement.cpp:101
armarx::armem::server::obj::instance::RobotHeadMovement::RemoteGui::checkHeadVelocity
armarx::RemoteGui::Client::CheckBox checkHeadVelocity
Definition: RobotHeadMovement.h:71
Logging.h
armarx::armem::server::obj::instance::RobotHeadMovement::checkHeadVelocity
bool checkHeadVelocity
Definition: RobotHeadMovement.h:53
armarx::armem::server::obj::instance::RobotHeadMovement::jointVelocitiesDatafields
std::vector< DatafieldRefPtr > jointVelocitiesDatafields
Definition: RobotHeadMovement.h:61
armarx::PropertyDefinitionsPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Definition: forward_declarations.h:34
armarx::armem::server::obj::instance::RobotHeadMovement::jointVelocitiesChannelName
std::string jointVelocitiesChannelName
Definition: RobotHeadMovement.h:55
armarx::RemoteGui::Client::FloatSpinBox
Definition: Widgets.h:93
armarx::core::time::DateTime::Invalid
static DateTime Invalid()
Definition: DateTime.cpp:60
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::armem::server::obj::instance::RobotHeadMovement::debugObserver
DebugObserverInterfacePrx debugObserver
Definition: RobotHeadMovement.h:64