I’ve been programming a NAO robot using Choregraphe 2.1.4 and I’ve been using Python boxes. I need a way to install Tweepy onto my virtual robot. I’ve tried installing it on my computer and then copying all the libraries over, but I seem to not be able to get the SSL libraries or whatever onto it. Is there a way to SSH into my virtual robot or something? Thank you.
-
Which operating system are you using? – Kamal Singh Dec 30 '17 at 09:43
-
@KamalSingh I’m using Windows 10. – Muhammad Rahman Dec 30 '17 at 11:08
-
Can you open the folder where you have choregraphe installed? – Kamal Singh Dec 30 '17 at 12:10
-
@KamalSingh Yes – Muhammad Rahman Dec 30 '17 at 12:24
1 Answers
I don't know of a clean way of doing that (there may be one); what I would usually do would be something like:
1) Create a service package, for example with robot-jumpstarter
python jumpstart.py python-service tweety-service TweetyService
2) Include tweety and whatever other libraries are needed directly in this package
3) when using a virtual robot, start Choregraphe, get that robot's port (in "Preferences > Virtual robot), and run your service (in a console or in your Python IDE) with
python scripts/tweetyservice.py --qi-url localhost:34674
(or whatever port you got from Choregraphe)
4) then inside your behavior, call your service with self.session().service("TweetyService")
like you would with any NAOqi service
5) When running on an actual robot, install your tweety-service package like you would any normal package and it would work fine.
This technique also allows you to put more of your logic in the standalone Python code, and less in Choregraphe boxes (which can be convenient if you want to split your code up in several modules).

- 2,946
- 2
- 19
- 22
-
Amazing answer, but to be honest with you, I don’t really understand it very well. I’m a beginner who’s just began with Python on Choregraphe. I’ve only began to start programming NAO a few months ago. And I’m only 14. Can you make it simpler please? Thank you for your answer. – Muhammad Rahman Dec 29 '17 at 13:50
-
I'm afraid I don't know an easy way of using an external lib from choregraphe on a virtual robot. What you can more easily do on a virtual (and real!) robot is write code as standalone Python; like that you can import tweety and manipulate the robot. To get started, look at this: http://doc.aldebaran.com/2-5/getting_started/helloworld_python.html (as IP use "localhost", and as port, instead of 9559 get it here: http://doc.aldebaran.com/2-5/software/choregraphe/choregraphe_preference.html#virtual-robot . Does that make sense? – Emile Dec 29 '17 at 14:13
-