OpenAgricultureFoundation / openag_brain

ROS package for controlling an OpenAg food computer
GNU General Public License v3.0
221 stars 68 forks source link

Replace resolve_message_type with roslib.message.get_message_class #49

Closed gordonbrander closed 7 years ago

gordonbrander commented 8 years ago

I think we can replace resolve_message_type with the roslib function get_message_class. They both take a message type string and return the Python class for that message type.

from roslib.message import get_message_class
type_string = "std_msgs/Float32"
MsgType = get_message_class(type_string)
gordonbrander commented 8 years ago

Here's the source for the roslib function https://github.com/ros/ros/blob/kinetic-devel/core/roslib/src/roslib/message.py#L95

LeonChambers commented 7 years ago

Resolved in #74