-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rostwitter] Support extracting base64 images and tweet them from text. #375
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments as #373 (comment), please create real exampe, for exampe kitchen demo -> k-okada/jsk_robot#60 (comment), Or unitree k-okada/jsk_robot#60 (comment) (3). (note that we'll create unitree twitter account once we confirmed this is useful, so pleaset test on fetch account for debugging)
Please requeset reveiw, after CI passed
I tested this feature with kitchen-demo. |
@tkmtnt7000 nice, please create PR of kitchen-demo with this description. |
@tkmtnt7000 Thanks. |
813bcd2
to
798dc11
Compare
Thank you. I send PR to jsk-ros-pkg/jsk_robot jsk-ros-pkg/jsk_robot#1568.
|
ok, please add README.md, I would like to know, specially, how to display in thread. |
Sorry, I forgot pushing update of using thread. |
will this work if smach does not send image? @tkmtnt7000 |
@k-okada You can tweet text only, image only, and text with images. |
what will happen if sned
???
not
|
↓
The image will serve as a tweet delimiter. Another example.
↓
|
failing on , dialogflow_task_executive/noetic, please compete #362 @mqcmd196
|
3293b1e
to
7d6cd40
Compare
6d998c7
to
8e0d3a7
Compare
Sorry, I overlooked the comment. I completed #362 |
media_ids = [] | ||
for media in media_list: | ||
data = {'media': media} | ||
r = self._request_url(url, 'POST', data=data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in order to post numpy array
data, we need to upgrade requests
python module to 2.19.0
and above.
psf/requests@8546a15
I make a PR to improve this PR. |
What is this?
This is the another version of #371
This PR is developed on #373
smach to twitter uses
cv2.imencode
, so we need to docv2.imdecode
.https://github.com/jsk-ros-pkg/jsk_robot/blob/a87dbc1a8808d0d0aed9d06a5245e7cab2fe1e87/jsk_robot_common/jsk_robot_startup/scripts/smach_to_mail.py#L92
Also, since text may contain multiple base64-encoded images or filepaths, they are extracted and modified to be tweeted in succession like following tweet. https://twitter.com/pr2jsk/status/1559813371653894144
Quick Example
launch tweet.launch https://gist.github.com/iory/d70e2ee3c0749cdde593996dd98de22b
Download sample image
After that, run
tweet_sample.py
https://gist.github.com/iory/3a1f02d0ffecbcb40b1212fd5d850025
for fetch kitchen demo
https://twitter.com/fetch_jsk/status/1561730190098587650