diff --git a/ur_robot_driver/CMakeLists.txt b/ur_robot_driver/CMakeLists.txt index 1393b3b03..1a76a5cab 100644 --- a/ur_robot_driver/CMakeLists.txt +++ b/ur_robot_driver/CMakeLists.txt @@ -9,9 +9,12 @@ option( OFF ) -add_compile_options(-Wall) -add_compile_options(-Wextra) -add_compile_options(-Wno-unused-parameter) +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall) + add_compile_options(-Wextra) + add_compile_options(-Wno-unused-parameter) +endif() +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) message("${PROJECT_NAME}: You did not request a specific build type: selecting 'RelWithDebInfo'.") diff --git a/ur_robot_driver/include/ur_robot_driver/hardware_interface.hpp b/ur_robot_driver/include/ur_robot_driver/hardware_interface.hpp index e9ea08129..e6cc00c86 100644 --- a/ur_robot_driver/include/ur_robot_driver/hardware_interface.hpp +++ b/ur_robot_driver/include/ur_robot_driver/hardware_interface.hpp @@ -301,7 +301,7 @@ class URPositionHardwareInterface : public hardware_interface::SystemInterface double pausing_ramp_up_increment_; // resources switching aux vars - std::vector> stop_modes_; + std::vector> stop_modes_; std::vector> start_modes_; bool position_controller_running_; bool velocity_controller_running_; diff --git a/ur_robot_driver/src/hardware_interface.cpp b/ur_robot_driver/src/hardware_interface.cpp index 5e2e5730d..5ed01ac7e 100644 --- a/ur_robot_driver/src/hardware_interface.cpp +++ b/ur_robot_driver/src/hardware_interface.cpp @@ -220,7 +220,7 @@ std::vector URPositionHardwareInterface::exp const std::vector fts_names = { "force.x", "force.y", "force.z", "torque.x", "torque.y", "torque.z" }; - for (uint j = 0; j < 6; ++j) { + for (uint32_t j = 0; j < 6; ++j) { state_interfaces.emplace_back( hardware_interface::StateInterface(sensor.name, fts_names[j], &urcl_ft_sensor_measurements_[j])); } @@ -1112,7 +1112,7 @@ hardware_interface::return_type URPositionHardwareInterface::prepare_command_mod hardware_interface::return_type ret_val = hardware_interface::return_type::OK; start_modes_ = std::vector>(info_.joints.size()); - stop_modes_ = std::vector>(info_.joints.size()); + stop_modes_ = std::vector>(info_.joints.size()); std::vector> control_modes(info_.joints.size()); const std::string tf_prefix = info_.hardware_parameters.at("tf_prefix"); diff --git a/ur_robot_driver/src/robot_state_helper.cpp b/ur_robot_driver/src/robot_state_helper.cpp index c422ae951..0a57ae75d 100755 --- a/ur_robot_driver/src/robot_state_helper.cpp +++ b/ur_robot_driver/src/robot_state_helper.cpp @@ -366,7 +366,7 @@ void RobotStateHelper::setModeExecute(const std::shared_ptrmessage = "Play program service not available on this robot."; } else { // The dashboard denies playing immediately after switching the mode to RUNNING - sleep(1); + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); result_->success = safeDashboardTrigger(this->play_program_srv_); } }