File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ class URPositionHardwareInterface : public hardware_interface::SystemInterface
300300 // Status for communication with controller
301301 bool motion_primitives_forward_controller_running_;
302302 using MoprimExecutionState = motion_primitives_forward_controller::ExecutionState;
303- MoprimExecutionState current_moprim_execution_status_;
303+ std::atomic< MoprimExecutionState> current_moprim_execution_status_;
304304 std::atomic_bool ready_for_new_moprim_;
305305
306306 // Command and state interfaces for the motion primitives
Original file line number Diff line number Diff line change @@ -909,7 +909,7 @@ hardware_interface::return_type URPositionHardwareInterface::read(const rclcpp::
909909 updateNonDoubleValues ();
910910
911911 // Motion primitives stuff
912- hw_moprim_states_[0 ] = static_cast <uint8_t >(current_moprim_execution_status_);
912+ hw_moprim_states_[0 ] = static_cast <uint8_t >(current_moprim_execution_status_. load () );
913913 hw_moprim_states_[1 ] = static_cast <double >(ready_for_new_moprim_);
914914
915915 return hardware_interface::return_type::OK;
You can’t perform that action at this time.
0 commit comments