File tree 3 files changed +5
-5
lines changed
diff_drive_controller/src
joint_trajectory_controller/src
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ controller_interface::return_type DiffDriveController::update(
101
101
const rclcpp::Time & time, const rclcpp::Duration & period)
102
102
{
103
103
auto logger = get_node ()->get_logger ();
104
- if (get_state ().id () == State::PRIMARY_STATE_INACTIVE)
104
+ if (get_lifecycle_state ().id () == State::PRIMARY_STATE_INACTIVE)
105
105
{
106
106
if (!is_halted)
107
107
{
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ controller_interface::return_type JointTrajectoryController::update(
154
154
scaling_factor_ = scaling_state_interface_->get ().get_value ();
155
155
}
156
156
157
- if (get_state ().id () == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
157
+ if (get_lifecycle_state ().id () == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
158
158
{
159
159
return controller_interface::return_type::OK;
160
160
}
@@ -631,7 +631,7 @@ void JointTrajectoryController::query_state_service(
631
631
{
632
632
const auto logger = get_node ()->get_logger ();
633
633
// Preconditions
634
- if (get_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
634
+ if (get_lifecycle_state ().id () != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
635
635
{
636
636
RCLCPP_ERROR (logger, " Can't sample trajectory. Controller is not active." );
637
637
response->success = false ;
@@ -1205,7 +1205,7 @@ rclcpp_action::GoalResponse JointTrajectoryController::goal_received_callback(
1205
1205
RCLCPP_INFO (get_node ()->get_logger (), " Received new action goal" );
1206
1206
1207
1207
// Precondition: Running controller
1208
- if (get_state ().id () == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
1208
+ if (get_lifecycle_state ().id () == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
1209
1209
{
1210
1210
RCLCPP_ERROR (
1211
1211
get_node ()->get_logger (), " Can't accept new action goals. Controller is not running." );
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ InterfaceConfiguration TricycleController::state_interface_configuration() const
86
86
controller_interface::return_type TricycleController::update (
87
87
const rclcpp::Time & time, const rclcpp::Duration & period)
88
88
{
89
- if (get_state ().id () == State::PRIMARY_STATE_INACTIVE)
89
+ if (get_lifecycle_state ().id () == State::PRIMARY_STATE_INACTIVE)
90
90
{
91
91
if (!is_halted)
92
92
{
You can’t perform that action at this time.
0 commit comments