Skip to content

Commit cafd37d

Browse files
committed
Exchanged hardcoded value for RobotState msgs enum
1 parent bea9759 commit cafd37d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ur_robot_driver/include/ur_robot_driver/hardware_interface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
// UR stuff
4444
#include <ur_client_library/ur/ur_driver.h>
4545
#include <ur_robot_driver/dashboard_client_ros.h>
46+
#include <ur_dashboard_msgs/msg/robot_mode.hpp>
4647

4748
// ROS
4849
#include "rclcpp/macros.hpp"

ur_robot_driver/src/hardware_interface.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,7 @@ void URPositionHardwareInterface::extractRobotStatus()
520520
{
521521
robot_status_resource_.motion_possible = TriState::FALSE;
522522
}
523-
// TODO The hardcoded 7 should be ur_dashboard_msgs::RobotMode::RUNNING exchange when msgs are built
524-
else if (robot_mode_ == 7)
523+
else if (robot_mode_ == ur_dashboard_msgs::msg::RobotMode::RUNNING)
525524
{
526525
robot_status_resource_.motion_possible = TriState::TRUE;
527526
}

0 commit comments

Comments
 (0)