Functions | |
def | _convert_from_ros_array |
def | _convert_from_ros_binary |
def | _convert_from_ros_primitive |
def | _convert_from_ros_time |
def | _convert_from_ros_type |
def | _convert_to_ros_array |
def | _convert_to_ros_binary |
def | _convert_to_ros_primitive |
def | _convert_to_ros_time |
def | _convert_to_ros_type |
def | _get_message_fields |
def | _is_field_type_an_array |
def | convert_dictionary_to_ros_message |
def | convert_ros_message_to_dictionary |
def | is_ros_binary_type |
Variables | |
tuple | list_brackets = re.compile(r'\[[^\]]*\]') |
int | python3 = 0x03000000 |
list | python_list_types = [list, tuple] |
list | python_string_types = [str] |
dictionary | python_to_ros_type_map |
tuple | ros_binary_types_regexp = re.compile(r'(uint8|char)\[[^\]]*\]') |
list | ros_header_types = ['Header', 'std_msgs/Header', 'roslib/Header'] |
list | ros_primitive_types |
list | ros_time_types = ['time', 'duration'] |
def rospy_message_converter.message_converter._convert_from_ros_array | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 215 of file message_converter.py.
def rospy_message_converter.message_converter._convert_from_ros_binary | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 201 of file message_converter.py.
def rospy_message_converter.message_converter._convert_from_ros_primitive | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 212 of file message_converter.py.
def rospy_message_converter.message_converter._convert_from_ros_time | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 205 of file message_converter.py.
def rospy_message_converter.message_converter._convert_from_ros_type | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 168 of file message_converter.py.
def rospy_message_converter.message_converter._convert_to_ros_array | ( | field_type, | |
list_value | |||
) | [private] |
Definition at line 148 of file message_converter.py.
def rospy_message_converter.message_converter._convert_to_ros_binary | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 118 of file message_converter.py.
def rospy_message_converter.message_converter._convert_to_ros_primitive | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 143 of file message_converter.py.
def rospy_message_converter.message_converter._convert_to_ros_time | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 126 of file message_converter.py.
def rospy_message_converter.message_converter._convert_to_ros_type | ( | field_type, | |
field_value | |||
) | [private] |
Definition at line 104 of file message_converter.py.
def rospy_message_converter.message_converter._get_message_fields | ( | message | ) | [private] |
Definition at line 219 of file message_converter.py.
def rospy_message_converter.message_converter._is_field_type_an_array | ( | field_type | ) | [private] |
Definition at line 222 of file message_converter.py.
def rospy_message_converter.message_converter.convert_dictionary_to_ros_message | ( | message_type, | |
dictionary, | |||
kind = 'message' |
|||
) |
Takes in the message type and a Python dictionary and returns a ROS message. Example: message_type = "std_msgs/String" dict_message = { "data": "Hello, Robot" } ros_message = convert_dictionary_to_ros_message(message_type, dict_message) message_type = "std_srvs/SetBool" dict_message = { "data": True } kind = "request" ros_message = convert_dictionary_to_ros_message(message_type, dict_message, kind)
Definition at line 65 of file message_converter.py.
Takes in a ROS message and returns a Python dictionary. Example: ros_message = std_msgs.msg.String(data="Hello, Robot") dict_message = convert_ros_message_to_dictionary(ros_message)
Definition at line 152 of file message_converter.py.
def rospy_message_converter.message_converter.is_ros_binary_type | ( | field_type, | |
field_value | |||
) |
Checks if the field is a binary array one, fixed size or not is_ros_binary_type("uint8", 42) >>> False is_ros_binary_type("uint8[]", [42, 18]) >>> True is_ros_binary_type("uint8[3]", [42, 18, 21] >>> True is_ros_binary_type("char", 42) >>> False is_ros_binary_type("char[]", [42, 18]) >>> True is_ros_binary_type("char[3]", [42, 18, 21] >>> True
Definition at line 183 of file message_converter.py.
tuple rospy_message_converter::message_converter::list_brackets = re.compile(r'\[[^\]]*\]') |
Definition at line 63 of file message_converter.py.
int rospy_message_converter::message_converter::python3 = 0x03000000 |
Definition at line 39 of file message_converter.py.
list rospy_message_converter::message_converter::python_list_types = [list, tuple] |
Definition at line 54 of file message_converter.py.
Definition at line 51 of file message_converter.py.
00001 { 00002 'bool' : ['bool'], 00003 'int' : ['int8', 'byte', 'uint8', 'char', 00004 'int16', 'uint16', 'int32', 'uint32', 00005 'int64', 'uint64', 'float32', 'float64'], 00006 'float' : ['float32', 'float64'], 00007 'str' : ['string'], 00008 'unicode' : ['string'], 00009 'long' : ['uint64'] 00010 }
Definition at line 40 of file message_converter.py.
tuple rospy_message_converter::message_converter::ros_binary_types_regexp = re.compile(r'(uint8|char)\[[^\]]*\]') |
Definition at line 61 of file message_converter.py.
list rospy_message_converter::message_converter::ros_header_types = ['Header', 'std_msgs/Header', 'roslib/Header'] |
Definition at line 60 of file message_converter.py.
00001 ['bool', 'byte', 'char', 'int8', 'uint8', 'int16', 00002 'uint16', 'int32', 'uint32', 'int64', 'uint64', 00003 'float32', 'float64', 'string']
Definition at line 57 of file message_converter.py.
list rospy_message_converter::message_converter::ros_time_types = ['time', 'duration'] |
Definition at line 56 of file message_converter.py.