Closed gordonbrander closed 7 years ago
Here is the work in progress PR https://github.com/OpenAgInitiative/openag_brain/pull/50. I need to figure out how to take the POST data and coerce it into a typed ROS message, but in a polymorphic way. Failing that, will have to create a map of supported endpoints and type constructors.
@LeonChambers feedback welcome, since I'm sure you thought through this problem while building topic_connector
.
NVM. It turns out rospy.Publish
has a polymorphic call signature.
pub = rospy.Publisher('topic_name', std_msgs.msg.String, queue_size=10)
pub.publish("Some string")
Where pub.publish(a, b, ...)
passes a, b, ...
arguments to the given message type constructor.
We should be able to POST via HTTP to any existing ROS topic. This will let us manually trigger actuators via HTTP on an ad-hoc basis.