Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class JointStateTopicSystem : public hardware_interface::SystemInterface
public:
CallbackReturn on_init(const hardware_interface::HardwareComponentInterfaceParams& params) override;

CallbackReturn on_configure(const rclcpp_lifecycle::State& previous_state) override;

std::vector<hardware_interface::StateInterface> export_state_interfaces() override;

std::vector<hardware_interface::CommandInterface> export_command_interfaces() override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <vector>

#include <angles/angles.h>
#include <hardware_interface/introspection.hpp>
#include <joint_state_topic_hardware_interface/joint_state_topic_hardware_interface.hpp>
#include <rclcpp/executors.hpp>

Expand Down Expand Up @@ -152,6 +153,15 @@ CallbackReturn JointStateTopicSystem::on_init(const hardware_interface::Hardware
return CallbackReturn::SUCCESS;
}

CallbackReturn JointStateTopicSystem::on_configure(const rclcpp_lifecycle::State& /*previous_state*/)
{
REGISTER_ROS2_CONTROL_INTROSPECTION("nonlimited_left_wheel_velocity", &nonlimited_velocity_commands_[0]);
REGISTER_ROS2_CONTROL_INTROSPECTION("nonlimited_right_wheel_velocity", &nonlimited_velocity_commands_[1]);
REGISTER_ROS2_CONTROL_INTROSPECTION("limited_left_wheel_velocity", &limited_velocity_commands_[0]);
REGISTER_ROS2_CONTROL_INTROSPECTION("limited_right_wheel_velocity", &limited_velocity_commands_[1]);
return CallbackReturn::SUCCESS;
}

std::vector<hardware_interface::StateInterface> JointStateTopicSystem::export_state_interfaces()
{
std::vector<hardware_interface::StateInterface> state_interfaces;
Expand Down