Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate pal_statistics for introspecting the ros2_control_demos #654

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions example_12/controllers/src/passthrough_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ controller_interface::CallbackReturn PassthroughController::on_configure(
reference_interfaces_.resize(
reference_interface_names_.size(), std::numeric_limits<double>::quiet_NaN());

for (size_t i = 0; i < reference_interface_names_.size(); i++)
{
REGISTER_ROS2_CONTROL_INTROSPECTION(reference_interface_names_[i], &reference_interfaces_[i]);
}

return controller_interface::CallbackReturn::SUCCESS;
}

Expand Down
4 changes: 4 additions & 0 deletions example_12/hardware/rrbot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ hardware_interface::CallbackReturn RRBotSystemPositionOnlyHardware::on_init(
}
}

REGISTER_ROS2_CONTROL_INTROSPECTION("hw_start_sec", &hw_start_sec_);
REGISTER_ROS2_CONTROL_INTROSPECTION("hw_stop_sec", &hw_stop_sec_);
REGISTER_ROS2_CONTROL_INTROSPECTION("hw_slowdown", &hw_slowdown_);

return hardware_interface::CallbackReturn::SUCCESS;
}

Expand Down
5 changes: 5 additions & 0 deletions example_4/hardware/rrbot_system_with_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ hardware_interface::CallbackReturn RRBotSystemWithSensorHardware::on_init(
}
}

REGISTER_ROS2_CONTROL_INTROSPECTION("hw_start_sec", &hw_start_sec_);
REGISTER_ROS2_CONTROL_INTROSPECTION("hw_stop_sec", &hw_stop_sec_);
REGISTER_ROS2_CONTROL_INTROSPECTION("hw_slowdown", &hw_slowdown_);
REGISTER_ROS2_CONTROL_INTROSPECTION("hw_sensor_change", &hw_sensor_change_);

return hardware_interface::CallbackReturn::SUCCESS;
}

Expand Down
Loading