ControllerClient.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2020 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
9 
10 #include <mc_rtc/Configuration.h>
11 #include <mc_rtc/gui/plot/types.h>
12 #include <mc_rtc/gui/types.h>
13 
14 #include <string>
15 #include <thread>
16 #include <vector>
17 
18 namespace mc_control
19 {
20 
23 {
24  ElementId() = default;
25  ElementId(const ElementId &) = default;
26  ElementId(ElementId &&) = default;
27  ElementId & operator=(const ElementId &) = default;
28  ElementId & operator=(ElementId &&) = default;
29 
30  ElementId(const std::vector<std::string> & category, const std::string & name, int sid)
31  : category(category), name(name), sid(sid)
32  {
33  }
34 
35  ElementId(const std::vector<std::string> & category, const std::string & name) : ElementId(category, name, -1) {}
36 
38  std::vector<std::string> category = {};
40  std::string name = {};
42  int sid = -1;
43 };
44 
52 {
53 
59 
72  ControllerClient(const std::string & sub_conn_uri, const std::string & push_conn_uri, double timeout = 0);
73 
82 
83  ControllerClient(const ControllerClient &) = delete;
84  ControllerClient & operator=(const ControllerClient &) = delete;
85 
87 
89  void connect(const std::string & sub_conn_uri, const std::string & push_conn_uri);
90 
92  void connect(ControllerServer & server, mc_rtc::gui::StateBuilder & gui);
93 
95  void send_request(const ElementId & id, const mc_rtc::Configuration & data);
96 
98  template<typename T>
99  void send_request(const ElementId & id, const T & data)
100  {
102  c.add("data", data);
103  send_request(id, c("data"));
104  }
105 
107  void send_request(const ElementId & id);
108 
113  void raw_request(const ElementId & id, const mc_rtc::Configuration & data, std::string & out);
114 
116  template<typename T>
117  void raw_request(const ElementId & id, const T & data, std::string & out)
118  {
120  c.add("data", data);
121  raw_request(id, c("data"), out);
122  }
123 
125  void raw_request(const ElementId & id, std::string & out);
126 
128  void timeout(double t);
129 
131  double timeout();
132 
146  void run(std::vector<char> & buffer, std::chrono::system_clock::time_point & t_last_received);
147 
154  void run(const char * buffer, size_t bufferSize);
155 
156 protected:
158  void start();
159 
168  void reconnect(const std::string & sub_conn_uri, const std::string & push_conn_uri);
169 
171  void stop();
172 
173  void handle_gui_state(mc_rtc::Configuration state);
174 
175  void handle_category(const std::vector<std::string> & parent,
176  const std::string & category,
177  const mc_rtc::Configuration & data);
178 
179  void handle_widget(const ElementId & id, const mc_rtc::Configuration & data);
180 
182  virtual void started() {}
183 
185  virtual void stopped() {}
186 
188  virtual void category(const std::vector<std::string> & parent, const std::string & category) {};
189 
191  inline virtual void label(const ElementId & id, const std::string &) { default_impl("Label", id); }
192 
200  inline virtual void array_label(const ElementId & id, const std::vector<std::string> &, const Eigen::VectorXd &)
201  {
202  default_impl("ArrayLabel", id);
203  }
204 
206  virtual void button(const ElementId & id) { default_impl("Button", id); }
207 
209  virtual void checkbox(const ElementId & id, bool /*state */) { default_impl("Checkbox", id); }
210 
212  virtual void string_input(const ElementId & id, const std::string & /*data*/) { default_impl("StringInput", id); }
213 
215  virtual void integer_input(const ElementId & id, int /*data*/) { default_impl("IntegerInput", id); }
216 
218  virtual void number_input(const ElementId & id, double /*data*/) { default_impl("NumberInput", id); }
219 
220  virtual void number_slider(const ElementId & id, double /*data*/, double /*min*/, double /*max*/)
221  {
222  default_impl("NumberSlider", id);
223  }
224 
226  virtual void array_input(const ElementId & id,
227  const std::vector<std::string> & /*labels*/,
228  const Eigen::VectorXd & /*data*/)
229  {
230  default_impl("ArrayInput", id);
231  }
232 
234  virtual void combo_input(const ElementId & id,
235  const std::vector<std::string> & /*values*/,
236  const std::string & /*data*/)
237  {
238  default_impl("ComboInput", id);
239  }
240 
243  virtual void data_combo_input(const ElementId & id,
244  const std::vector<std::string> & /*data_ref*/,
245  const std::string & /*data*/)
246  {
247  default_impl("DataComboInput", id);
248  }
249 
256  virtual void point3d(const ElementId & id,
257  const ElementId & /*requestId*/,
258  bool /*ro */,
259  const Eigen::Vector3d & /*pos*/,
260  const mc_rtc::gui::PointConfig & /* config */)
261  {
262  default_impl("Point3D", id);
263  }
264 
269  virtual void trajectory(const ElementId & id,
270  const std::vector<Eigen::Vector3d> & /* points */,
271  const mc_rtc::gui::LineConfig & /* config */)
272  {
273  default_impl("Point3DTrajectory", id);
274  }
275 
280  virtual void trajectory(const ElementId & id,
281  const std::vector<sva::PTransformd> & /* points */,
282  const mc_rtc::gui::LineConfig & /* config */)
283  {
284  default_impl("PoseTrajectory", id);
285  }
286 
291  virtual void trajectory(const ElementId & id,
292  const Eigen::Vector3d & /* point */,
293  const mc_rtc::gui::LineConfig & /* config */)
294  {
295  default_impl("Point3DRealTimeTrajectory", id);
296  }
297 
302  virtual void trajectory(const ElementId & id,
303  const sva::PTransformd & /* point */,
304  const mc_rtc::gui::LineConfig & /* config */)
305  {
306  default_impl("PoseRealTimeTrajectory", id);
307  }
308 
320  virtual void polygon(const ElementId & id,
321  const std::vector<std::vector<Eigen::Vector3d>> & /* points */,
322  const mc_rtc::gui::Color & /* color */)
323  {
324  default_impl("PolygonArray", id);
325  }
326 
337  virtual void polygon(const ElementId & id,
338  const std::vector<std::vector<Eigen::Vector3d>> & points,
339  const mc_rtc::gui::LineConfig & config)
340  {
341  polygon(id, points, config.color);
342  }
343 
354  virtual void polyhedron(const ElementId & id,
355  const std::vector<std::array<Eigen::Vector3d, 3>> & triangles,
356  const std::vector<std::array<mc_rtc::gui::Color, 3>> & colors,
357  const mc_rtc::gui::PolyhedronConfig & config);
358 
369  virtual void polyhedron(const ElementId & id,
370  const std::vector<Eigen::Vector3d> & vertices,
371  const std::vector<std::array<size_t, 3>> & triangles,
372  const std::vector<mc_rtc::gui::Color> & colors,
373  const mc_rtc::gui::PolyhedronConfig & config);
374 
377  virtual void force(const ElementId & id,
378  const ElementId & /*requestId*/,
379  const sva::ForceVecd & /* force */,
380  const sva::PTransformd & /* application point for the force */,
381  const mc_rtc::gui::ForceConfig & /* forceConfig */,
382  bool /* ro */)
383  {
384  default_impl("Force", id);
385  }
386 
389  virtual void arrow(const ElementId & id,
390  const ElementId & /* requestId */,
391  const Eigen::Vector3d & /* start */,
392  const Eigen::Vector3d & /* end */,
393  const mc_rtc::gui::ArrowConfig & /* config */,
394  bool /* ro */)
395  {
396  default_impl("Arrow", id);
397  }
398 
405  virtual void rotation(const ElementId & id,
406  const ElementId & /*requestId*/,
407  bool /*ro */,
408  const sva::PTransformd & /*pos*/)
409  {
410  default_impl("Rotation", id);
411  }
412 
419  virtual void transform(const ElementId & id,
420  const ElementId & /*requestId*/,
421  bool /*ro */,
422  const sva::PTransformd & /*pos*/)
423  {
424  default_impl("Transform", id);
425  }
426 
433  virtual void xytheta(const ElementId & id,
434  const ElementId & /*requestId*/,
435  bool /*ro */,
436  const Eigen::Vector3d & /*xytheta*/,
437  double /* altitude */)
438  {
439  default_impl("XYTheta", id);
440  }
441 
443  virtual void table_start(const ElementId & id, const std::vector<std::string> & /*header*/)
444  {
445  default_impl("Table", id);
446  }
447 
449  virtual void table_row(const ElementId & /*id*/, const std::vector<std::string> & /*data*/) {}
450 
452  virtual void table_end(const ElementId & /*id*/) {}
453 
456  virtual void robot(const ElementId & id,
457  const std::vector<std::string> & /*parameters*/,
458  const std::vector<std::vector<double>> & /*q*/,
459  const sva::PTransformd & /*posW*/)
460  {
461  default_impl("Robot", id);
462  }
463 
464  virtual void robot_msg(const ElementId & id, const mc_rtc::gui::RobotMsgData & /*msg*/)
465  {
466  default_impl("RobotMsg", id);
467  }
468 
470  virtual void visual(const ElementId & id,
471  [[maybe_unused]] const rbd::parsers::Visual & visual,
472  [[maybe_unused]] const sva::PTransformd & pose)
473  {
474  default_impl("Visual", id);
475  }
476 
481  virtual void schema(const ElementId & id, const std::string & /*schema*/) { default_impl("Schema", id); }
482 
484  virtual void form(const ElementId & id) { default_impl("Form", id); }
485 
490  virtual void form_checkbox(const ElementId & /*formId*/,
491  const std::string & /*name*/,
492  bool /*required*/,
493  bool /*default*/)
494  {
495  }
496 
498  virtual void form_checkbox(const ElementId & formId,
499  const std::string & name,
500  bool required,
501  bool default_,
502  bool /*default_from_user*/)
503  {
504  form_checkbox(formId, name, required, default_);
505  }
506 
511  virtual void form_integer_input(const ElementId & /*formId*/,
512  const std::string & /*name*/,
513  bool /*required*/,
514  int /*default*/)
515  {
516  }
517 
519  virtual void form_integer_input(const ElementId & formId,
520  const std::string & name,
521  bool required,
522  int default_,
523  bool /*default_from_user*/)
524  {
525  form_integer_input(formId, name, required, default_);
526  }
527 
532  virtual void form_number_input(const ElementId & /*formId*/,
533  const std::string & /*name*/,
534  bool /*required*/,
535  double /*default*/)
536  {
537  }
538 
540  virtual void form_number_input(const ElementId & formId,
541  const std::string & name,
542  bool required,
543  double default_,
544  bool /*default_from_user*/)
545  {
546  form_number_input(formId, name, required, default_);
547  }
548 
553  virtual void form_string_input(const ElementId & /*formId*/,
554  const std::string & /*name*/,
555  bool /*required*/,
556  const std::string & /*default*/)
557  {
558  }
559 
561  virtual void form_string_input(const ElementId & formId,
562  const std::string & name,
563  bool required,
564  const std::string & default_,
565  bool /*default_from_user*/)
566  {
567  form_string_input(formId, name, required, default_);
568  }
569 
574  virtual void form_array_input(const ElementId & /*formId*/,
575  const std::string & /*name*/,
576  bool /*required*/,
577  const Eigen::VectorXd & /*default*/,
578  bool /*fixed_size*/)
579  {
580  }
581 
586  virtual void form_array_input(const ElementId & formId,
587  const std::string & name,
588  bool required,
589  const Eigen::VectorXd & default_,
590  bool fixed_size,
591  bool /*default_from_user*/)
592  {
593  form_array_input(formId, name, required, default_, fixed_size);
594  }
595 
597  virtual void form_array_input(const ElementId & formId,
598  const std::string & name,
599  bool required,
600  const std::vector<std::string> & /*labels*/,
601  const Eigen::VectorXd & default_,
602  bool fixed_size,
603  bool default_from_user)
604  {
605  form_array_input(formId, name, required, default_, fixed_size, default_from_user);
606  }
607 
612  virtual void form_combo_input(const ElementId & /*formId*/,
613  const std::string & /*name*/,
614  bool /*required*/,
615  const std::vector<std::string> & /*values*/,
616  bool /*send_index*/)
617  {
618  }
619 
633  virtual void form_combo_input(const ElementId & formId,
634  const std::string & name,
635  bool required,
636  const std::vector<std::string> & values,
637  bool send_index,
638  int /*def*/)
639  {
640  form_combo_input(formId, name, required, values, send_index);
641  }
642 
658  virtual void form_data_combo_input(const ElementId & /*formId*/,
659  const std::string & /*name*/,
660  bool /*required*/,
661  const std::vector<std::string> & /*ref*/,
662  bool /*send_index*/)
663  {
664  }
665 
680  virtual void form_point3d_input(const ElementId & /*formId*/,
681  const std::string & /*name*/,
682  bool /*required*/,
683  const Eigen::Vector3d & /*default_*/,
684  bool /*default_from_user*/,
685  bool /*interactive*/)
686  {
687  }
688 
706  virtual void form_rotation_input(const ElementId & /*formId*/,
707  const std::string & /*name*/,
708  bool /*required*/,
709  const sva::PTransformd & /*default_*/,
710  bool /*default_from_user*/,
711  bool /*interactive*/)
712  {
713  }
714 
729  virtual void form_transform_input(const ElementId & /*formId*/,
730  const std::string & /*name*/,
731  bool /*required*/,
732  const sva::PTransformd & /*default_*/,
733  bool /*default_from_user*/,
734  bool /*interactive*/)
735  {
736  }
737 
746  virtual void start_form_object_input(const std::string & /*name*/, bool /*required*/) {}
747 
753  virtual void end_form_object_input() {}
754 
765  virtual void start_form_generic_array_input(const std::string & /*name*/,
766  bool /*required*/,
767  std::optional<std::vector<Configuration>> /*data*/)
768  {
769  }
770 
777 
789  virtual void start_form_one_of_input(const std::string & /*name*/,
790  bool /*required*/,
791  const std::optional<std::pair<size_t, Configuration>> & /*data*/)
792  {
793  }
794 
800  virtual void end_form_one_of_input() {}
801 
812  virtual void start_plot(uint64_t /*id*/, const std::string & /*title*/) {}
813 
823  virtual void plot_setup_xaxis(uint64_t /*id*/,
824  const std::string & /*legend*/,
825  const mc_rtc::gui::plot::Range & /*range*/)
826  {
827  }
828 
838  virtual void plot_setup_yaxis_left(uint64_t /*id*/,
839  const std::string & /*legend*/,
840  const mc_rtc::gui::plot::Range & /*range*/)
841  {
842  }
843 
853  virtual void plot_setup_yaxis_right(uint64_t /*id*/,
854  const std::string & /*legend*/,
855  const mc_rtc::gui::plot::Range & /*range*/)
856  {
857  }
858 
877  virtual void plot_point(uint64_t /* id */,
878  uint64_t /* did */,
879  const std::string & /*legend*/,
880  double /*x*/,
881  double /*y*/,
882  mc_rtc::gui::Color /*color*/,
883  mc_rtc::gui::plot::Style /*style*/,
884  mc_rtc::gui::plot::Side /*side*/)
885  {
886  }
887 
901  virtual void plot_polygon(uint64_t /*id*/,
902  uint64_t /* did */,
903  const std::string & /*legend*/,
904  const mc_rtc::gui::plot::PolygonDescription & /*polygon*/,
905  mc_rtc::gui::plot::Side /*side*/)
906  {
907  }
908 
922  virtual void plot_polygons(uint64_t /*id*/,
923  uint64_t /* did */,
924  const std::string & /*legend*/,
925  const std::vector<mc_rtc::gui::plot::PolygonDescription> & /*polygons*/,
926  mc_rtc::gui::plot::Side /*side*/)
927  {
928  }
929 
935  virtual void end_plot(uint64_t /*id*/) {}
936 
937  /* Network elements */
938  bool run_ = true;
939  int sub_socket_ = -1;
940  std::thread sub_th_;
941  int push_socket_ = -1;
942  double timeout_;
943 
944  /* Hold data from the server */
946 
947  /* Pointer to the server if connected in-memory */
948  ControllerServer * server_ = nullptr;
949  /* Pointer to the GUI if connected in-memory */
950  mc_rtc::gui::StateBuilder * gui_ = nullptr;
951 
952 private:
954  virtual void default_impl(const std::string & type, const ElementId & id);
955 
957  void handle_point3d(const ElementId & id, const mc_rtc::Configuration & data);
958 
960  void handle_trajectory(const ElementId & id, const mc_rtc::Configuration & data);
961 
963  void handle_polygon(const ElementId & id, const mc_rtc::Configuration & data);
964 
966  void handle_polyhedron_triangles_list(const ElementId & id, const mc_rtc::Configuration & data_);
967 
969  void handle_polyhedron_vertices_triangles(const ElementId & id, const mc_rtc::Configuration & data_);
970 
972  void handle_force(const ElementId & id, const mc_rtc::Configuration & data);
973 
975  void handle_arrow(const ElementId & id, const mc_rtc::Configuration & data);
976 
978  void handle_rotation(const ElementId & id, const mc_rtc::Configuration & data);
979 
981  void handle_transform(const ElementId & id, const mc_rtc::Configuration & data);
982 
984  void handle_xytheta(const ElementId & id, const mc_rtc::Configuration & data);
985 
987  void handle_form(const ElementId & id, const mc_rtc::Configuration & data);
988 
990  void handle_plot(const mc_rtc::Configuration & plot);
991 
993  void handle_standard_plot(const mc_rtc::Configuration & plot);
994 
996  void handle_xy_plot(const mc_rtc::Configuration & plot);
997 
999  void handle_table(const ElementId & id,
1000  const std::vector<std::string> & header,
1001  const std::vector<std::string> & format,
1002  const std::vector<mc_rtc::Configuration> & data);
1003 
1006  bool default_polyhedron_triangles_list_ = false;
1007  bool default_polyhedron_vertices_triangles_ = false;
1008 };
1009 
1010 } // namespace mc_control
mc_control::ElementId
Definition: ControllerClient.h:22
mc_rtc::Configuration
Simplify access to values hold within a JSON file.
Definition: Configuration.h:165
mc_control::ControllerClient::form_integer_input
virtual void form_integer_input(const ElementId &, const std::string &, bool, int)
Definition: ControllerClient.h:511
mc_control::ControllerClient::polygon
virtual void polygon(const ElementId &id, const std::vector< std::vector< Eigen::Vector3d >> &points, const mc_rtc::gui::LineConfig &config)
Definition: ControllerClient.h:337
types.h
ControllerServer.h
mc_control::ControllerClient::form_array_input
virtual void form_array_input(const ElementId &, const std::string &, bool, const Eigen::VectorXd &, bool)
Definition: ControllerClient.h:574
mc_control::ControllerClient::array_label
virtual void array_label(const ElementId &id, const std::vector< std::string > &, const Eigen::VectorXd &)
Definition: ControllerClient.h:200
mc_control::ControllerClient::robot
virtual void robot(const ElementId &id, const std::vector< std::string > &, const std::vector< std::vector< double >> &, const sva::PTransformd &)
Definition: ControllerClient.h:456
mc_rtc::gui::PolyhedronConfig
Definition: types.h:398
mc_rtc::gui::LineConfig::color
Color color
Definition: types.h:137
mc_control::ControllerClient::form_combo_input
virtual void form_combo_input(const ElementId &formId, const std::string &name, bool required, const std::vector< std::string > &values, bool send_index, int)
Definition: ControllerClient.h:633
mc_control::ControllerClient::form_array_input
virtual void form_array_input(const ElementId &formId, const std::string &name, bool required, const Eigen::VectorXd &default_, bool fixed_size, bool)
Definition: ControllerClient.h:586
types.h
mc_control::ControllerClient::form_data_combo_input
virtual void form_data_combo_input(const ElementId &, const std::string &, bool, const std::vector< std::string > &, bool)
Definition: ControllerClient.h:658
mc_control::ControllerClient::start_form_generic_array_input
virtual void start_form_generic_array_input(const std::string &, bool, std::optional< std::vector< Configuration >>)
Definition: ControllerClient.h:765
mc_control::ControllerClient::polygon
virtual void polygon(const ElementId &id, const std::vector< std::vector< Eigen::Vector3d >> &, const mc_rtc::gui::Color &)
Definition: ControllerClient.h:320
mc_control::ElementId::ElementId
ElementId(const std::vector< std::string > &category, const std::string &name, int sid)
Definition: ControllerClient.h:30
MC_CONTROL_CLIENT_DLLAPI
#define MC_CONTROL_CLIENT_DLLAPI
Definition: client_api.h:50
mc_control::ControllerClient::form_combo_input
virtual void form_combo_input(const ElementId &, const std::string &, bool, const std::vector< std::string > &, bool)
Definition: ControllerClient.h:612
mc_control::ControllerClient::trajectory
virtual void trajectory(const ElementId &id, const sva::PTransformd &, const mc_rtc::gui::LineConfig &)
Definition: ControllerClient.h:302
mc_rtc::gui::LineConfig
Definition: types.h:135
mc_control::ControllerClient::start_form_one_of_input
virtual void start_form_one_of_input(const std::string &, bool, const std::optional< std::pair< size_t, Configuration >> &)
Definition: ControllerClient.h:789
mc_control::ControllerClient::started
virtual void started()
Definition: ControllerClient.h:182
mc_control::ControllerClient::combo_input
virtual void combo_input(const ElementId &id, const std::vector< std::string > &, const std::string &)
Definition: ControllerClient.h:234
mc_control::ControllerClient::form_transform_input
virtual void form_transform_input(const ElementId &, const std::string &, bool, const sva::PTransformd &, bool, bool)
Definition: ControllerClient.h:729
mc_control::ControllerClient::end_plot
virtual void end_plot(uint64_t)
Definition: ControllerClient.h:935
mc_rtc::gui::plot::PolygonDescription
Definition: types.h:163
mc_rtc::gui::plot::Range
Definition: types.h:79
mc_control::ControllerClient::table_row
virtual void table_row(const ElementId &, const std::vector< std::string > &)
Definition: ControllerClient.h:449
mc_control::ControllerClient::plot_setup_yaxis_left
virtual void plot_setup_yaxis_left(uint64_t, const std::string &, const mc_rtc::gui::plot::Range &)
Definition: ControllerClient.h:838
mc_control::ControllerClient::data_combo_input
virtual void data_combo_input(const ElementId &id, const std::vector< std::string > &, const std::string &)
Definition: ControllerClient.h:243
mc_control::ControllerClient::button
virtual void button(const ElementId &id)
Definition: ControllerClient.h:206
mc_control::ControllerClient::end_form_object_input
virtual void end_form_object_input()
Definition: ControllerClient.h:753
mc_rtc::gui::ArrowConfig
Definition: types.h:205
mc_control::ControllerClient::trajectory
virtual void trajectory(const ElementId &id, const std::vector< Eigen::Vector3d > &, const mc_rtc::gui::LineConfig &)
Definition: ControllerClient.h:269
mc_control::ControllerClient::visual
virtual void visual(const ElementId &id, [[maybe_unused]] const rbd::parsers::Visual &visual, [[maybe_unused]] const sva::PTransformd &pose)
Definition: ControllerClient.h:470
mc_control::ControllerClient::form_array_input
virtual void form_array_input(const ElementId &formId, const std::string &name, bool required, const std::vector< std::string > &, const Eigen::VectorXd &default_, bool fixed_size, bool default_from_user)
Definition: ControllerClient.h:597
mc_control::ControllerClient::form_checkbox
virtual void form_checkbox(const ElementId &formId, const std::string &name, bool required, bool default_, bool)
Definition: ControllerClient.h:498
mc_control::ControllerClient::array_input
virtual void array_input(const ElementId &id, const std::vector< std::string > &, const Eigen::VectorXd &)
Definition: ControllerClient.h:226
mc_control::ControllerClient::send_request
void send_request(const ElementId &id, const T &data)
Definition: ControllerClient.h:99
mc_control::ControllerClient::start_form_object_input
virtual void start_form_object_input(const std::string &, bool)
Definition: ControllerClient.h:746
mc_control::ControllerClient::start_plot
virtual void start_plot(uint64_t, const std::string &)
Definition: ControllerClient.h:812
mc_control::ControllerClient::string_input
virtual void string_input(const ElementId &id, const std::string &)
Definition: ControllerClient.h:212
mc_control::ControllerClient::rotation
virtual void rotation(const ElementId &id, const ElementId &, bool, const sva::PTransformd &)
Definition: ControllerClient.h:405
client_api.h
mc_control::ElementId::ElementId
ElementId(const std::vector< std::string > &category, const std::string &name)
Definition: ControllerClient.h:35
mc_control::ControllerClient::robot_msg
virtual void robot_msg(const ElementId &id, const mc_rtc::gui::RobotMsgData &)
Definition: ControllerClient.h:464
mc_control::ControllerClient::stopped
virtual void stopped()
Definition: ControllerClient.h:185
mc_rtc::Configuration::add
void add(const std::string &key, bool value)
Add a bool element to the Configuration.
mc_control::ControllerClient
Definition: ControllerClient.h:51
mc_control::ControllerClient::end_form_generic_array_input
virtual void end_form_generic_array_input()
Definition: ControllerClient.h:776
mc_control::ControllerClient::form_checkbox
virtual void form_checkbox(const ElementId &, const std::string &, bool, bool)
Definition: ControllerClient.h:490
mc_control::ControllerClient::plot_polygon
virtual void plot_polygon(uint64_t, uint64_t, const std::string &, const mc_rtc::gui::plot::PolygonDescription &, mc_rtc::gui::plot::Side)
Definition: ControllerClient.h:901
mc_control::ControllerClient::raw_request
void raw_request(const ElementId &id, const T &data, std::string &out)
Definition: ControllerClient.h:117
mc_rtc::gui::StateBuilder
Definition: StateBuilder.h:27
mc_control::ControllerClient::label
virtual void label(const ElementId &id, const std::string &)
Definition: ControllerClient.h:191
mc_control::ControllerClient::number_input
virtual void number_input(const ElementId &id, double)
Definition: ControllerClient.h:218
mc_rtc::gui::Visual
auto Visual(const std::string &name, GetVisual get_visual_fn, GetPos get_pos_fn)
Definition: Visual.h:64
mc_control::ControllerClient::form_rotation_input
virtual void form_rotation_input(const ElementId &, const std::string &, bool, const sva::PTransformd &, bool, bool)
Definition: ControllerClient.h:706
mc_control::ControllerClient::form_string_input
virtual void form_string_input(const ElementId &formId, const std::string &name, bool required, const std::string &default_, bool)
Definition: ControllerClient.h:561
mc_control::ControllerClient::form_number_input
virtual void form_number_input(const ElementId &, const std::string &, bool, double)
Definition: ControllerClient.h:532
mc_control::ControllerClient::table_start
virtual void table_start(const ElementId &id, const std::vector< std::string > &)
Definition: ControllerClient.h:443
mc_control::ControllerClient::sub_th_
std::thread sub_th_
Definition: ControllerClient.h:940
mc_rtc::gui::PointConfig
Definition: types.h:341
mc_rtc::gui::Color
Definition: types.h:19
mc_control::ControllerClient::force
virtual void force(const ElementId &id, const ElementId &, const sva::ForceVecd &, const sva::PTransformd &, const mc_rtc::gui::ForceConfig &, bool)
Definition: ControllerClient.h:377
Configuration.h
mc_control::ControllerClient::timeout_
double timeout_
Definition: ControllerClient.h:942
mc_control::ControllerClient::trajectory
virtual void trajectory(const ElementId &id, const std::vector< sva::PTransformd > &, const mc_rtc::gui::LineConfig &)
Definition: ControllerClient.h:280
mc_control::ControllerClient::form_number_input
virtual void form_number_input(const ElementId &formId, const std::string &name, bool required, double default_, bool)
Definition: ControllerClient.h:540
mc_control::ControllerClient::trajectory
virtual void trajectory(const ElementId &id, const Eigen::Vector3d &, const mc_rtc::gui::LineConfig &)
Definition: ControllerClient.h:291
mc_control::ControllerClient::arrow
virtual void arrow(const ElementId &id, const ElementId &, const Eigen::Vector3d &, const Eigen::Vector3d &, const mc_rtc::gui::ArrowConfig &, bool)
Definition: ControllerClient.h:389
mc_control::ControllerClient::form
virtual void form(const ElementId &id)
Definition: ControllerClient.h:484
mc_control::ControllerClient::transform
virtual void transform(const ElementId &id, const ElementId &, bool, const sva::PTransformd &)
Definition: ControllerClient.h:419
mc_rtc::gui::ForceConfig
Definition: types.h:286
mc_control::ControllerClient::form_string_input
virtual void form_string_input(const ElementId &, const std::string &, bool, const std::string &)
Definition: ControllerClient.h:553
mc_control::ControllerClient::plot_setup_yaxis_right
virtual void plot_setup_yaxis_right(uint64_t, const std::string &, const mc_rtc::gui::plot::Range &)
Definition: ControllerClient.h:853
mc_control
Definition: CompletionCriteria.h:10
mc_control::ControllerClient::plot_setup_xaxis
virtual void plot_setup_xaxis(uint64_t, const std::string &, const mc_rtc::gui::plot::Range &)
Definition: ControllerClient.h:823
mc_rtc::gui::RobotMsgData
Definition: types.h:481
mc_control::ControllerClient::xytheta
virtual void xytheta(const ElementId &id, const ElementId &, bool, const Eigen::Vector3d &, double)
Definition: ControllerClient.h:433
mc_control::ControllerClient::integer_input
virtual void integer_input(const ElementId &id, int)
Definition: ControllerClient.h:215
mc_control::ControllerClient::point3d
virtual void point3d(const ElementId &id, const ElementId &, bool, const Eigen::Vector3d &, const mc_rtc::gui::PointConfig &)
Definition: ControllerClient.h:256
mc_control::ControllerClient::schema
virtual void schema(const ElementId &id, const std::string &)
Definition: ControllerClient.h:481
mc_control::ControllerClient::number_slider
virtual void number_slider(const ElementId &id, double, double, double)
Definition: ControllerClient.h:220
mc_control::ControllerClient::data_
mc_rtc::Configuration data_
Definition: ControllerClient.h:945
mc_control::ControllerClient::checkbox
virtual void checkbox(const ElementId &id, bool)
Definition: ControllerClient.h:209
mc_control::ControllerClient::plot_point
virtual void plot_point(uint64_t, uint64_t, const std::string &, double, double, mc_rtc::gui::Color, mc_rtc::gui::plot::Style, mc_rtc::gui::plot::Side)
Definition: ControllerClient.h:877
mc_control::ControllerClient::plot_polygons
virtual void plot_polygons(uint64_t, uint64_t, const std::string &, const std::vector< mc_rtc::gui::plot::PolygonDescription > &, mc_rtc::gui::plot::Side)
Definition: ControllerClient.h:922
mc_control::ControllerServer
Definition: ControllerServer.h:25
mc_control::ControllerClient::end_form_one_of_input
virtual void end_form_one_of_input()
Definition: ControllerClient.h:800
mc_control::ControllerClient::form_point3d_input
virtual void form_point3d_input(const ElementId &, const std::string &, bool, const Eigen::Vector3d &, bool, bool)
Definition: ControllerClient.h:680
mc_control::ControllerClient::form_integer_input
virtual void form_integer_input(const ElementId &formId, const std::string &name, bool required, int default_, bool)
Definition: ControllerClient.h:519
mc_control::ControllerClient::category
virtual void category(const std::vector< std::string > &parent, const std::string &category)
Definition: ControllerClient.h:188
mc_control::ControllerClient::table_end
virtual void table_end(const ElementId &)
Definition: ControllerClient.h:452