52 virtual STEERING_CONTROLLERS__VISIBILITY_PUBLIC
void
53 initialize_implementation_parameter_listener() = 0;
55 STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn
on_init()
override;
63 virtual STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn
64 configure_odometry() = 0;
66 virtual STEERING_CONTROLLERS__VISIBILITY_PUBLIC
bool update_odometry(
67 const rclcpp::Duration & period) = 0;
69 STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn on_configure(
70 const rclcpp_lifecycle::State & previous_state)
override;
72 STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn on_activate(
73 const rclcpp_lifecycle::State & previous_state)
override;
75 STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::CallbackReturn on_deactivate(
76 const rclcpp_lifecycle::State & previous_state)
override;
78 STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::return_type
81 STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::return_type
84 using ControllerAckermannReferenceMsg = ackermann_msgs::msg::AckermannDriveStamped;
85 using ControllerTwistReferenceMsg = geometry_msgs::msg::TwistStamped;
86 using ControllerStateMsgOdom = nav_msgs::msg::Odometry;
87 using ControllerStateMsgTf = tf2_msgs::msg::TFMessage;
88 using AckermannControllerState = control_msgs::msg::SteeringControllerStatus;
91 controller_interface::CallbackReturn set_interface_numbers(
92 size_t nr_state_itfs,
size_t nr_cmd_itfs,
size_t nr_ref_itfs);
94 std::shared_ptr<steering_controllers_library::ParamListener> param_listener_;
95 steering_controllers_library::Params params_;
98 rclcpp::Subscription<ControllerTwistReferenceMsg>::SharedPtr ref_subscriber_twist_ =
nullptr;
99 rclcpp::Subscription<ControllerTwistReferenceMsg>::SharedPtr ref_subscriber_ackermann_ =
nullptr;
100 rclcpp::Subscription<geometry_msgs::msg::Twist>::SharedPtr ref_subscriber_unstamped_ =
nullptr;
102 rclcpp::Duration ref_timeout_ = rclcpp::Duration::from_seconds(0.0);
107 rclcpp::Publisher<ControllerStateMsgOdom>::SharedPtr odom_s_publisher_;
108 rclcpp::Publisher<ControllerStateMsgTf>::SharedPtr tf_odom_s_publisher_;
110 std::unique_ptr<ControllerStatePublisherOdom> rt_odom_state_publisher_;
111 std::unique_ptr<ControllerStatePublisherTf> rt_tf_odom_state_publisher_;
121 AckermannControllerState published_state_;
124 rclcpp::Publisher<AckermannControllerState>::SharedPtr controller_s_publisher_;
125 std::unique_ptr<ControllerStatePublisher> controller_state_publisher_;
128 size_t nr_state_itfs_;
135 double last_linear_velocity_ = 0.0;
136 double last_angular_velocity_ = 0.0;
138 std::vector<std::string> rear_wheels_state_names_;
139 std::vector<std::string> front_wheels_state_names_;
143 STEERING_CONTROLLERS__VISIBILITY_LOCAL
void reference_callback(
144 const std::shared_ptr<ControllerTwistReferenceMsg> msg);
145 void reference_callback_unstamped(
const std::shared_ptr<geometry_msgs::msg::Twist> msg);
STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::return_type update_and_write_commands(const rclcpp::Time &time, const rclcpp::Duration &period) override
Execute calculations of the controller and update command interfaces.
Definition steering_controllers_library.cpp:413