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
80 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
82 STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::return_type
85 using ControllerAckermannReferenceMsg = ackermann_msgs::msg::AckermannDriveStamped;
86 using ControllerTwistReferenceMsg = geometry_msgs::msg::TwistStamped;
87 using ControllerStateMsgOdom = nav_msgs::msg::Odometry;
88 using ControllerStateMsgTf = tf2_msgs::msg::TFMessage;
89 using AckermanControllerState = control_msgs::msg::SteeringControllerStatus;
92 controller_interface::CallbackReturn set_interface_numbers(
93 size_t nr_state_itfs,
size_t nr_cmd_itfs,
size_t nr_ref_itfs);
95 std::shared_ptr<steering_controllers_library::ParamListener> param_listener_;
96 steering_controllers_library::Params params_;
99 rclcpp::Subscription<ControllerTwistReferenceMsg>::SharedPtr ref_subscriber_twist_ =
nullptr;
100 rclcpp::Subscription<ControllerTwistReferenceMsg>::SharedPtr ref_subscriber_ackermann_ =
nullptr;
101 rclcpp::Subscription<geometry_msgs::msg::Twist>::SharedPtr ref_subscriber_unstamped_ =
nullptr;
103 rclcpp::Duration ref_timeout_ = rclcpp::Duration::from_seconds(0.0);
108 rclcpp::Publisher<ControllerStateMsgOdom>::SharedPtr odom_s_publisher_;
109 rclcpp::Publisher<ControllerStateMsgTf>::SharedPtr tf_odom_s_publisher_;
111 std::unique_ptr<ControllerStatePublisherOdom> rt_odom_state_publisher_;
112 std::unique_ptr<ControllerStatePublisherTf> rt_tf_odom_state_publisher_;
122 AckermanControllerState published_state_;
125 rclcpp::Publisher<AckermanControllerState>::SharedPtr controller_s_publisher_;
126 std::unique_ptr<ControllerStatePublisher> controller_state_publisher_;
129 size_t nr_state_itfs_;
136 double last_linear_velocity_ = 0.0;
137 double last_angular_velocity_ = 0.0;
139 std::vector<std::string> rear_wheels_state_names_;
140 std::vector<std::string> front_wheels_state_names_;
144 STEERING_CONTROLLERS__VISIBILITY_LOCAL
void reference_callback(
145 const std::shared_ptr<ControllerTwistReferenceMsg> msg);
146 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:436
STEERING_CONTROLLERS__VISIBILITY_PUBLIC controller_interface::return_type update_reference_from_subscribers(const rclcpp::Time &time, const rclcpp::Duration &period) override
Update reference from input topics when not in chained mode.
Definition steering_controllers_library.cpp:407