34 #include <armarx/view_selection/gaze_targets/aron/GazeTarget.aron.generated.h>
52 template <armarx::view_selection::common::ControllerType ControllerT>
60 srv(srv), params(params)
85 builder.withNodeSet(
"Head");
87 const std::string controllerTypeID =
94 "armarx_view_selection",
95 "controller_config/" + controllerTypeID +
"/" + params.
robotName +
".json");
97 if (std::filesystem::exists(robotSpecificConfigPath.
toSystemPath()))
99 ARMARX_INFO <<
"Using robot specific config: " << robotSpecificConfigPath;
100 builder.withConfig(robotSpecificConfigPath.toSystemPath());
105 "armarx_view_selection",
106 "controller_config/" + controllerTypeID +
"/default.json");
108 ARMARX_INFO <<
"Using default config: " << defaultConfigPath;
110 ARMARX_CHECK(std::filesystem::exists(defaultConfigPath.toSystemPath()))
111 << defaultConfigPath;
114 builder.withConfig(defaultConfigPath.toSystemPath());
120 auto ctrlWrapper = builder.create();
125 ctrl = std::move(ctrlWrapper);
136 ARMARX_VERBOSE <<
"Sending new target to the controller " << gazeTarget;
137 armarx::view_selection::gaze_targets::arondto::GazeTarget dto;
140 if (not ctrl->ctrl()->isControllerActive())
142 ARMARX_INFO <<
"Activating controller because it is not active yet.";
143 ctrl->ctrl()->activateController();
147 ctrl->config.target = dto;
148 ctrl->updateConfig();
154 std::unique_ptr<armarx::control::client::ControllerWrapper<ControllerT>> ctrl;