NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
abstractspace.h
1 // Widget to edit joints in Abstract Space
2 // Author: Dmytro Pavlichenko <dm.mark999@gmail.com>
3 
4 #ifndef ABSTRACTSPACE_H
5 #define ABSTRACTSPACE_H
6 
7 #include <QLabel>
8 #include <QGridLayout>
9 
10 #include <gait/util/gait_abstract_pose.h>
11 #include <boost/shared_ptr.hpp>
12 
13 #include <motion_file/poseconverter.h>
14 #include <trajectory_editor/spaces/rateangleview.h>
15 #include <trajectory_editor/spaces/basicspace.h>
16 
17 class AbstractSpace : public BasicSpace
18 {
19 Q_OBJECT
20 public:
21  AbstractSpace(const std::vector<std::string> &jointList, QWidget *parent = 0);
22  ~AbstractSpace();
23 
24 public Q_SLOTS:
25  void handlePerspectiveUpdate(const joint_perspective::JointPerspective &perspective);
26 
27 private Q_SLOTS:
28  void handleRateChanged(std::string jointName);
29  void handleChangeForInverse(const std::string joint_name, const RateAngleView::Field field, const double value);
30 
31 private:
32  void initViews();
33  void updateFrame();
34 
35  void updateRate(double rate, std::string jointName);
36  void updateRateFromUI(std::string name, double rate);
37 
38  // Find joint jointName in jointList and create view for it. Put it on layout
39  // If jointName was not found, put warning on layout
40  void findAndPutView(std::string jointName, std::string label, int row
41  , RateAngleView::Alignment alignment, RateAngleView::Type type, bool shiftMirrored);
42 
43  void createHeaderLabels(RateAngleView::Alignment alignment, int row);
44 
45 private:
46  gait::AbstractPose *abstractPose;
47 
48  std::vector<RateAngleView*> jointViews;
49  QGridLayout *jointsLayout;
50 
51  motionfile::PoseConverter p;
52 };
53 
54 #endif // ABSTRACTSPACE_H
Data struct that encompasses the abstract representation of a robot pose.
Definition: gait_abstract_pose.h:214