Skip to content

Commit aa29e79

Browse files
committed
Configure correctly for runtime
Signed-off-by: AdamPettinger <adam.l.pettinger@gmail.com>
1 parent 9dc38fc commit aa29e79

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

ur_controllers/controller_plugins.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,9 @@
3939
Controller to use the tool contact functionality of the robot.
4040
</description>
4141
</class>
42+
<class name="ur_controllers/GravityUpdateController" type="ur_controllers::GravityUpdateController" base_class_type="controller_interface::ControllerInterface">
43+
<description>
44+
Controller to set the gravity direction of the robot.
45+
</description>
46+
</class>
4247
</library>

ur_controllers/src/gpio_controller.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,6 @@ controller_interface::InterfaceConfiguration GPIOController::command_interface_c
9999

100100
config.names.emplace_back(tf_prefix + "gpio/analog_output_domain_cmd");
101101

102-
// Gravity stuff
103-
config.names.emplace_back(tf_prefix + "gravity/x");
104-
config.names.emplace_back(tf_prefix + "gravity/y");
105-
config.names.emplace_back(tf_prefix + "gravity/z");
106-
config.names.emplace_back(tf_prefix + "gravity/gravity_async_success");
107-
108102
return config;
109103
}
110104

ur_controllers/src/gravity_update_controller.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ ur_controllers::GravityUpdateController::on_configure(const rclcpp_lifecycle::St
287287
controller_interface::CallbackReturn
288288
ur_controllers::GravityUpdateController::on_activate(const rclcpp_lifecycle::State& /*previous_state*/)
289289
{
290-
while (state_interfaces_[StateInterfaces::INITIALIZED_FLAG].get_optional().value_or(0.0) == 0.0) {
291-
RCLCPP_INFO(get_node()->get_logger(), "Waiting for system interface to initialize...");
292-
std::this_thread::sleep_for(std::chrono::milliseconds(50));
293-
}
290+
// while (state_interfaces_[StateInterfaces::INITIALIZED_FLAG].get_optional().value_or(0.0) == 0.0) {
291+
// RCLCPP_INFO(get_node()->get_logger(), "Waiting for system interface to initialize...");
292+
// std::this_thread::sleep_for(std::chrono::milliseconds(50));
293+
// }
294294

295295
try {
296296
auto qos_latched = rclcpp::SystemDefaultsQoS();

0 commit comments

Comments
 (0)