File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
joint_trajectory_controller/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -148,16 +148,12 @@ controller_interface::return_type JointTrajectoryController::update(
148148 scaling_factor_ = scaling_state_interface_->get ().get_value ();
149149 }
150150
151- if (get_lifecycle_state (). id () == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE )
151+ if (scaling_command_interface_. has_value () )
152152 {
153- if (scaling_command_interface_. has_value ( ))
153+ if (! scaling_command_interface_-> get (). set_value (scaling_factor_cmd_. load () ))
154154 {
155- if (!scaling_command_interface_->get ().set_value (scaling_factor_cmd_.load ()))
156- {
157- RCLCPP_ERROR (
158- get_node ()->get_logger (),
159- " Could not set speed scaling factor through command interfaces." );
160- }
155+ RCLCPP_ERROR (
156+ get_node ()->get_logger (), " Could not set speed scaling factor through command interfaces." );
161157 }
162158 }
163159
You can’t perform that action at this time.
0 commit comments