@@ -140,7 +140,7 @@ controller_interface::return_type MotionPrimitivesForwardController::update(
140
140
cancel_requested_ = false ;
141
141
reset_command_interfaces ();
142
142
// send stop command immediately to the hw-interface
143
- (void )command_interfaces_[0 ].set_value (static_cast <double >(MotionType ::STOP_MOTION));
143
+ (void )command_interfaces_[0 ].set_value (static_cast <double >(MotionHelperType ::STOP_MOTION));
144
144
// clear the queue (ignore return value)
145
145
static_cast <void >(moprim_queue_.get_latest (current_moprim_));
146
146
robot_stop_requested_ = true ;
@@ -202,7 +202,7 @@ controller_interface::return_type MotionPrimitivesForwardController::update(
202
202
// If the robot was stopped by a stop command, reset the command interfaces
203
203
// to allow new motion primitives to be sent.
204
204
reset_command_interfaces ();
205
- (void )command_interfaces_[0 ].set_value (static_cast <double >(MotionType ::RESET_STOP));
205
+ (void )command_interfaces_[0 ].set_value (static_cast <double >(MotionHelperType ::RESET_STOP));
206
206
robot_stop_requested_ = false ;
207
207
RCLCPP_INFO (get_node ()->get_logger (), " Robot stopped, ready for new motion primitives." );
208
208
}
@@ -316,9 +316,7 @@ bool MotionPrimitivesForwardController::set_command_interfaces()
316
316
(void )command_interfaces_[13 ].set_value (goal_pose.orientation .w ); // pos_qw
317
317
318
318
// Process via poses if available (only for circular motion)
319
- if (
320
- current_moprim_.type == static_cast <uint8_t >(MotionType::CIRCULAR_CARTESIAN) &&
321
- current_moprim_.poses .size () == 2 )
319
+ if (current_moprim_.type == MotionType::CIRCULAR_CARTESIAN && current_moprim_.poses .size () == 2 )
322
320
{
323
321
const auto & via_pose = current_moprim_.poses [1 ].pose ; // via pose
324
322
(void )command_interfaces_[14 ].set_value (via_pose.position .x ); // pos_via_x
@@ -400,7 +398,7 @@ rclcpp_action::GoalResponse MotionPrimitivesForwardController::goal_received_cal
400
398
{
401
399
const auto & primitive = primitives[i];
402
400
403
- switch (static_cast <MotionType >(primitive.type ))
401
+ switch (static_cast <uint8_t >(primitive.type ))
404
402
{
405
403
case MotionType::LINEAR_JOINT:
406
404
RCLCPP_INFO (get_node ()->get_logger (), " Primitive %zu: LINEAR_JOINT (PTP)" , i);
@@ -473,7 +471,7 @@ void MotionPrimitivesForwardController::goal_accepted_callback(
473
471
if (primitives.size () > 1 )
474
472
{
475
473
MotionPrimitive start_marker;
476
- start_marker.type = static_cast <uint8_t >(MotionType ::MOTION_SEQUENCE_START);
474
+ start_marker.type = static_cast <uint8_t >(MotionHelperType ::MOTION_SEQUENCE_START);
477
475
if (!moprim_queue_.push (start_marker))
478
476
{
479
477
RCLCPP_WARN (
@@ -483,7 +481,7 @@ void MotionPrimitivesForwardController::goal_accepted_callback(
483
481
add_motions (primitives);
484
482
485
483
MotionPrimitive end_marker;
486
- end_marker.type = static_cast <uint8_t >(MotionType ::MOTION_SEQUENCE_END);
484
+ end_marker.type = static_cast <uint8_t >(MotionHelperType ::MOTION_SEQUENCE_END);
487
485
if (!moprim_queue_.push (end_marker))
488
486
{
489
487
RCLCPP_WARN (get_node ()->get_logger (), " Failed to push motion sequence end marker to queue." );
0 commit comments