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

Service and message definitions for reading and writing variables #24

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
75777e6
Create service description for reading byte variables.
yeu-geissdoerfer Sep 9, 2024
8c52ec8
Create service description for reading double variables.
yeu-geissdoerfer Sep 9, 2024
f151fcb
Create service description for reading integer variables.
yeu-geissdoerfer Sep 9, 2024
249d092
Create service description for reading position variables.
yeu-geissdoerfer Sep 9, 2024
2556227
Create service description for reading real variables.
yeu-geissdoerfer Sep 9, 2024
88daff8
Create service description for reading string variables.
yeu-geissdoerfer Sep 9, 2024
b03ead7
Create service description for writing byte variables.
yeu-geissdoerfer Sep 9, 2024
3bb54ad
Create service description for writing double variables.
yeu-geissdoerfer Sep 9, 2024
aba2cef
Create service description for writing integer variables.
yeu-geissdoerfer Sep 9, 2024
690fd66
Create service description for writing position variables.
yeu-geissdoerfer Sep 9, 2024
92b6196
Create service description for writing real variables.
yeu-geissdoerfer Sep 9, 2024
8ed4607
Create service description for writing string variables.
yeu-geissdoerfer Sep 9, 2024
c59b3c4
Changed the message name in which the legal values for the result cod…
yeu-geissdoerfer Sep 9, 2024
5cb974e
Created an initial message by copying the IoResultCodes.msg.
yeu-geissdoerfer Sep 9, 2024
a5dc610
Updated the VarResultCodes.msg for the first MR2 read and write varia…
yeu-geissdoerfer Sep 10, 2024
7be02d1
Added msg and srv files to the CMakeLists.txt so that motoros2_interf…
yeu-geissdoerfer Sep 10, 2024
62d3a1b
Updated copyright information in all new srv and msg.
yeu-geissdoerfer Sep 13, 2024
8bca810
Changed the data types to unsigned, as it should be possible to read …
yeu-geissdoerfer Sep 13, 2024
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
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set(msg_files
msg/ErrorInfo.msg
msg/InformJobCrudResultCodes.msg
msg/IoResultCodes.msg
msg/VarResultCodes.msg
msg/MotionReadyEnum.msg
msg/QueueResultEnum.msg
msg/SelectionResultCodes.msg
Expand All @@ -29,13 +30,25 @@ set(srv_files
srv/ReadMRegister.srv
srv/ReadSingleIO.srv
srv/ReadGroupIO.srv
srv/ReadVarByte.srv
srv/ReadVarDouble.srv
srv/ReadVarInteger.srv
srv/ReadVarPosition.srv
srv/ReadVarReal.srv
srv/ReadVarString.srv
srv/ResetError.srv
srv/SelectMotionTool.srv
srv/StartTrajMode.srv
srv/StartPointQueueMode.srv
srv/WriteMRegister.srv
srv/WriteSingleIO.srv
srv/WriteGroupIO.srv
srv/WriteVarByte.srv
srv/WriteVarDouble.srv
srv/WriteVarInteger.srv
srv/WriteVarPosition.srv
srv/WriteVarReal.srv
srv/WriteVarString.srv
)

if(BUILD_TESTING)
Expand Down
30 changes: 30 additions & 0 deletions msg/VarResultCodes.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 OK = 0
string OK_STR = "Success"

# The variable number cannot be read on this controller
uint32 READ_VAR_NUMBER_INVALID = 1001
string READ_VAR_NUMBER_INVALID_STR = "Variable number cannot be read from (out of readable range)"

# The variable number cannot be written to on this controller
uint32 WRITE_VAR_NUMBER_INVALID = 1002
string WRITE_VAR_NUMBER_INVALID_STR = "Variable number cannot be written to (out of writable range)"

# The value supplied is not a valid value for the addressed IO element
uint32 WRITE_VALUE_INVALID = 1003
string WRITE_VALUE_INVALID_STR = "Illegal value for the type of IO element addressed"

# mpGetUserVars returned -1
uint32 READ_API_ERROR = 1004
string READ_API_ERROR_STR = "The MotoPlus function mpGetUserVars returned -1, indicating an accessing error. No further information is available"

# mpPutUserVars returned -1
uint32 WRITE_API_ERROR = 1005
string WRITE_API_ERROR_STR = "The MotoPlus function mpPutUserVars returned -1, indicating an accessing error. No further information is available"

# Unknown fallback failure
string UNKNOWN_API_ERROR_STR = "Unknown error accessing I/O. No further information is available"
12 changes: 12 additions & 0 deletions srv/ReadVarByte.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
uint8 value
12 changes: 12 additions & 0 deletions srv/ReadVarDouble.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
int32 value
12 changes: 12 additions & 0 deletions srv/ReadVarInteger.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
int16 value
15 changes: 15 additions & 0 deletions srv/ReadVarPosition.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success

# always returned in 'base' frame
# NOTE: the ROS-Industrial 'base' frame, not Yaskawa Base frame
geometry_msgs/PoseStamped value
ted-miller marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 12 additions & 0 deletions srv/ReadVarReal.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
float32 value
12 changes: 12 additions & 0 deletions srv/ReadVarString.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
string value
12 changes: 12 additions & 0 deletions srv/WriteVarByte.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
uint8 value
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
12 changes: 12 additions & 0 deletions srv/WriteVarDouble.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
int32 value
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
12 changes: 12 additions & 0 deletions srv/WriteVarInteger.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
int16 value
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
19 changes: 19 additions & 0 deletions srv/WriteVarPosition.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number

# only poses defined in 'base' frame will be accepted
#
# NOTE: the ROS-Industrial 'base' frame, not Yaskawa Base frame
#
# NOTE 2: it's the responsibility of the client to transform poses into this
# frame. The server will reject poses not already in 'base' frame.
geometry_msgs/PoseStamped value
ted-miller marked this conversation as resolved.
Show resolved Hide resolved
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
12 changes: 12 additions & 0 deletions srv/WriteVarReal.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
float32 value
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success
12 changes: 12 additions & 0 deletions srv/WriteVarString.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024, Yaskawa Europe, GmbH
# SPDX-FileCopyrightText: 2024, Delft University of Technology
#
# SPDX-License-Identifier: Apache-2.0

uint32 var_number
string value
---
# legal values defined in VarResultCodes.msg
uint32 result_code
string message
bool success