python - Creating an Action Server & Client in ROS -
i'm trying setup ros action server & client handle sending images (encoded 64-bit strings) between python , ros (with goal of making image other scripts can pull ros). being new of (python, ubuntu, bash, ros, etc...), i'm having difficult time determining how this. think part of reason ros wiki tutorials/documentation linear fault, , process comes across convoluted , extraordinarily complicated. does out there know of non-ros-wiki related/dependent tutorials me figure out? or can create concise step-by-step guide establishing system? i've been unable find of relating topic - makes me think it's either uncommon use, or it's super easy , i'm not @ level yet.
my attempt @ solution getting information flow down. want python able read in image, convert bytes (using b64encode), , send on ros publish action. (thus, stream of images can sent no pause, done service, if understand correctly.) subscribed node (or server, works, i'll figure out when there) can see images , pull them action server.
now, i'm being told action best way this. personally, don't see why service wouldn't suffice (and i've @ least gotten 1 of work).
thanks again can provide!
edit: end application here video streaming. server grab live video, convert images, change byte strings, , stream them client, publish them ros action server.
i think you're overcomplicating it. wouldn't implement actionlib server, although 1 approach. i've created few similar systems, , how structured them:
- write node streams video publishing images on topic. can implement actionlib server, that's not required. in case, used pre-existing raspicam_node read raspberry pi's camera. if want implement in python, read tutorial on creating publisher.
- create node subscribes image topic, , reads image topic message. again, the tutorial shows how create subscriber. main difference you'd use either
compressedimage
orimage
sensor_msgs.msg
message type.
for subscriber-side, here's example python ros node wrote implements mjpeg streamer. subscribes topic, reads image data, , re-publishes via streaming http response. though it's "slow python", less 1 second of latency.
Comments
Post a Comment