Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update msg, srv and action files #4

Merged
merged 8 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,30 @@ project(ur_interfaces)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(action_msgs REQUIRED)

set(msg_files
"msg/ActiveTCP.msg"
"msg/Analog.msg"
"msg/AnalogStamped.msg"
"msg/AnalogIO.msg"
"msg/AnalogIOStateStamped.msg"
"msg/BoolStamped.msg"
"msg/ControlCycle.msg"
"msg/Current.msg"
"msg/DigitalPort.msg"
"msg/Digital.msg"
"msg/DigitalIO.msg"
"msg/DigitalIOStateStamped.msg"
"msg/DigitalStamped.msg"
"msg/DoubleMultiArrayStamped.msg"
"msg/Float32Stamped.msg"
"msg/Float64Stamped.msg"
Expand All @@ -41,28 +50,17 @@ set(srv_files
"srv/SetAnalogOutput.srv"
"srv/SetDigitalOutput.srv"
"srv/SetSpeedFraction.srv"
"srv/AddToLog.srv"
"srv/GetLoadedProgram.srv"
"srv/GetProgramState.srv"
"srv/GetRobotMode.srv"
"srv/SetPayload.srv"
"srv/GetSafetyMode.srv"
"srv/IsProgramRunning.srv"
"srv/IsProgramSaved.srv"
"srv/Load.srv"
"srv/Popup.srv"
"srv/RawRequest.srv"
)

set(action_files
"action/SetMode.action"
)

rosidl_generate_interfaces(${PROJECT_NAME}
${action_files}
${msg_files}
urfeex marked this conversation as resolved.
Show resolved Hide resolved
${srv_files}
${action_files}
DEPENDENCIES builtin_interfaces std_msgs geometry_msgs sensor_msgs action_msgs
DEPENDENCIES builtin_interfaces std_msgs geometry_msgs sensor_msgs
ADD_LINTER_TESTS
)

Expand Down
2 changes: 1 addition & 1 deletion action/SetMode.action
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# non-critical state (e.g. NORMAL or REDUCED), for example after a safety incident happened.

# goal
int8 target_robot_mode
RobotMode target_robot_mode

# Stop program execution before restoring the target mode. Can be used together with 'play_program'.
bool stop_program
Expand Down
3 changes: 3 additions & 0 deletions msg/ActiveTCP.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

string data
6 changes: 3 additions & 3 deletions msg/Analog.msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
std_msgs/Header header
uint8 CURRENT = 0
uint8 VOLTAGE = 1

uint8 domain # can be VOLTAGE or CURRENT, must match SetAnalogOutput.srv
float32 data
uint8 pin
uint8 domain # can be VOLTAGE or CURRENT
float32 value
3 changes: 3 additions & 0 deletions msg/AnalogIO.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Note: The array indices do not necessarily match the pin number
Analog[] analog_inputs
Analog[] analog_outputs
3 changes: 3 additions & 0 deletions msg/AnalogIOStateStamped.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

AnalogIO io_state
2 changes: 1 addition & 1 deletion msg/DigitalPort.msg → msg/AnalogStamped.msg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
std_msgs/Header header
bool[] data
Analog data
2 changes: 2 additions & 0 deletions msg/Digital.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
uint8 pin
bool state
3 changes: 3 additions & 0 deletions msg/DigitalIO.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Note: The array indices do not necessarily match the pin number
Digital[] digital_inputs
Digital[] digital_outputs
4 changes: 4 additions & 0 deletions msg/DigitalIOStateStamped.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
std_msgs/Header header

DigitalIO configurable_io
DigitalIO standard_io
2 changes: 2 additions & 0 deletions msg/DigitalStamped.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
std_msgs/Header header
Digital data
2 changes: 1 addition & 1 deletion msg/ToolOutputMode.msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
std_msgs/Header header
uint8 TOOL_OUPUT=0
uint8 TOOL_OUTPUT=0
uint8 TOOL_POWER=1
uint8 TOOL_SAFE=2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TOOL_SAFE mode should not be exposed publicly now - it will be released with UR15.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had a talk with embedded, and this mode was there for a while, but just now it starts to be used for safety input on UR15.
It should be removed for now until UR15 is released.


Expand Down
6 changes: 3 additions & 3 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">
<name>ur_interfaces</name>
<version>0.0.2</version>
<description>A package containing ROS2 ur message definitions.</description>
<description>A package containing ROS2 UR message definitions.</description>
<maintainer email="[email protected]">Universal Robots A/S</maintainer>
<license>BSD-3-Clause</license>

Expand All @@ -17,14 +17,14 @@
<build_depend>std_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>action_msgs</build_depend>

<exec_depend>builtin_interfaces</exec_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>action_msgs</exec_depend>

<depend>action_msgs</depend>

<test_depend>ament_lint_common</test_depend>

Expand Down
Loading