aggiornati pacchetti universal_robot e universal_robots_ros_driver
This commit is contained in:
@@ -7,14 +7,22 @@ import struct
|
||||
|
||||
|
||||
class Analog(genpy.Message):
|
||||
_md5sum = "341541c8828d055b6dcc443d40207a7d"
|
||||
_md5sum = "f41c08a810adf63713aec88712cd553d"
|
||||
_type = "ur_msgs/Analog"
|
||||
_has_header = False #flag to mark the presence of a Header object
|
||||
_full_text = """uint8 pin
|
||||
_full_text = """uint8 VOLTAGE=0
|
||||
uint8 CURRENT=1
|
||||
|
||||
uint8 pin
|
||||
uint8 domain # can be VOLTAGE or CURRENT
|
||||
float32 state
|
||||
"""
|
||||
__slots__ = ['pin','state']
|
||||
_slot_types = ['uint8','float32']
|
||||
# Pseudo-constants
|
||||
VOLTAGE = 0
|
||||
CURRENT = 1
|
||||
|
||||
__slots__ = ['pin','domain','state']
|
||||
_slot_types = ['uint8','uint8','float32']
|
||||
|
||||
def __init__(self, *args, **kwds):
|
||||
"""
|
||||
@@ -24,7 +32,7 @@ float32 state
|
||||
changes. You cannot mix in-order arguments and keyword arguments.
|
||||
|
||||
The available fields are:
|
||||
pin,state
|
||||
pin,domain,state
|
||||
|
||||
:param args: complete set of field values, in .msg order
|
||||
:param kwds: use keyword arguments corresponding to message field names
|
||||
@@ -35,10 +43,13 @@ float32 state
|
||||
#message fields cannot be None, assign default values for those that are
|
||||
if self.pin is None:
|
||||
self.pin = 0
|
||||
if self.domain is None:
|
||||
self.domain = 0
|
||||
if self.state is None:
|
||||
self.state = 0.
|
||||
else:
|
||||
self.pin = 0
|
||||
self.domain = 0
|
||||
self.state = 0.
|
||||
|
||||
def _get_types(self):
|
||||
@@ -54,7 +65,7 @@ float32 state
|
||||
"""
|
||||
try:
|
||||
_x = self
|
||||
buff.write(_get_struct_Bf().pack(_x.pin, _x.state))
|
||||
buff.write(_get_struct_2Bf().pack(_x.pin, _x.domain, _x.state))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
@@ -67,8 +78,8 @@ float32 state
|
||||
end = 0
|
||||
_x = self
|
||||
start = end
|
||||
end += 5
|
||||
(_x.pin, _x.state,) = _get_struct_Bf().unpack(str[start:end])
|
||||
end += 6
|
||||
(_x.pin, _x.domain, _x.state,) = _get_struct_2Bf().unpack(str[start:end])
|
||||
return self
|
||||
except struct.error as e:
|
||||
raise genpy.DeserializationError(e) #most likely buffer underfill
|
||||
@@ -82,7 +93,7 @@ float32 state
|
||||
"""
|
||||
try:
|
||||
_x = self
|
||||
buff.write(_get_struct_Bf().pack(_x.pin, _x.state))
|
||||
buff.write(_get_struct_2Bf().pack(_x.pin, _x.domain, _x.state))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
@@ -96,8 +107,8 @@ float32 state
|
||||
end = 0
|
||||
_x = self
|
||||
start = end
|
||||
end += 5
|
||||
(_x.pin, _x.state,) = _get_struct_Bf().unpack(str[start:end])
|
||||
end += 6
|
||||
(_x.pin, _x.domain, _x.state,) = _get_struct_2Bf().unpack(str[start:end])
|
||||
return self
|
||||
except struct.error as e:
|
||||
raise genpy.DeserializationError(e) #most likely buffer underfill
|
||||
@@ -106,9 +117,9 @@ _struct_I = genpy.struct_I
|
||||
def _get_struct_I():
|
||||
global _struct_I
|
||||
return _struct_I
|
||||
_struct_Bf = None
|
||||
def _get_struct_Bf():
|
||||
global _struct_Bf
|
||||
if _struct_Bf is None:
|
||||
_struct_Bf = struct.Struct("<Bf")
|
||||
return _struct_Bf
|
||||
_struct_2Bf = None
|
||||
def _get_struct_2Bf():
|
||||
global _struct_2Bf
|
||||
if _struct_2Bf is None:
|
||||
_struct_2Bf = struct.Struct("<2Bf")
|
||||
return _struct_2Bf
|
||||
|
||||
@@ -8,7 +8,7 @@ import struct
|
||||
import ur_msgs.msg
|
||||
|
||||
class IOStates(genpy.Message):
|
||||
_md5sum = "0a5c7b73e3189e9a2caf8583d1bae2e2"
|
||||
_md5sum = "3033784e7041da89491b97cc4c1105b5"
|
||||
_type = "ur_msgs/IOStates"
|
||||
_has_header = False #flag to mark the presence of a Header object
|
||||
_full_text = """Digital[] digital_in_states
|
||||
@@ -24,7 +24,11 @@ bool state
|
||||
|
||||
================================================================================
|
||||
MSG: ur_msgs/Analog
|
||||
uint8 VOLTAGE=0
|
||||
uint8 CURRENT=1
|
||||
|
||||
uint8 pin
|
||||
uint8 domain # can be VOLTAGE or CURRENT
|
||||
float32 state
|
||||
"""
|
||||
__slots__ = ['digital_in_states','digital_out_states','flag_states','analog_in_states','analog_out_states']
|
||||
@@ -95,12 +99,12 @@ float32 state
|
||||
buff.write(_struct_I.pack(length))
|
||||
for val1 in self.analog_in_states:
|
||||
_x = val1
|
||||
buff.write(_get_struct_Bf().pack(_x.pin, _x.state))
|
||||
buff.write(_get_struct_2Bf().pack(_x.pin, _x.domain, _x.state))
|
||||
length = len(self.analog_out_states)
|
||||
buff.write(_struct_I.pack(length))
|
||||
for val1 in self.analog_out_states:
|
||||
_x = val1
|
||||
buff.write(_get_struct_Bf().pack(_x.pin, _x.state))
|
||||
buff.write(_get_struct_2Bf().pack(_x.pin, _x.domain, _x.state))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
@@ -165,8 +169,8 @@ float32 state
|
||||
val1 = ur_msgs.msg.Analog()
|
||||
_x = val1
|
||||
start = end
|
||||
end += 5
|
||||
(_x.pin, _x.state,) = _get_struct_Bf().unpack(str[start:end])
|
||||
end += 6
|
||||
(_x.pin, _x.domain, _x.state,) = _get_struct_2Bf().unpack(str[start:end])
|
||||
self.analog_in_states.append(val1)
|
||||
start = end
|
||||
end += 4
|
||||
@@ -176,8 +180,8 @@ float32 state
|
||||
val1 = ur_msgs.msg.Analog()
|
||||
_x = val1
|
||||
start = end
|
||||
end += 5
|
||||
(_x.pin, _x.state,) = _get_struct_Bf().unpack(str[start:end])
|
||||
end += 6
|
||||
(_x.pin, _x.domain, _x.state,) = _get_struct_2Bf().unpack(str[start:end])
|
||||
self.analog_out_states.append(val1)
|
||||
return self
|
||||
except struct.error as e:
|
||||
@@ -210,12 +214,12 @@ float32 state
|
||||
buff.write(_struct_I.pack(length))
|
||||
for val1 in self.analog_in_states:
|
||||
_x = val1
|
||||
buff.write(_get_struct_Bf().pack(_x.pin, _x.state))
|
||||
buff.write(_get_struct_2Bf().pack(_x.pin, _x.domain, _x.state))
|
||||
length = len(self.analog_out_states)
|
||||
buff.write(_struct_I.pack(length))
|
||||
for val1 in self.analog_out_states:
|
||||
_x = val1
|
||||
buff.write(_get_struct_Bf().pack(_x.pin, _x.state))
|
||||
buff.write(_get_struct_2Bf().pack(_x.pin, _x.domain, _x.state))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
@@ -281,8 +285,8 @@ float32 state
|
||||
val1 = ur_msgs.msg.Analog()
|
||||
_x = val1
|
||||
start = end
|
||||
end += 5
|
||||
(_x.pin, _x.state,) = _get_struct_Bf().unpack(str[start:end])
|
||||
end += 6
|
||||
(_x.pin, _x.domain, _x.state,) = _get_struct_2Bf().unpack(str[start:end])
|
||||
self.analog_in_states.append(val1)
|
||||
start = end
|
||||
end += 4
|
||||
@@ -292,8 +296,8 @@ float32 state
|
||||
val1 = ur_msgs.msg.Analog()
|
||||
_x = val1
|
||||
start = end
|
||||
end += 5
|
||||
(_x.pin, _x.state,) = _get_struct_Bf().unpack(str[start:end])
|
||||
end += 6
|
||||
(_x.pin, _x.domain, _x.state,) = _get_struct_2Bf().unpack(str[start:end])
|
||||
self.analog_out_states.append(val1)
|
||||
return self
|
||||
except struct.error as e:
|
||||
@@ -303,12 +307,12 @@ _struct_I = genpy.struct_I
|
||||
def _get_struct_I():
|
||||
global _struct_I
|
||||
return _struct_I
|
||||
_struct_Bf = None
|
||||
def _get_struct_Bf():
|
||||
global _struct_Bf
|
||||
if _struct_Bf is None:
|
||||
_struct_Bf = struct.Struct("<Bf")
|
||||
return _struct_Bf
|
||||
_struct_2Bf = None
|
||||
def _get_struct_2Bf():
|
||||
global _struct_2Bf
|
||||
if _struct_2Bf is None:
|
||||
_struct_2Bf = struct.Struct("<2Bf")
|
||||
return _struct_2Bf
|
||||
_struct_2B = None
|
||||
def _get_struct_2B():
|
||||
global _struct_2B
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
# This Python file uses the following encoding: utf-8
|
||||
"""autogenerated by genpy from ur_msgs/SetSpeedSliderFractionRequest.msg. Do not edit."""
|
||||
import sys
|
||||
python3 = True if sys.hexversion > 0x03000000 else False
|
||||
import genpy
|
||||
import struct
|
||||
|
||||
|
||||
class SetSpeedSliderFractionRequest(genpy.Message):
|
||||
_md5sum = "64134244ab4dfc72a3406fe06d580274"
|
||||
_type = "ur_msgs/SetSpeedSliderFractionRequest"
|
||||
_has_header = False #flag to mark the presence of a Header object
|
||||
_full_text = """
|
||||
|
||||
|
||||
|
||||
|
||||
float64 speed_slider_fraction
|
||||
"""
|
||||
__slots__ = ['speed_slider_fraction']
|
||||
_slot_types = ['float64']
|
||||
|
||||
def __init__(self, *args, **kwds):
|
||||
"""
|
||||
Constructor. Any message fields that are implicitly/explicitly
|
||||
set to None will be assigned a default value. The recommend
|
||||
use is keyword arguments as this is more robust to future message
|
||||
changes. You cannot mix in-order arguments and keyword arguments.
|
||||
|
||||
The available fields are:
|
||||
speed_slider_fraction
|
||||
|
||||
:param args: complete set of field values, in .msg order
|
||||
:param kwds: use keyword arguments corresponding to message field names
|
||||
to set specific fields.
|
||||
"""
|
||||
if args or kwds:
|
||||
super(SetSpeedSliderFractionRequest, self).__init__(*args, **kwds)
|
||||
#message fields cannot be None, assign default values for those that are
|
||||
if self.speed_slider_fraction is None:
|
||||
self.speed_slider_fraction = 0.
|
||||
else:
|
||||
self.speed_slider_fraction = 0.
|
||||
|
||||
def _get_types(self):
|
||||
"""
|
||||
internal API method
|
||||
"""
|
||||
return self._slot_types
|
||||
|
||||
def serialize(self, buff):
|
||||
"""
|
||||
serialize message into buffer
|
||||
:param buff: buffer, ``StringIO``
|
||||
"""
|
||||
try:
|
||||
buff.write(_get_struct_d().pack(self.speed_slider_fraction))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
def deserialize(self, str):
|
||||
"""
|
||||
unpack serialized message in str into this message instance
|
||||
:param str: byte array of serialized message, ``str``
|
||||
"""
|
||||
try:
|
||||
end = 0
|
||||
start = end
|
||||
end += 8
|
||||
(self.speed_slider_fraction,) = _get_struct_d().unpack(str[start:end])
|
||||
return self
|
||||
except struct.error as e:
|
||||
raise genpy.DeserializationError(e) #most likely buffer underfill
|
||||
|
||||
|
||||
def serialize_numpy(self, buff, numpy):
|
||||
"""
|
||||
serialize message with numpy array types into buffer
|
||||
:param buff: buffer, ``StringIO``
|
||||
:param numpy: numpy python module
|
||||
"""
|
||||
try:
|
||||
buff.write(_get_struct_d().pack(self.speed_slider_fraction))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
def deserialize_numpy(self, str, numpy):
|
||||
"""
|
||||
unpack serialized message in str into this message instance using numpy for array types
|
||||
:param str: byte array of serialized message, ``str``
|
||||
:param numpy: numpy python module
|
||||
"""
|
||||
try:
|
||||
end = 0
|
||||
start = end
|
||||
end += 8
|
||||
(self.speed_slider_fraction,) = _get_struct_d().unpack(str[start:end])
|
||||
return self
|
||||
except struct.error as e:
|
||||
raise genpy.DeserializationError(e) #most likely buffer underfill
|
||||
|
||||
_struct_I = genpy.struct_I
|
||||
def _get_struct_I():
|
||||
global _struct_I
|
||||
return _struct_I
|
||||
_struct_d = None
|
||||
def _get_struct_d():
|
||||
global _struct_d
|
||||
if _struct_d is None:
|
||||
_struct_d = struct.Struct("<d")
|
||||
return _struct_d
|
||||
# This Python file uses the following encoding: utf-8
|
||||
"""autogenerated by genpy from ur_msgs/SetSpeedSliderFractionResponse.msg. Do not edit."""
|
||||
import sys
|
||||
python3 = True if sys.hexversion > 0x03000000 else False
|
||||
import genpy
|
||||
import struct
|
||||
|
||||
|
||||
class SetSpeedSliderFractionResponse(genpy.Message):
|
||||
_md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
|
||||
_type = "ur_msgs/SetSpeedSliderFractionResponse"
|
||||
_has_header = False #flag to mark the presence of a Header object
|
||||
_full_text = """bool success
|
||||
|
||||
"""
|
||||
__slots__ = ['success']
|
||||
_slot_types = ['bool']
|
||||
|
||||
def __init__(self, *args, **kwds):
|
||||
"""
|
||||
Constructor. Any message fields that are implicitly/explicitly
|
||||
set to None will be assigned a default value. The recommend
|
||||
use is keyword arguments as this is more robust to future message
|
||||
changes. You cannot mix in-order arguments and keyword arguments.
|
||||
|
||||
The available fields are:
|
||||
success
|
||||
|
||||
:param args: complete set of field values, in .msg order
|
||||
:param kwds: use keyword arguments corresponding to message field names
|
||||
to set specific fields.
|
||||
"""
|
||||
if args or kwds:
|
||||
super(SetSpeedSliderFractionResponse, self).__init__(*args, **kwds)
|
||||
#message fields cannot be None, assign default values for those that are
|
||||
if self.success is None:
|
||||
self.success = False
|
||||
else:
|
||||
self.success = False
|
||||
|
||||
def _get_types(self):
|
||||
"""
|
||||
internal API method
|
||||
"""
|
||||
return self._slot_types
|
||||
|
||||
def serialize(self, buff):
|
||||
"""
|
||||
serialize message into buffer
|
||||
:param buff: buffer, ``StringIO``
|
||||
"""
|
||||
try:
|
||||
buff.write(_get_struct_B().pack(self.success))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
def deserialize(self, str):
|
||||
"""
|
||||
unpack serialized message in str into this message instance
|
||||
:param str: byte array of serialized message, ``str``
|
||||
"""
|
||||
try:
|
||||
end = 0
|
||||
start = end
|
||||
end += 1
|
||||
(self.success,) = _get_struct_B().unpack(str[start:end])
|
||||
self.success = bool(self.success)
|
||||
return self
|
||||
except struct.error as e:
|
||||
raise genpy.DeserializationError(e) #most likely buffer underfill
|
||||
|
||||
|
||||
def serialize_numpy(self, buff, numpy):
|
||||
"""
|
||||
serialize message with numpy array types into buffer
|
||||
:param buff: buffer, ``StringIO``
|
||||
:param numpy: numpy python module
|
||||
"""
|
||||
try:
|
||||
buff.write(_get_struct_B().pack(self.success))
|
||||
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
||||
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
||||
|
||||
def deserialize_numpy(self, str, numpy):
|
||||
"""
|
||||
unpack serialized message in str into this message instance using numpy for array types
|
||||
:param str: byte array of serialized message, ``str``
|
||||
:param numpy: numpy python module
|
||||
"""
|
||||
try:
|
||||
end = 0
|
||||
start = end
|
||||
end += 1
|
||||
(self.success,) = _get_struct_B().unpack(str[start:end])
|
||||
self.success = bool(self.success)
|
||||
return self
|
||||
except struct.error as e:
|
||||
raise genpy.DeserializationError(e) #most likely buffer underfill
|
||||
|
||||
_struct_I = genpy.struct_I
|
||||
def _get_struct_I():
|
||||
global _struct_I
|
||||
return _struct_I
|
||||
_struct_B = None
|
||||
def _get_struct_B():
|
||||
global _struct_B
|
||||
if _struct_B is None:
|
||||
_struct_B = struct.Struct("<B")
|
||||
return _struct_B
|
||||
class SetSpeedSliderFraction(object):
|
||||
_type = 'ur_msgs/SetSpeedSliderFraction'
|
||||
_md5sum = '172aeb6c49379a44cf68480fa5bfad3c'
|
||||
_request_class = SetSpeedSliderFractionRequest
|
||||
_response_class = SetSpeedSliderFractionResponse
|
||||
@@ -1,2 +1,3 @@
|
||||
from ._SetIO import *
|
||||
from ._SetPayload import *
|
||||
from ._SetSpeedSliderFraction import *
|
||||
|
||||
Reference in New Issue
Block a user